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"
14
15#include <optional>
16#include <vector>
17
18namespace Mantid {
19namespace DataHandling {
20class LoadMuonNexusV2NexusHelper;
21
22// Create time zero table
23DataObjects::TableWorkspace_sptr createTimeZeroTable(const size_t numSpec, const std::vector<double> &timeZeros);
24
25class MANTID_DATAHANDLING_DLL LoadMuonStrategy {
26public:
27 // Constructor
28 LoadMuonStrategy(Kernel::Logger &g_log, std::string filename, LoadMuonNexusV2NexusHelper &nexusLoader);
29 // Virtual destructor
30 virtual ~LoadMuonStrategy() = default;
31 // Load muon log data
32 virtual void loadMuonLogData() = 0;
33 // Returns the good frames from the nexus entry
34 virtual void loadGoodFrames() = 0;
35 // Apply time zero correction
36 virtual void applyTimeZeroCorrection() = 0;
37 // Load detector grouping
39 // Load dead time table
41 // Get time zero table
43
44protected:
45 // Create grouping table
46 std::optional<DataObjects::TableWorkspace_sptr>
47 createDetectorGroupingTable(const std::vector<detid_t> &specToLoad,
48 const std::optional<std::vector<detid_t>> &grouping) const;
49 // Create deadtimes table
50 DataObjects::TableWorkspace_sptr createDeadTimeTable(const std::vector<detid_t> &detectorsLoaded,
51 const std::vector<double> &deadTimes) const;
52
53 API::Workspace_sptr loadDefaultDetectorGrouping(const DataObjects::Workspace2D &localWorkspace) const;
54
55 std::vector<detid_t> getLoadedDetectorsFromWorkspace(const DataObjects::Workspace2D &localWorkspace) const;
56 // Logger
58 // Filename, used for running child algorithms
59 const std::string m_filename;
60 // Nexus file loader, used for manipulating the nexus entry
62};
63} // namespace DataHandling
64} // 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:30
The Logger class is in charge of the publishing messages from the framework through various channels.
Definition Logger.h:51
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
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.