Mantid
Loading...
Searching...
No Matches
LoadMuonStrategy.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
9#include "MantidDataHandling/DllConfig.h"
13#include "MantidKernel/Logger.h"
14
15namespace Mantid {
16namespace DataHandling {
17class LoadMuonNexusV2NexusHelper;
18
19// Create time zero table
20DataObjects::TableWorkspace_sptr createTimeZeroTable(const size_t numSpec, const std::vector<double> &timeZeros);
21
22class MANTID_DATAHANDLING_DLL LoadMuonStrategy {
23public:
24 // Constructor
25 LoadMuonStrategy(Kernel::Logger &g_log, std::string filename, LoadMuonNexusV2NexusHelper &nexusLoader);
26 // Virtual destructor
27 virtual ~LoadMuonStrategy() = default;
28 // Load muon log data
29 virtual void loadMuonLogData() = 0;
30 // Returns the good frames from the nexus entry
31 virtual void loadGoodFrames() = 0;
32 // Apply time zero correction
33 virtual void applyTimeZeroCorrection() = 0;
34 // Load detector grouping
36 // Load dead time table
38 // Get time zero table
40
41protected:
42 // Create grouping table
43 DataObjects::TableWorkspace_sptr createDetectorGroupingTable(const std::vector<detid_t> &specToLoad,
44 const std::vector<detid_t> &grouping) const;
45 // Create deadtimes table
46 DataObjects::TableWorkspace_sptr createDeadTimeTable(const std::vector<detid_t> &detectorsLoaded,
47 const std::vector<double> &deadTimes) const;
48
49 API::Workspace_sptr loadDefaultDetectorGrouping(const DataObjects::Workspace2D &localWorkspace) const;
50
51 std::vector<detid_t> getLoadedDetectorsFromWorkspace(const DataObjects::Workspace2D &localWorkspace) const;
52 // Logger
54 // Filename, used for running child algorithms
55 const std::string m_filename;
56 // Nexus file loader, used for manipulating the nexus entry
58};
59} // namespace DataHandling
60} // namespace Mantid
virtual API::Workspace_sptr loadDeadTimeTable() const =0
virtual API::Workspace_sptr loadDetectorGrouping() const =0
LoadMuonNexusV2NexusHelper & m_nexusLoader
virtual API::Workspace_sptr getTimeZeroTable()=0
Concrete workspace implementation.
Definition: Workspace2D.h:29
The Logger class is in charge of the publishing messages from the framework through various channels.
Definition: Logger.h:52
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
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
Helper class which provides the Collimation Length for SANS instruments.