Mantid
Loading...
Searching...
No Matches
InstrumentMetadata.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2026 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
8
9#include "MantidGeometry/DllConfig.h"
10#include "MantidTypes/Core/DateAndTime.h"
11#include <memory>
12#include <string>
13
14namespace Mantid {
15namespace Geometry {
16class ComponentInfo;
17class DetectorInfo;
18
27class MANTID_GEOMETRY_DLL InstrumentMetadata {
28public:
29 InstrumentMetadata(const Types::Core::DateAndTime &validFromDate, const Types::Core::DateAndTime &validToDate,
30 const std::string &filename, const std::string &xmlText, const std::string &defaultView,
31 const std::string &defaultAxis,
32 const std::shared_ptr<const ComponentInfo> &physicalComponentInfo = nullptr,
33 const std::shared_ptr<const DetectorInfo> &physicalDetectorInfo = nullptr);
34
35 const Types::Core::DateAndTime &validFromDate() const;
36 const Types::Core::DateAndTime &validToDate() const;
37 const std::string &filename() const;
38 const std::string &xmlText() const;
39 const std::string &defaultView() const;
40 const std::string &defaultAxis() const;
43 bool hasPhysicalInstrument() const;
46 const ComponentInfo &physicalComponentInfo() const;
49 const DetectorInfo &physicalDetectorInfo() const;
50
51 void setFileName(const std::string &filename);
52 void setXmlText(const std::string &xmlText);
53 void setDefaultView(const std::string &defaultView);
54 void setDefaultViewAxis(const std::string &defaultAxis);
55
56private:
57 Types::Core::DateAndTime m_validFromDate;
58 Types::Core::DateAndTime m_validToDate;
59 std::string m_filename;
60 std::string m_xmlText;
61 std::string m_defaultView;
62 std::string m_defaultAxis;
63 // The ComponentInfo is cross-linked to the DetectorInfo, so the two are always held together
64 std::shared_ptr<const ComponentInfo> m_physicalComponentInfo;
65 std::shared_ptr<const DetectorInfo> m_physicalDetectorInfo;
66};
67
68} // namespace Geometry
69} // namespace Mantid
ComponentInfo : Provides a component centric view on to the instrument.
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2....
InstrumentMetadata : metadata related to the entire instrument.
std::shared_ptr< const DetectorInfo > m_physicalDetectorInfo
Types::Core::DateAndTime m_validFromDate
std::shared_ptr< const ComponentInfo > m_physicalComponentInfo
Helper class which provides the Collimation Length for SANS instruments.