Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/10385 loadnexus speed #56

Merged
merged 17 commits into from
Nov 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/LogManager.h
Expand Up @@ -150,6 +150,8 @@ namespace Mantid
virtual void saveNexus(::NeXus::File * file, const std::string & group,bool keepOpen=false) const;
/// Load the run from a NeXus file with a given group name
virtual void loadNexus(::NeXus::File * file, const std::string & group,bool keepOpen=false);
/// Clear the logs
void clearLogs();

protected:
/// A pointer to a property manager
Expand Down
11 changes: 10 additions & 1 deletion Code/Mantid/Framework/API/src/LogManager.cpp
Expand Up @@ -434,13 +434,22 @@ using namespace Kernel;
if (prop)
{
if (m_manager.existsProperty(prop->name() ))
{
m_manager.removeProperty(prop->name() );
}
m_manager.declareProperty(prop);
}
}
}
if (!(group.empty()||keepOpen))file->closeGroup();

}

/**
* Clear the logs.
*/
void LogManager::clearLogs()
{
m_manager.clear();
}

//-----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -6,6 +6,7 @@
//----------------------------------------------------------------------
#include "MantidAPI/IFileLoader.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidAPI/MatrixWorkspace.h"

#include "MantidNexus/NexusClasses.h"
#include <nexus/NeXusFile.hpp>
Expand All @@ -15,6 +16,7 @@ namespace Mantid

namespace DataHandling
{

/**

Loads a workspace from a NeXus Processed entry in a NeXus file.
Expand Down Expand Up @@ -155,6 +157,9 @@ namespace Mantid

/// calculates the workspace size
std::size_t calculateWorkspacesize(const std::size_t numberofspectra);

/// Accellerated multiperiod loading
Mantid::API::Workspace_sptr doAccelleratedMultiPeriodLoading(Mantid::NeXus::NXRoot & root, const std::string & entryName, Mantid::API::MatrixWorkspace_sptr& tempMatrixWorkspace, const int64_t nWorkspaceEntries, const int64_t i);

/// Does the current workspace have uniform binning
bool m_shared_bins;
Expand Down