18using namespace DataObjects;
21const std::string GOODFRAMESPROP{
"goodfrm"};
22constexpr bool MULTIPERIODSLOADED =
true;
43 run.addProperty(
"main_field_direction", mainFieldDirection);
44 run.addProperty(
"FirstGoodData", firstGoodData);
45 run.addProperty(
"sample_temp", sampleInformation.temperature);
46 run.addProperty(
"sample_magn_field", sampleInformation.magneticField);
57 run.removeProperty(GOODFRAMESPROP);
58 run.addProperty(GOODFRAMESPROP, goodframes[i]);
74 int periodNumber = i + 1;
78 if (table->rowCount() == 0) {
82 tableGroup->addWorkspace(table);
93 auto numHistograms =
workspace->getNumberHistograms();
94 for (
size_t i = 0; i < numHistograms; ++i) {
96 timeAxis = timeAxis - timeZero;
104 int periodNumber = i + 1;
118 const auto numSpec =
workspace->getNumberHistograms();
IPeaksWorkspace_sptr workspace
Class to hold a set of workspaces.
int getNumberOfEntries() const
Return the number of entries within the group.
Workspace_sptr getItem(const size_t index) const
Return the ith workspace.
std::string loadMainFieldDirectionFromNexus()
std::vector< double > loadDeadTimesFromNexus(const std::vector< detid_t > &loadedDetectors, bool isFileMultiPeriod, int periodNumber)
MuonNexus::SampleInformation loadSampleInformationFromNexus()
double loadFirstGoodDataFromNexus()
std::vector< detid_t > loadDetectorGroupingFromNexus(const std::vector< detid_t > &loadedDetectors, bool isFileMultiPeriod, int periodNumber)
std::vector< double > loadTimeZeroListFromNexusFile(size_t numSpectra)
NeXus::NXInt loadGoodFramesDataFromNexus(bool isFileMultiPeriod)
double loadTimeZeroFromNexusFile()
Kernel::Logger & m_logger
DataObjects::TableWorkspace_sptr createDeadTimeTable(const std::vector< detid_t > &detectorsLoaded, const std::vector< double > &deadTimes) const
Creates the deadtime table for the loaded detectors .
std::vector< detid_t > getLoadedDetectorsFromWorkspace(const DataObjects::Workspace2D &localWorkspace) const
Determines the detectors loaded in the input workspace.
API::Workspace_sptr loadDefaultDetectorGrouping(const DataObjects::Workspace2D &localWorkspace) const
Loads default detector grouping, if this isn't present return dummy grouping.
DataObjects::TableWorkspace_sptr createDetectorGroupingTable(const std::vector< detid_t > &specToLoad, const std::vector< detid_t > &grouping) const
Creates Detector Grouping Table .
LoadMuonNexusV2NexusHelper & m_nexusLoader
API::Workspace_sptr loadDeadTimeTable() const override
API::WorkspaceGroup & m_workspaceGroup
std::vector< detid_t > getLoadedDetectors()
Finds the detectors which are loaded in the stored workspace group.
API::Workspace_sptr loadDetectorGrouping() const override
Loads detector grouping.
API::Workspace_sptr getTimeZeroTable() override
Gets time zero table from loaded time zeros Assumes all periods have same time zero.
void loadGoodFrames() override
Loads the good frames data into each of the stored workspace objects.
void applyTimeZeroCorrection() override
Performs time-zero correction on the loaded workspace.
void loadMuonLogData() override
Loads Muon specific logs into each of the workspaces in the workspace group.
MultiPeriodLoadMuonStrategy(Kernel::Logger &g_log, const std::string &filename, LoadMuonNexusV2NexusHelper &nexusLoader, API::WorkspaceGroup &workspaceGroup)
std::vector< detid_t > m_detectors
The Logger class is in charge of the publishing messages from the framework through various channels.
void notice(const std::string &msg)
Logs at notice level.
Templated class implementation of NXDataSet.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Kernel::Logger g_log("ExperimentInfo")
static logger object
DataObjects::TableWorkspace_sptr createTimeZeroTable(const size_t numSpec, const std::vector< double > &timeZeros)
Creates a timezero table for the loaded detectors.
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace