9#include "MantidBeamline/ComponentType.h"
10#include "MantidGeometry/DllConfig.h"
15#include <unordered_map>
47 std::shared_ptr<const std::unordered_map<Geometry::IComponent *, size_t>>
m_compIDToIndex;
50 std::shared_ptr<std::vector<std::shared_ptr<const Geometry::IObject>>>
m_shapes;
53 const bool excludeMonitors =
false)
const;
60 const bool excludeMonitors =
false)
const;
72 ComponentInfo(std::unique_ptr<Beamline::ComponentInfo> componentInfo,
73 std::shared_ptr<
const std::vector<Mantid::Geometry::IComponent *>> componentIds,
74 std::shared_ptr<
const std::unordered_map<Geometry::IComponent *, size_t>> componentIdToIndexMap,
75 std::shared_ptr<std::vector<std::shared_ptr<const Geometry::IObject>>> shapes);
79 std::unique_ptr<ComponentInfo> cloneWithoutDetectorInfo()
const;
80 std::vector<size_t> detectorsInSubtree(
size_t componentIndex)
const;
81 std::vector<size_t> componentsInSubtree(
size_t componentIndex)
const;
82 const std::vector<size_t> &children(
size_t componentIndex)
const;
86 size_t indexOfAny(
const std::string &name)
const;
87 bool uniqueName(
const std::string &name)
const;
88 bool isDetector(
const size_t componentIndex)
const;
93 Kernel::V3D relativePosition(
const size_t componentIndex)
const;
94 Kernel::Quat relativeRotation(
const size_t componentIndex)
const;
99 size_t parent(
const size_t componentIndex)
const;
100 bool hasParent(
const size_t componentIndex)
const;
101 bool hasDetectorInfo()
const;
104 bool hasSource()
const;
106 bool hasSample()
const;
108 bool hasDetectors(
const size_t componentIndex)
const;
109 size_t source()
const;
110 size_t sample()
const;
112 Kernel::V3D scaleFactor(
const size_t componentIndex)
const;
113 const std::string &name(
const size_t componentIndex)
const;
114 void setScaleFactor(
const size_t componentIndex,
const Kernel::V3D &scaleFactor);
118 return m_componentIds->operator[](componentIndex);
120 bool hasValidShape(
const size_t componentIndex)
const;
124 double solidAngle(
const size_t componentIndex,
const Kernel::V3D &observer)
const;
126 const bool excludeMonitors =
false)
const;
127 Beamline::ComponentType componentType(
const size_t componentIndex)
const;
128 void setScanInterval(
const std::pair<Types::Core::DateAndTime, Types::Core::DateAndTime> &interval);
129 size_t scanCount()
const;
std::map< DeltaEMode::Type, std::string > index
Mantid::Kernel::Quat(ComponentInfo::* rotation)(const size_t) const
void(ComponentInfo::* setPosition)(const size_t, const Mantid::Kernel::V3D &)
void(ComponentInfo::* setRotation)(const size_t, const Mantid::Kernel::Quat &)
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
ComponentInfoIterator for random access iteration over ComponentInfo.
ComponentInfo : Provides a component centric view on to the instrument.
ComponentInfo & operator=(const ComponentInfo &)=delete
Copy assignment is not possible for ComponentInfo.
std::shared_ptr< const std::unordered_map< Geometry::IComponent *, size_t > > m_compIDToIndex
Map of component ids to indexes.
std::shared_ptr< std::vector< std::shared_ptr< const Geometry::IObject > > > m_shapes
Shapes for each component.
const IComponent * componentID(const size_t componentIndex) const
std::unique_ptr< Beamline::ComponentInfo > m_componentInfo
Pointer to the actual ComponentInfo object (non-wrapping part).
std::shared_ptr< const std::vector< Geometry::IComponent * > > m_componentIds
Collection of component ids.
base class for Geometric IComponent
IObject : Interface for geometry objects.
Helper class which provides the Collimation Length for SANS instruments.