|
Mantid
|
ComponentInfo : Provides a component centric view on to the instrument. More...
#include <ComponentInfo.h>
Classes | |
| struct | QuadrilateralComponent |
Public Member Functions | |
| void | addBool (const size_t componentIndex, const std::string &name, bool value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add or replace a named boolean parameter at a specific component index. | |
| void | addDouble (const size_t componentIndex, const std::string &name, double value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add or replace a named double parameter at a specific component index. | |
| void | addFittingParameter (const size_t componentIndex, const std::string &name, const std::string &fittingFunction, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add a fitting parameter. | |
| void | addInt (const size_t componentIndex, const std::string &name, int value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add or replace a named integer parameter at a specific component index. | |
| void | addLogfileParameter (size_t const componentIndex, std::string const &cacheKey, std::shared_ptr< const XMLInstrumentParameter > const ¶meter) |
| Add or replace a logfile parameter on a component. | |
| void | addParameter (const size_t componentIndex, const std::string &type, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add or replace a named parameter at a specific component index. | |
| void | addQuat (const size_t componentIndex, const std::string &name, const Kernel::Quat &value, const std::string *const pDescription=nullptr) |
| Add or replace a named quaternion parameter at a specific component index. | |
| void | addString (const size_t componentIndex, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Add or replace a named string parameter at a specific component index. | |
| void | addV3D (const size_t componentIndex, const std::string &name, const Kernel::V3D &value, const std::string *const pDescription=nullptr) |
| Add or replace a named vector parameter at a specific component index. | |
| ComponentInfoIterator< ComponentInfo > | begin () |
| BoundingBox | boundingBox (const size_t componentIndex, const BoundingBox *reference=nullptr, const bool excludeMonitors=false) const |
| Compute the bounding box for the component with componentIndex taking into account all sub components. | |
| const ComponentInfoIterator< const ComponentInfo > | cbegin () |
| const ComponentInfoIterator< const ComponentInfo > | cend () |
| const std::vector< size_t > & | children (size_t componentIndex) const |
| void | clearParameter (const size_t componentIndex, const std::string &name) |
| Remove every parameter of this name from this component. | |
| void | clearParameters () |
| Remove every parameter from every component. | |
| std::unique_ptr< ComponentInfo > | cloneWithoutDetectorInfo () const |
| Clone current instance but not the DetectorInfo non-owned parts. | |
| const IComponent * | componentID (const size_t componentIndex) const |
| ComponentInfo (std::unique_ptr< Beamline::ComponentInfo > componentInfo, std::shared_ptr< const std::vector< Mantid::Geometry::IComponent * > > componentIds, std::shared_ptr< const std::unordered_map< Geometry::IComponent const *, size_t > > componentIdToIndexMap, std::shared_ptr< std::vector< std::shared_ptr< const Geometry::IObject > > > shapes, std::shared_ptr< ParameterInfo > parameterInfo=nullptr, std::shared_ptr< const ReferenceFrame > referenceFrame=nullptr) | |
| Constructor. | |
| std::vector< size_t > | componentsInSubtree (size_t componentIndex) const |
| Beamline::ComponentType | componentType (const size_t componentIndex) const |
| size_t | detectorIndexAtXYZ (const size_t componentIndex, const int x, const int y, const int z) const |
| std::vector< size_t > | detectorsInSubtree (size_t componentIndex) const |
| ComponentInfoIterator< ComponentInfo > | end () |
| size_t | findBankParent (size_t index, const std::string &bankPart) const |
| std::string | fullName (const size_t componentIndex) const |
| The fully-qualified name of a component ("instrument/bank1/pixel3") | |
| std::vector< bool > | getBoolParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| std::string | getDescription (const size_t componentIndex) const |
| The component's own description: that of the parameter named after the component, not inherited. | |
| double | getFittingParameter (const size_t componentIndex, const std::string &name, double xvalue) const |
| std::vector< int > | getIntParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| size_t | getMemorySize () const |
| Return memory used by the component info, in bytes. | |
| std::vector< double > | getNumberParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| std::string | getParamDescription (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| The description of the named parameter, or an empty string if it is unset. | |
| std::string | getParameterAsString (size_t const componentIndex, std::string const &name, bool const recursive=true) const |
| The value of the named parameter as a string, whatever its type, or an empty string if it is unset. | |
| std::set< std::string > | getParameterNames (const size_t componentIndex, bool recursive=true) const |
| std::string | getParameterType (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| The type of the named parameter, or an empty string if the component has no such parameter. | |
| bool | getParameterVisible (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| The named parameter's visibility attribute, or false if it is unset. | |
| std::string | getParamShortDescription (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| The short description (tooltip) of the named parameter, or an empty string if it is unset. | |
| std::vector< Kernel::V3D > | getPositionParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| std::vector< Kernel::Quat > | getRotationParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| std::string | getShortDescription (const size_t componentIndex) const |
| The component's own short description: that of the parameter named after the component, not inherited. | |
| std::vector< std::string > | getStringParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| bool | hasDetectorInfo () const |
| bool | hasDetectors (const size_t componentIndex) const |
| bool | hasEquivalentSample (const ComponentInfo &other) const |
| bool | hasEquivalentSource (const ComponentInfo &other) const |
| bool | hasParameter (const size_t componentIndex, const std::string &name, bool recursive=true) const |
| Returns empty (or false) if the ComponentInfo was built without parameters or the parameter is unset. | |
| bool | hasParent (const size_t componentIndex) const |
| bool | hasSample () const |
| bool | hasSource () const |
| bool | hasValidShape (const size_t componentIndex) const |
| size_t | indexOf (Geometry::IComponent const *id) const |
| size_t | indexOfAny (const std::string &name) const |
| The first component with this name in a breadth-first search, as Instrument::getComponentByName() finds it. | |
| size_t | indexOfFullName (const std::string &fullName) const |
| The component with this fully-qualified name, or invalidIndex if there is none. | |
| size_t | indexOfOrInvalid (Geometry::IComponent const *id) const |
| The index for a component ID, or invalidIndex if it is not part of this instrument. | |
| bool | isDetector (const size_t componentIndex) const |
| bool | isGridDetector (size_t const componentIndex) const |
| bool | isStructuredDetector (size_t const componentIndex) const |
| double | l1 () const |
| const ParameterInfo::LogfileParameters & | logfileParameters () const |
| Parameters whose values are taken from the sample logs by ExperimentInfo::populateInstrumentParameters(). | |
| void | merge (const ComponentInfo &other) |
| const std::string & | name (const size_t componentIndex) const |
| ComponentInfo & | operator= (const ComponentInfo &)=delete |
| Copy assignment is not possible for ComponentInfo. | |
| std::shared_ptr< const Parameter > | parameter (const size_t componentIndex, const std::string &name, const std::string &type="", bool recursive=true) const |
| The named parameter, of the given type if one is given, or null if the component has none. | |
| std::shared_ptr< const Parameter > | parameterByType (const size_t componentIndex, const std::string &type, bool recursive=true) const |
| The first parameter of the given type, or null if the component has none. | |
| const ParameterInfo::ComponentParameters & | parameters (const size_t componentIndex) const |
| All parameters on one component, non-recursive, ordered by name. | |
| size_t | parent (const size_t componentIndex) const |
| Beamline::PixelGridComponent | pixelGridComponent (const size_t componentIndex) const |
| Kernel::V3D | position (const size_t componentIndex) const |
| Kernel::V3D | position (const std::pair< size_t, size_t > &index) const |
| QuadrilateralComponent | quadrilateralComponent (const size_t componentIndex) const |
| std::shared_ptr< const ReferenceFrame > | referenceFrame () const |
| The instrument's reference frame: which axes point up and along the beam, and its handedness. | |
| Kernel::V3D | relativePosition (const size_t componentIndex) const |
| Kernel::Quat | relativeRotation (const size_t componentIndex) const |
| size_t | root () const |
| Kernel::Quat | rotation (const size_t componentIndex) const |
| Kernel::Quat | rotation (const std::pair< size_t, size_t > &index) const |
| size_t | sample () const |
| Kernel::V3D | samplePosition () const |
| void | scaleComponent (const size_t componentIndex, const Kernel::V3D &newScaling) |
| void | scaleComponent (const std::pair< size_t, size_t > &index, const Kernel::V3D &newScaling) |
| Kernel::V3D | scaleFactor (const size_t componentIndex) const |
| size_t | scanCount () const |
| void | setDescription (const size_t componentIndex, const std::string &description) |
| Set the component's description, as Component::setDescription() does: on the parameter named after the component (searched recursively), or on a new empty string parameter of that name. | |
| void | setPosition (const std::pair< size_t, size_t > &index, const Kernel::V3D &newPosition) |
| void | setPosition (size_t componentIndex, const Kernel::V3D &newPosition) |
| void | setRotation (const std::pair< size_t, size_t > &index, const Kernel::Quat &newRotation) |
| void | setRotation (size_t componentIndex, const Kernel::Quat &newRotation) |
| void | setScaleFactor (const size_t componentIndex, const Kernel::V3D &scaleFactor) |
| void | setScanInterval (const std::pair< Types::Core::DateAndTime, Types::Core::DateAndTime > &interval) |
| const Geometry::IObject & | shape (const size_t componentIndex) const |
| std::unordered_map< std::shared_ptr< const Geometry::IObject >, std::vector< size_t > > | shapeToComponentIndices () const |
| Build a map from each unique shape to the list of component indices that share it. | |
| const std::shared_ptr< ParameterInfo > & | sharedParameterInfo () const |
| This allows ParameterMap to delegate to ParameterInfo, rather than keeping a parallel copy that would silently diverge. | |
| Kernel::V2D | sideBySideViewPosition (const size_t componentIndex) const |
| size_t | size () const |
| double | solidAngle (const size_t componentIndex, const Geometry::SolidAngleParams ¶ms) const |
| size_t | source () const |
| Kernel::V3D | sourcePosition () const |
| const Beamline::StructuredGridComponent & | structuredGridComponent (const size_t componentIndex) const |
| The pixel counts, ID numbering and pixel vertices of a Structured bank. Throws if it is not one. | |
| bool | uniqueName (const std::string &name) const |
| std::tuple< int, int, int > | xyzForDetectorID (const size_t componentIndex, const detid_t detectorID) const |
| Given the component index of a Rectangular/Grid bank, and a detector ID within it, return the (x, y, z) pixel indices of that detector. | |
| ~ComponentInfo () | |
Static Public Attributes | |
| static constexpr size_t | invalidIndex = std::numeric_limits<size_t>::max() |
| Returned by indexOfOrInvalid() for a component ID that is not part of this instrument. | |
Private Member Functions | |
| template<class T > | |
| void | addTypedParameter (const size_t componentIndex, const std::string &type, const std::string &name, const T &value, const std::string *const pDescription, const std::string &pVisible) |
| Shared implementation of the typed add*() methods. | |
| BoundingBox | componentBoundingBox (const size_t index, const BoundingBox *reference, const bool excludeMonitors=false) const |
| Calculates the absolute bounding box for the leaf item at index. | |
| ComponentInfo (const ComponentInfo &other) | |
| Private copy constructor. Do not make public. | |
| std::shared_ptr< Parameter > | findParameter (size_t componentIndex, std::string const &name, bool recursive) const |
| The named parameter on this component (or, if recursive, its nearest ancestor), or null. | |
| template<class T > | |
| std::vector< T > | getParameter (size_t componentIndex, const std::string &name, bool recursive) const |
| void | growBoundingBoxAsOutline (size_t index, const Geometry::BoundingBox *reference, Geometry::BoundingBox &mutableBB, const bool excludeMonitors=false) const |
| Grow the bounding box on the basis that the component described by index has an outline, which describes the full bounding box of all components and detectors held within. | |
| void | growBoundingBoxAsRectuangularBank (size_t index, const Geometry::BoundingBox *reference, Geometry::BoundingBox &mutableBB, const bool excludeMonitors=false) const |
| Grow the bounding box on the basis that the component described by index is a regular grid in a trapezoid, thus the bounding box can be fully described by just the 4 vertex detectors within. | |
| ParameterInfo & | mutableParameterInfo () |
| The store, created on first write if this ComponentInfo was built without one (a bare, non-parametrized instrument). | |
Private Attributes | |
| std::shared_ptr< const std::unordered_map< Geometry::IComponent const *, size_t > > | m_compIDToIndex |
| Map of component ids to indexes. | |
| std::shared_ptr< const std::vector< Geometry::IComponent * > > | m_componentIds |
| Collection of component ids. | |
| std::unique_ptr< Beamline::ComponentInfo > | m_componentInfo |
| Pointer to the actual ComponentInfo object (non-wrapping part). | |
| std::shared_ptr< ParameterInfo > | m_parameterInfo |
| The instrument's named parameters, keyed by component index. | |
| std::shared_ptr< const ReferenceFrame > | m_referenceFrame |
| The instrument's reference frame (up, along-beam and handedness), or null if none was given. | |
| std::shared_ptr< std::vector< std::shared_ptr< const Geometry::IObject > > > | m_shapes |
| Shapes for each component. | |
Friends | |
| class | Instrument |
ComponentInfo : Provides a component centric view on to the instrument.
Indexes are per component.
Definition at line 50 of file ComponentInfo.h.
|
private |
Private copy constructor. Do not make public.
Copy constructor.
Use with EXTREME CARE.
Should not be public since proper links between DetectorInfo and ComponentInfo must be set up.
Definition at line 97 of file ComponentInfo.cpp.
| Mantid::Geometry::ComponentInfo::ComponentInfo | ( | std::unique_ptr< Beamline::ComponentInfo > | componentInfo, |
| std::shared_ptr< const std::vector< Mantid::Geometry::IComponent * > > | componentIds, | ||
| std::shared_ptr< const std::unordered_map< Geometry::IComponent const *, size_t > > | componentIdToIndexMap, | ||
| std::shared_ptr< std::vector< std::shared_ptr< const Geometry::IObject > > > | shapes, | ||
| std::shared_ptr< ParameterInfo > | parameterInfo = nullptr, |
||
| std::shared_ptr< const ReferenceFrame > | referenceFrame = nullptr |
||
| ) |
Constructor.
| componentInfo | : Internal Beamline ComponentInfo |
| componentIds | : ComponentIDs ordered by component |
| componentIdToIndexMap | : ID -> index translation map |
| shapes | : Shapes for each component |
| parameterInfo | : Index-keyed parameter store |
| referenceFrame | A reference frame |
Definition at line 63 of file ComponentInfo.cpp.
References m_compIDToIndex, m_componentIds, and m_componentInfo.
|
default |
| void Mantid::Geometry::ComponentInfo::addBool | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add or replace a named boolean parameter at a specific component index.
Definition at line 755 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pBool(), and value.
Referenced by Mantid::Algorithms::SetInstrumentParameter::addParameter(), and Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ComponentInfo::addDouble | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| double | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add or replace a named double parameter at a specific component index.
Definition at line 745 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pDouble(), and value.
Referenced by Mantid::Algorithms::SetInstrumentParameter::addParameter(), Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::API::ExperimentInfo::populateWithParameter(), Mantid::API::ExperimentInfo::setEFixed(), Mantid::Algorithms::SparseWorkspace::SparseWorkspace(), and Mantid::DataHandling::LoadDetectorInfo::updateParameterMap().
| void Mantid::Geometry::ComponentInfo::addFittingParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| const std::string & | fittingFunction, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add a fitting parameter.
Definition at line 775 of file ComponentInfo.cpp.
References Mantid::Geometry::ParameterInfo::addFittingParameter(), Mantid::Geometry::ParameterFactory::create(), mutableParameterInfo(), name, and value.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ComponentInfo::addInt | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| int | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add or replace a named integer parameter at a specific component index.
Definition at line 750 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pInt(), and value.
Referenced by Mantid::Algorithms::SetInstrumentParameter::addParameter(), and Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ComponentInfo::addLogfileParameter | ( | size_t const | componentIndex, |
| std::string const & | cacheKey, | ||
| std::shared_ptr< const XMLInstrumentParameter > const & | parameter | ||
| ) |
Add or replace a logfile parameter on a component.
'cacheKey' is the parameter name, qualified by its fitting function if it has one.
Definition at line 791 of file ComponentInfo.cpp.
References Mantid::Geometry::ParameterInfo::addLogfileParameter(), and mutableParameterInfo().
| void Mantid::Geometry::ComponentInfo::addParameter | ( | const size_t | componentIndex, |
| const std::string & | type, | ||
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add or replace a named parameter at a specific component index.
Definition at line 732 of file ComponentInfo.cpp.
References Mantid::Geometry::ParameterInfo::add(), Mantid::Geometry::ParameterFactory::create(), mutableParameterInfo(), name, and value.
| void Mantid::Geometry::ComponentInfo::addQuat | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| const Kernel::Quat & | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Add or replace a named quaternion parameter at a specific component index.
Definition at line 770 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pQuat(), and value.
| void Mantid::Geometry::ComponentInfo::addString | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Add or replace a named string parameter at a specific component index.
Definition at line 760 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pString(), and value.
Referenced by Mantid::Algorithms::SetInstrumentParameter::addParameter(), Mantid::API::ExperimentInfo::populateWithParameter(), setDescription(), and Mantid::Algorithms::SparseWorkspace::SparseWorkspace().
|
private |
Shared implementation of the typed add*() methods.
Definition at line 716 of file ComponentInfo.cpp.
References Mantid::Geometry::ParameterInfo::add(), Mantid::Geometry::ParameterFactory::create(), mutableParameterInfo(), name, and value.
Referenced by addBool(), addDouble(), addInt(), addQuat(), addString(), and addV3D().
| void Mantid::Geometry::ComponentInfo::addV3D | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| const Kernel::V3D & | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Add or replace a named vector parameter at a specific component index.
Definition at line 765 of file ComponentInfo.cpp.
References addTypedParameter(), name, Mantid::Geometry::ParameterMap::pV3D(), and value.
| ComponentInfoIt Mantid::Geometry::ComponentInfo::begin | ( | ) |
Definition at line 573 of file ComponentInfo.cpp.
References size().
| BoundingBox Mantid::Geometry::ComponentInfo::boundingBox | ( | const size_t | componentIndex, |
| const BoundingBox * | reference = nullptr, |
||
| const bool | excludeMonitors = false |
||
| ) | const |
Compute the bounding box for the component with componentIndex taking into account all sub components.
| componentIndex | : Component index to get the bounding box for |
| reference | : Optional reference for coordinate system for non-axis aligned bounding boxes |
| excludeMonitors | : Optional flag to exclude monitors and choppers |
Definition at line 525 of file ComponentInfo.cpp.
References boundingBox(), children(), componentBoundingBox(), componentType(), Mantid::Geometry::BoundingBox::grow(), growBoundingBoxAsOutline(), growBoundingBoxAsRectuangularBank(), hasSource(), isDetector(), parent(), size(), and source().
Referenced by boundingBox(), Mantid::Geometry::ObjComponent::getBoundingBox(), Mantid::Geometry::Instrument::getBoundingBox(), Mantid::Geometry::CompAssembly::getBoundingBox(), Mantid::Geometry::GridDetector::getBoundingBox(), Mantid::Geometry::StructuredDetector::getBoundingBox(), and Mantid::API::PanelsSurfaceCalculator::transformedBoundingBoxPoints().
| const ComponentInfoConstIt Mantid::Geometry::ComponentInfo::cbegin | ( | ) |
Definition at line 577 of file ComponentInfo.cpp.
References size().
| const ComponentInfoConstIt Mantid::Geometry::ComponentInfo::cend | ( | ) |
Definition at line 579 of file ComponentInfo.cpp.
References size().
| const std::vector< size_t > & Mantid::Geometry::ComponentInfo::children | ( | size_t | componentIndex | ) | const |
Definition at line 113 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by boundingBox(), Mantid::API::PanelsSurfaceCalculator::calculateBankNormal(), Mantid::Algorithms::SetInstrumentParameter::componentsWithName(), Mantid::Geometry::edgePixel(), Mantid::API::PanelsSurfaceCalculator::examineAllComponents(), export_ComponentInfo(), findBankParent(), Mantid::DataHandling::SaveIsawDetCal::findPixelPos(), indexOfFullName(), Mantid::API::PanelsSurfaceCalculator::isBankFlat(), Mantid::API::PanelsSurfaceCalculator::retrievePanelCorners(), Mantid::API::PanelsSurfaceCalculator::setBankVisited(), Mantid::DataHandling::SaveIsawDetCal::sizeBanks(), Mantid::Crystal::AnvredCorrection::slantPathLength(), Mantid::Crystal::SaveHKL::slantPathLength(), and Mantid::API::PanelsSurfaceCalculator::tubeDetectorParentIDs().
| void Mantid::Geometry::ComponentInfo::clearParameter | ( | const size_t | componentIndex, |
| const std::string & | name | ||
| ) |
Remove every parameter of this name from this component.
Matches the name case-sensitively, as ParameterMap::clearParametersByName() does.
Definition at line 796 of file ComponentInfo.cpp.
References m_parameterInfo, and name.
Referenced by Mantid::Algorithms::SetInstrumentParameter::addParameter().
| void Mantid::Geometry::ComponentInfo::clearParameters | ( | ) |
Remove every parameter from every component.
Definition at line 802 of file ComponentInfo.cpp.
References m_parameterInfo.
| std::unique_ptr< Geometry::ComponentInfo > Mantid::Geometry::ComponentInfo::cloneWithoutDetectorInfo | ( | ) | const |
Clone current instance but not the DetectorInfo non-owned parts.
Definition at line 88 of file ComponentInfo.cpp.
Referenced by Mantid::Geometry::Instrument::makeWrappers().
|
private |
Calculates the absolute bounding box for the leaf item at index.
| index | : Component index |
| reference | : Optional reference for coordinate system for non-axis aligned bounding boxes |
| excludeMonitors | : Optional flag to exclude monitor and choppers |
Definition at line 456 of file ComponentInfo.cpp.
References componentType(), Mantid::Geometry::BoundingBox::getCoordSystem(), hasValidShape(), index, Mantid::Geometry::BoundingBox::isAxisAligned(), isDetector(), m_componentInfo, position, Mantid::Geometry::BoundingBox::realign(), rotation, shape(), Mantid::Geometry::X, Mantid::Geometry::BoundingBox::xMax(), Mantid::Geometry::BoundingBox::xMin(), Mantid::Geometry::Y, Mantid::Geometry::BoundingBox::yMax(), Mantid::Geometry::BoundingBox::yMin(), Mantid::Geometry::Z, Mantid::Geometry::BoundingBox::zMax(), and Mantid::Geometry::BoundingBox::zMin().
Referenced by boundingBox(), growBoundingBoxAsOutline(), and growBoundingBoxAsRectuangularBank().
|
inline |
Definition at line 171 of file ComponentInfo.h.
Referenced by WorkspaceCreationHelper::baseInstrumentID().
| std::vector< size_t > Mantid::Geometry::ComponentInfo::componentsInSubtree | ( | size_t | componentIndex | ) | const |
Definition at line 109 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by export_ComponentInfo().
| Beamline::ComponentType Mantid::Geometry::ComponentInfo::componentType | ( | const size_t | componentIndex | ) | const |
Definition at line 561 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by boundingBox(), componentBoundingBox(), export_ComponentInfo(), Mantid::Geometry::ComponentInfoBankHelpers::isDetectorFixedInBank(), quadrilateralComponent(), and Mantid::API::PanelsSurfaceCalculator::tubeDetectorParentIDs().
| size_t Mantid::Geometry::ComponentInfo::detectorIndexAtXYZ | ( | const size_t | componentIndex, |
| const int | x, | ||
| const int | y, | ||
| const int | z | ||
| ) | const |
Definition at line 326 of file ComponentInfo.cpp.
References m_componentInfo, Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by export_ComponentInfo(), and Mantid::DataHandling::SaveIsawDetCal::findPixelPos().
| std::vector< size_t > Mantid::Geometry::ComponentInfo::detectorsInSubtree | ( | size_t | componentIndex | ) | const |
Definition at line 105 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::API::applyRectangularDetectorScaleToComponentInfo(), Mantid::DataHandling::ScaleInstrumentComponent::exec(), export_ComponentInfo(), and Mantid::Geometry::ComponentInfoBankHelpers::isSaveableBank().
| ComponentInfoIt Mantid::Geometry::ComponentInfo::end | ( | ) |
Definition at line 575 of file ComponentInfo.cpp.
References size().
| size_t Mantid::Geometry::ComponentInfo::findBankParent | ( | size_t | index, |
| const std::string & | bankPart | ||
| ) | const |
Definition at line 581 of file ComponentInfo.cpp.
References children(), findBankParent(), index, name, and parent().
Referenced by findBankParent().
|
private |
The named parameter on this component (or, if recursive, its nearest ancestor), or null.
Definition at line 668 of file ComponentInfo.cpp.
References m_parameterInfo, and name.
Referenced by getParamDescription(), getParameter(), getParameterAsString(), getParameterType(), getParameterVisible(), getParamShortDescription(), and setDescription().
| std::string Mantid::Geometry::ComponentInfo::fullName | ( | const size_t | componentIndex | ) | const |
The fully-qualified name of a component ("instrument/bank1/pixel3")
The fully-qualified name of a component, e.g.
"instrument/bank1/pixel3". Matches IComponent::getFullName()
Definition at line 608 of file ComponentInfo.cpp.
References hasParent(), index, name, and parent().
Referenced by Mantid::Geometry::ParameterMap::asString(), Mantid::Geometry::ParameterMap::componentFullName(), export_ComponentInfo(), and indexOfFullName().
| std::vector< bool > Mantid::Geometry::ComponentInfo::getBoolParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 842 of file ComponentInfo.cpp.
References name.
| std::string Mantid::Geometry::ComponentInfo::getDescription | ( | const size_t | componentIndex | ) | const |
The component's own description: that of the parameter named after the component, not inherited.
Definition at line 891 of file ComponentInfo.cpp.
References getParamDescription(), and name.
| double Mantid::Geometry::ComponentInfo::getFittingParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| double | xvalue | ||
| ) | const |
Definition at line 908 of file ComponentInfo.cpp.
References Mantid::Geometry::FitParameter::getValue(), m_parameterInfo, and name.
| std::vector< int > Mantid::Geometry::ComponentInfo::getIntParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 837 of file ComponentInfo.cpp.
References name.
| size_t Mantid::Geometry::ComponentInfo::getMemorySize | ( | ) | const |
Return memory used by the component info, in bytes.
Definition at line 927 of file ComponentInfo.cpp.
References m_componentInfo, m_shapes, n, and size().
Referenced by export_ComponentInfo().
| std::vector< double > Mantid::Geometry::ComponentInfo::getNumberParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 832 of file ComponentInfo.cpp.
References name.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::API::checkForMandatoryInstrumentDefault(), Mantid::API::checkForOptionalInstrumentDefault(), Mantid::CurveFitting::Algorithms::ConvertToYSpace::getComponentParameter(), Mantid::Algorithms::SofQCommon::getEFixed(), Mantid::API::TimeAtSampleStrategyIndirect::getEfixed(), Mantid::Algorithms::ConvertSpectrumAxis2::getEfixed(), Mantid::Algorithms::CorrectKiKf::getEfixedFromParameterMap(), and Mantid::API::DetectorSearcher::handleTubeGap().
| std::string Mantid::Geometry::ComponentInfo::getParamDescription | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
The description of the named parameter, or an empty string if it is unset.
Definition at line 879 of file ComponentInfo.cpp.
References findParameter(), and name.
Referenced by getDescription().
|
private |
Definition at line 677 of file ComponentInfo.cpp.
References findParameter(), and name.
| std::string Mantid::Geometry::ComponentInfo::getParameterAsString | ( | size_t const | componentIndex, |
| std::string const & | name, | ||
| bool const | recursive = true |
||
| ) | const |
The value of the named parameter as a string, whatever its type, or an empty string if it is unset.
Definition at line 862 of file ComponentInfo.cpp.
References findParameter(), and name.
Referenced by Mantid::API::ExperimentInfo::getEMode().
| std::set< std::string > Mantid::Geometry::ComponentInfo::getParameterNames | ( | const size_t | componentIndex, |
| bool | recursive = true |
||
| ) | const |
Definition at line 695 of file ComponentInfo.cpp.
References getParameterNames(), hasParent(), m_parameterInfo, and parent().
Referenced by getParameterNames().
| std::string Mantid::Geometry::ComponentInfo::getParameterType | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
The type of the named parameter, or an empty string if the component has no such parameter.
Definition at line 873 of file ComponentInfo.cpp.
References findParameter(), and name.
| bool Mantid::Geometry::ComponentInfo::getParameterVisible | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
The named parameter's visibility attribute, or false if it is unset.
Definition at line 868 of file ComponentInfo.cpp.
References findParameter(), and name.
| std::string Mantid::Geometry::ComponentInfo::getParamShortDescription | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
The short description (tooltip) of the named parameter, or an empty string if it is unset.
Definition at line 885 of file ComponentInfo.cpp.
References findParameter(), and name.
Referenced by getShortDescription().
| std::vector< Kernel::V3D > Mantid::Geometry::ComponentInfo::getPositionParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 852 of file ComponentInfo.cpp.
References name.
| std::vector< Kernel::Quat > Mantid::Geometry::ComponentInfo::getRotationParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 857 of file ComponentInfo.cpp.
References name.
| std::string Mantid::Geometry::ComponentInfo::getShortDescription | ( | const size_t | componentIndex | ) | const |
The component's own short description: that of the parameter named after the component, not inherited.
Definition at line 895 of file ComponentInfo.cpp.
References getParamShortDescription(), and name.
| std::vector< std::string > Mantid::Geometry::ComponentInfo::getStringParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Definition at line 847 of file ComponentInfo.cpp.
References name.
Referenced by Mantid::API::checkForMandatoryInstrumentDefault(), and Mantid::API::checkForOptionalInstrumentDefault().
|
private |
Grow the bounding box on the basis that the component described by index has an outline, which describes the full bounding box of all components and detectors held within.
| index | : Index of the component to get the bounding box for |
| reference | : Reference bounding box (optional) |
| mutableBB | : Output bounding box. This will be grown. |
| excludeMonitors | : Optional flag to exclude monitors and choppers |
Definition at line 442 of file ComponentInfo.cpp.
References componentBoundingBox(), Mantid::Geometry::BoundingBox::grow(), and index.
Referenced by boundingBox().
|
private |
Grow the bounding box on the basis that the component described by index is a regular grid in a trapezoid, thus the bounding box can be fully described by just the 4 vertex detectors within.
Find the vertexes Grow the bounding box by each vetex Record detectors that form part of this bank that are enclosed and therefore already inclusive of the external bounding box Based on the number of sub-components, which are also fully enclosed, skip the component iterator forward so that those will not need to be evaluated.
| index | : Index of the component to get the bounding box for |
| reference | : Reference bounding box (optional) |
| mutableBB | : Output bounding box. This will be grown. |
| excludeMonitors | : Optional flag to exclude monitors and choppers |
Definition at line 421 of file ComponentInfo.cpp.
References componentBoundingBox(), Mantid::Geometry::BoundingBox::grow(), index, and quadrilateralComponent().
Referenced by boundingBox().
| bool Mantid::Geometry::ComponentInfo::hasDetectorInfo | ( | ) | const |
Definition at line 205 of file ComponentInfo.cpp.
References m_componentInfo.
| bool Mantid::Geometry::ComponentInfo::hasDetectors | ( | const size_t | componentIndex | ) | const |
Definition at line 239 of file ComponentInfo.cpp.
References isDetector(), and m_componentInfo.
Referenced by Mantid::Geometry::ComponentInfoBankHelpers::isSaveableBank().
| bool Mantid::Geometry::ComponentInfo::hasEquivalentSample | ( | const ComponentInfo & | other | ) | const |
Definition at line 235 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by export_ComponentInfo().
| bool Mantid::Geometry::ComponentInfo::hasEquivalentSource | ( | const ComponentInfo & | other | ) | const |
Definition at line 221 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by export_ComponentInfo().
| bool Mantid::Geometry::ComponentInfo::hasParameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| bool | recursive = true |
||
| ) | const |
Returns empty (or false) if the ComponentInfo was built without parameters or the parameter is unset.
Definition at line 685 of file ComponentInfo.cpp.
References m_parameterInfo, and name.
Referenced by Mantid::API::ExperimentInfo::getEMode(), and Mantid::API::DetectorSearcher::searchUsingNearestNeighbours().
| bool Mantid::Geometry::ComponentInfo::hasParent | ( | const size_t | componentIndex | ) | const |
Definition at line 203 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by export_ComponentInfo(), fullName(), getParameterNames(), Mantid::Geometry::ParameterInfo::getRecursive(), Mantid::Geometry::ParameterInfo::getRecursiveByType(), Mantid::Geometry::ParameterInfo::getRecursiveFittingParameter(), and Mantid::API::PanelsSurfaceCalculator::tubeDetectorParentIDs().
| bool Mantid::Geometry::ComponentInfo::hasSample | ( | ) | const |
Definition at line 225 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by export_ComponentInfo().
| bool Mantid::Geometry::ComponentInfo::hasSource | ( | ) | const |
Definition at line 211 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by boundingBox(), export_ComponentInfo(), and Mantid::Geometry::InstrumentRayTracer::InstrumentRayTracer().
| bool Mantid::Geometry::ComponentInfo::hasValidShape | ( | const size_t | componentIndex | ) | const |
Definition at line 156 of file ComponentInfo.cpp.
Referenced by Mantid::API::DetectorSearcher::checkInteceptWithNeighbours(), componentBoundingBox(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::createCollimatorHexahedronShape(), export_ComponentInfo(), and solidAngle().
| size_t Mantid::Geometry::ComponentInfo::indexOf | ( | Geometry::IComponent const * | id | ) | const |
Definition at line 141 of file ComponentInfo.cpp.
References m_compIDToIndex.
Referenced by Mantid::DataHandling::ScaleInstrumentComponent::exec(), Mantid::DataHandling::SaveIsawDetCal::findPixelPos(), Mantid::DataHandling::SaveIsawDetCal::sizeBanks(), and Mantid::DataHandling::ScaleInstrumentComponent::validateInputs().
| size_t Mantid::Geometry::ComponentInfo::indexOfAny | ( | const std::string & | name | ) | const |
The first component with this name in a breadth-first search, as Instrument::getComponentByName() finds it.
Throws std::invalid_argument if there is none.
Definition at line 148 of file ComponentInfo.cpp.
References m_componentInfo, and name.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::Geometry::edgePixel(), export_ComponentInfo(), Mantid::DataHandling::SaveIsawDetCal::findPixelPos(), Mantid::Crystal::LoadIsawPeaks::getCachedBankIndex(), Mantid::DataHandling::SaveIsawDetCal::sizeBanks(), Mantid::Crystal::AnvredCorrection::slantPathLength(), and Mantid::Crystal::SaveHKL::slantPathLength().
| size_t Mantid::Geometry::ComponentInfo::indexOfFullName | ( | const std::string & | fullName | ) | const |
The component with this fully-qualified name, or invalidIndex if there is none.
The component with this fully-qualified name, or invalidIndex.
Descends the tree one path segment at a time rather than comparing fullName() against every component, which would be O(components x depth) on every lookup – prohibitive for the large instruments this is called for once per stored parameter during a load.
Where two children of the same parent share a name the first is returned, matching what Instrument::getComponentByName() does within a level. Such a full name is ambiguous anyway.
Definition at line 633 of file ComponentInfo.cpp.
References children(), fullName(), invalidIndex, name, root(), and size().
Referenced by export_ComponentInfo().
| size_t Mantid::Geometry::ComponentInfo::indexOfOrInvalid | ( | Geometry::IComponent const * | id | ) | const |
The index for a component ID, or invalidIndex if it is not part of this instrument.
Definition at line 143 of file ComponentInfo.cpp.
References invalidIndex, and m_compIDToIndex.
| bool Mantid::Geometry::ComponentInfo::isDetector | ( | const size_t | componentIndex | ) | const |
Definition at line 152 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Geometry::ParameterMap::asString(), boundingBox(), componentBoundingBox(), export_ComponentInfo(), hasDetectors(), Mantid::Geometry::ComponentInfoBankHelpers::isDetectorFixedInBank(), Mantid::Geometry::ComponentInfoBankHelpers::isSaveableBank(), Mantid::API::ExperimentInfo::populateWithParameter(), Mantid::API::PanelsSurfaceCalculator::retrievePanelCorners(), and Mantid::DataHandling::ScaleInstrumentComponent::validateInputs().
| bool Mantid::Geometry::ComponentInfo::isGridDetector | ( | size_t const | componentIndex | ) | const |
Definition at line 304 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Geometry::edgePixel(), export_ComponentInfo(), and pixelGridComponent().
| bool Mantid::Geometry::ComponentInfo::isStructuredDetector | ( | size_t const | componentIndex | ) | const |
Definition at line 315 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by structuredGridComponent().
| double Mantid::Geometry::ComponentInfo::l1 | ( | ) | const |
Definition at line 250 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), and export_ComponentInfo().
| const ParameterInfo::LogfileParameters & Mantid::Geometry::ComponentInfo::logfileParameters | ( | ) | const |
Parameters whose values are taken from the sample logs by ExperimentInfo::populateInstrumentParameters().
Definition at line 786 of file ComponentInfo.cpp.
References m_parameterInfo.
| void Mantid::Geometry::ComponentInfo::merge | ( | const ComponentInfo & | other | ) |
Definition at line 571 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildOutputComponentInfo().
|
private |
The store, created on first write if this ComponentInfo was built without one (a bare, non-parametrized instrument).
Reads leave it null, so they stay cheap and const.
Definition at line 708 of file ComponentInfo.cpp.
References m_parameterInfo.
Referenced by addFittingParameter(), addLogfileParameter(), addParameter(), and addTypedParameter().
| const std::string & Mantid::Geometry::ComponentInfo::name | ( | const size_t | componentIndex | ) | const |
Definition at line 292 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Geometry::ParameterMap::componentName(), Mantid::Algorithms::SetInstrumentParameter::componentsWithName(), Mantid::Geometry::edgePixel(), export_ComponentInfo(), Mantid::DataHandling::SaveIsawDetCal::findPixelPos(), Mantid::Algorithms::SofQCommon::getEFixed(), Mantid::API::ExperimentInfo::getInstrumentName(), Mantid::API::PanelsSurfaceCalculator::isBankFlat(), and Mantid::DataHandling::SaveIsawDetCal::sizeBanks().
|
delete |
Copy assignment is not possible for ComponentInfo.
| std::shared_ptr< const Parameter > Mantid::Geometry::ComponentInfo::parameter | ( | const size_t | componentIndex, |
| const std::string & | name, | ||
| const std::string & | type = "", |
||
| bool | recursive = true |
||
| ) | const |
The named parameter, of the given type if one is given, or null if the component has none.
Definition at line 814 of file ComponentInfo.cpp.
References m_parameterInfo, and name.
| std::shared_ptr< const Parameter > Mantid::Geometry::ComponentInfo::parameterByType | ( | const size_t | componentIndex, |
| const std::string & | type, | ||
| bool | recursive = true |
||
| ) | const |
The first parameter of the given type, or null if the component has none.
Definition at line 823 of file ComponentInfo.cpp.
References m_parameterInfo.
| const ParameterInfo::ComponentParameters & Mantid::Geometry::ComponentInfo::parameters | ( | const size_t | componentIndex | ) | const |
All parameters on one component, non-recursive, ordered by name.
Definition at line 809 of file ComponentInfo.cpp.
References m_parameterInfo.
| size_t Mantid::Geometry::ComponentInfo::parent | ( | const size_t | componentIndex | ) | const |
Definition at line 201 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), boundingBox(), Mantid::API::PanelsSurfaceCalculator::examineAllComponents(), export_ComponentInfo(), findBankParent(), fullName(), getParameterNames(), Mantid::Geometry::ParameterInfo::getRecursive(), Mantid::Geometry::ParameterInfo::getRecursiveByType(), Mantid::Geometry::ParameterInfo::getRecursiveFittingParameter(), Mantid::Geometry::ComponentInfoBankHelpers::isAncestorOf(), Mantid::Geometry::ComponentInfoBankHelpers::isDetectorFixedInBank(), quadrilateralComponent(), and Mantid::API::PanelsSurfaceCalculator::tubeDetectorParentIDs().
| Beamline::PixelGridComponent Mantid::Geometry::ComponentInfo::pixelGridComponent | ( | const size_t | componentIndex | ) | const |
Definition at line 308 of file ComponentInfo.cpp.
References isGridDetector(), and m_componentInfo.
Referenced by Mantid::Geometry::edgePixel(), Mantid::DataHandling::SaveIsawDetCal::sizeBanks(), Mantid::Geometry::InstrumentRayTracer::testIntersectionWithGrid(), and xyzForDetectorID().
| Kernel::V3D Mantid::Geometry::ComponentInfo::position | ( | const size_t | componentIndex | ) | const |
Definition at line 161 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV3D().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::API::applyRectangularDetectorScaleToComponentInfo(), Mantid::API::PanelsSurfaceCalculator::calculateBankNormal(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::createCollimatorHexahedronShape(), Mantid::DataHandling::SaveIsawDetCal::findPixelPos(), Mantid::Geometry::Component::getPos(), Mantid::API::PanelsSurfaceCalculator::isBankFlat(), Mantid::Geometry::ComponentInfoBankHelpers::offsetFromAncestor(), Mantid::API::PanelsSurfaceCalculator::retrievePanelCorners(), Mantid::DataHandling::SaveIsawDetCal::sizeBanks(), Mantid::Crystal::AnvredCorrection::slantPathLength(), and Mantid::Crystal::SaveHKL::slantPathLength().
| Kernel::V3D Mantid::Geometry::ComponentInfo::position | ( | const std::pair< size_t, size_t > & | index | ) | const |
Definition at line 165 of file ComponentInfo.cpp.
References index, m_componentInfo, and Mantid::Kernel::toV3D().
| ComponentInfo::QuadrilateralComponent Mantid::Geometry::ComponentInfo::quadrilateralComponent | ( | const size_t | componentIndex | ) | const |
Definition at line 119 of file ComponentInfo.cpp.
References Mantid::Geometry::ComponentInfo::QuadrilateralComponent::bottomLeft, Mantid::Geometry::ComponentInfo::QuadrilateralComponent::bottomRight, componentType(), m_componentInfo, Mantid::Geometry::ComponentInfo::QuadrilateralComponent::nX, Mantid::Geometry::ComponentInfo::QuadrilateralComponent::nY, parent(), Mantid::Geometry::ComponentInfo::QuadrilateralComponent::topLeft, and Mantid::Geometry::ComponentInfo::QuadrilateralComponent::topRight.
Referenced by growBoundingBoxAsRectuangularBank(), and Mantid::API::PanelsSurfaceCalculator::retrievePanelCorners().
| std::shared_ptr< const ReferenceFrame > Mantid::Geometry::ComponentInfo::referenceFrame | ( | ) | const |
The instrument's reference frame: which axes point up and along the beam, and its handedness.
A default frame (Y up, Z along the beam, right-handed) if this ComponentInfo was built without one.
Definition at line 258 of file ComponentInfo.cpp.
References m_referenceFrame.
Referenced by Mantid::API::DetectorSearcher::convertQtoDirection(), Mantid::API::DetectorSearcher::createDetectorCache(), and export_ComponentInfo().
| Kernel::V3D Mantid::Geometry::ComponentInfo::relativePosition | ( | const size_t | componentIndex | ) | const |
Definition at line 177 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV3D().
Referenced by export_ComponentInfo(), Mantid::Geometry::Component::getRelativePos(), and Mantid::API::ExperimentInfo::populateWithParameter().
| Kernel::Quat Mantid::Geometry::ComponentInfo::relativeRotation | ( | const size_t | componentIndex | ) | const |
Definition at line 181 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toQuat().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), export_ComponentInfo(), and Mantid::Geometry::Component::getRelativeRot().
| size_t Mantid::Geometry::ComponentInfo::root | ( | ) | const |
Definition at line 252 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::API::checkForMandatoryInstrumentDefault(), Mantid::API::checkForOptionalInstrumentDefault(), Mantid::Algorithms::SetInstrumentParameter::componentsWithName(), Mantid::API::PanelsSurfaceCalculator::examineAllComponents(), export_ComponentInfo(), Mantid::API::ExperimentInfo::getInstrumentName(), Mantid::API::DetectorSearcher::handleTubeGap(), indexOfFullName(), Mantid::Geometry::ComponentInfoBankHelpers::isAncestorOf(), and Mantid::API::DetectorSearcher::searchUsingNearestNeighbours().
| Kernel::Quat Mantid::Geometry::ComponentInfo::rotation | ( | const size_t | componentIndex | ) | const |
Definition at line 169 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toQuat().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::API::applyRectangularDetectorScaleToComponentInfo(), Mantid::Geometry::Component::getRotation(), and Mantid::Geometry::ComponentInfoBankHelpers::offsetFromAncestor().
| Kernel::Quat Mantid::Geometry::ComponentInfo::rotation | ( | const std::pair< size_t, size_t > & | index | ) | const |
Definition at line 173 of file ComponentInfo.cpp.
References index, m_componentInfo, and Mantid::Kernel::toQuat().
| size_t Mantid::Geometry::ComponentInfo::sample | ( | ) | const |
Definition at line 248 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), export_ComponentInfo(), and Mantid::Geometry::ComponentInfoBankHelpers::isSaveableBank().
| Kernel::V3D Mantid::Geometry::ComponentInfo::samplePosition | ( | ) | const |
Definition at line 209 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV3D().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), export_ComponentInfo(), Mantid::Algorithms::Q1D2::pixelWeight(), Mantid::Crystal::AnvredCorrection::slantPathLength(), Mantid::Crystal::SaveHKL::slantPathLength(), and Mantid::Geometry::InstrumentRayTracer::traceFromSample().
| void Mantid::Geometry::ComponentInfo::scaleComponent | ( | const size_t | componentIndex, |
| const Kernel::V3D & | newScaling | ||
| ) |
Definition at line 193 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toVector3d().
Referenced by Mantid::DataHandling::ScaleInstrumentComponent::exec().
| void Mantid::Geometry::ComponentInfo::scaleComponent | ( | const std::pair< size_t, size_t > & | index, |
| const Kernel::V3D & | newScaling | ||
| ) |
Definition at line 197 of file ComponentInfo.cpp.
References index, m_componentInfo, and Mantid::Kernel::toVector3d().
| Kernel::V3D Mantid::Geometry::ComponentInfo::scaleFactor | ( | const size_t | componentIndex | ) | const |
Definition at line 288 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV3D().
Referenced by Mantid::DataHandling::ScaleInstrumentComponent::exec(), export_ComponentInfo(), Mantid::Geometry::Component::getScaleFactor(), setScaleFactor(), solidAngle(), Mantid::Algorithms::SolidAngleHelpers::Rectangle::solidAngle(), Mantid::Algorithms::SolidAngleHelpers::Tube::solidAngle(), and Mantid::Algorithms::SolidAngleHelpers::Wing::solidAngle().
| size_t Mantid::Geometry::ComponentInfo::scanCount | ( | ) | const |
Definition at line 569 of file ComponentInfo.cpp.
References m_componentInfo.
| void Mantid::Geometry::ComponentInfo::setDescription | ( | const size_t | componentIndex, |
| const std::string & | description | ||
| ) |
Set the component's description, as Component::setDescription() does: on the parameter named after the component (searched recursively), or on a new empty string parameter of that name.
Definition at line 899 of file ComponentInfo.cpp.
References addString(), findParameter(), and name.
| void Mantid::Geometry::ComponentInfo::setPosition | ( | const std::pair< size_t, size_t > & | index, |
| const Kernel::V3D & | newPosition | ||
| ) |
Definition at line 185 of file ComponentInfo.cpp.
References index, m_componentInfo, and Mantid::Kernel::toVector3d().
| void Mantid::Geometry::ComponentInfo::setPosition | ( | size_t | componentIndex, |
| const Kernel::V3D & | newPosition | ||
| ) |
Definition at line 254 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toVector3d().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), Mantid::API::applyRectangularDetectorScaleToComponentInfo(), and Mantid::DataHandling::LoadIsawDetCal::center().
| void Mantid::Geometry::ComponentInfo::setRotation | ( | const std::pair< size_t, size_t > & | index, |
| const Kernel::Quat & | newRotation | ||
| ) |
Definition at line 189 of file ComponentInfo.cpp.
References index, m_componentInfo, and Mantid::Kernel::toQuaterniond().
| void Mantid::Geometry::ComponentInfo::setRotation | ( | size_t | componentIndex, |
| const Kernel::Quat & | newRotation | ||
| ) |
Definition at line 265 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toQuaterniond().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustBankPositionsAndSizes(), and Mantid::DataHandling::LoadIsawDetCal::doRotation().
| void Mantid::Geometry::ComponentInfo::setScaleFactor | ( | const size_t | componentIndex, |
| const Kernel::V3D & | scaleFactor | ||
| ) |
Definition at line 296 of file ComponentInfo.cpp.
References m_componentInfo, scaleFactor(), and Mantid::Kernel::toVector3d().
Referenced by Mantid::DataHandling::ScaleInstrumentComponent::exec(), and export_ComponentInfo().
| void Mantid::Geometry::ComponentInfo::setScanInterval | ( | const std::pair< Types::Core::DateAndTime, Types::Core::DateAndTime > & | interval | ) |
Definition at line 565 of file ComponentInfo.cpp.
References m_componentInfo.
| const IObject & Mantid::Geometry::ComponentInfo::shape | ( | const size_t | componentIndex | ) | const |
Definition at line 269 of file ComponentInfo.cpp.
Referenced by Mantid::API::DetectorSearcher::checkInteceptWithNeighbours(), componentBoundingBox(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::createCollimatorHexahedronShape(), export_ComponentInfo(), Mantid::API::PanelsSurfaceCalculator::retrievePanelCorners(), solidAngle(), and Mantid::Geometry::InstrumentRayTracer::testIntersectionWithShape().
| std::unordered_map< std::shared_ptr< const IObject >, std::vector< size_t > > Mantid::Geometry::ComponentInfo::shapeToComponentIndices | ( | ) | const |
Build a map from each unique shape to the list of component indices that share it.
Components with a null or invalid shape are excluded from the result.
Definition at line 277 of file ComponentInfo.cpp.
References m_shapes.
|
inline |
This allows ParameterMap to delegate to ParameterInfo, rather than keeping a parallel copy that would silently diverge.
Definition at line 281 of file ComponentInfo.h.
| Kernel::V2D Mantid::Geometry::ComponentInfo::sideBySideViewPosition | ( | const size_t | componentIndex | ) | const |
Definition at line 300 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV2D().
Referenced by Mantid::API::PanelsSurfaceCalculator::getSideBySideViewPos().
| size_t Mantid::Geometry::ComponentInfo::size | ( | ) | const |
Definition at line 117 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by begin(), boundingBox(), cbegin(), cend(), end(), Mantid::API::PanelsSurfaceCalculator::examineAllComponents(), export_ComponentInfo(), getMemorySize(), and indexOfFullName().
| double Mantid::Geometry::ComponentInfo::solidAngle | ( | const size_t | componentIndex, |
| const Geometry::SolidAngleParams & | params | ||
| ) | const |
Definition at line 388 of file ComponentInfo.cpp.
References Mantid::Geometry::SolidAngleParams::copyWithNewObserver(), hasValidShape(), m_componentInfo, Mantid::Geometry::SolidAngleParams::observer(), scaleFactor(), shape(), and Mantid::Geometry::IObject::solidAngle().
Referenced by Mantid::Algorithms::Q1D2::pixelWeight(), Mantid::Geometry::ObjComponent::solidAngle(), and Mantid::Algorithms::SolidAngleHelpers::GenericShape::solidAngle().
| size_t Mantid::Geometry::ComponentInfo::source | ( | ) | const |
Definition at line 246 of file ComponentInfo.cpp.
References m_componentInfo.
Referenced by Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), boundingBox(), export_ComponentInfo(), Mantid::Geometry::ComponentInfoBankHelpers::isSaveableBank(), and Mantid::Algorithms::SparseWorkspace::SparseWorkspace().
| Kernel::V3D Mantid::Geometry::ComponentInfo::sourcePosition | ( | ) | const |
Definition at line 207 of file ComponentInfo.cpp.
References m_componentInfo, and Mantid::Kernel::toV3D().
Referenced by Mantid::Crystal::CalibrationHelpers::adjustUpSampleAndSourcePositions(), export_ComponentInfo(), and Mantid::Geometry::InstrumentRayTracer::trace().
| const Beamline::StructuredGridComponent & Mantid::Geometry::ComponentInfo::structuredGridComponent | ( | const size_t | componentIndex | ) | const |
The pixel counts, ID numbering and pixel vertices of a Structured bank. Throws if it is not one.
Definition at line 319 of file ComponentInfo.cpp.
References isStructuredDetector(), and m_componentInfo.
| bool Mantid::Geometry::ComponentInfo::uniqueName | ( | const std::string & | name | ) | const |
Definition at line 150 of file ComponentInfo.cpp.
References m_componentInfo, and name.
Referenced by export_ComponentInfo().
| std::tuple< int, int, int > Mantid::Geometry::ComponentInfo::xyzForDetectorID | ( | const size_t | componentIndex, |
| const detid_t | detectorID | ||
| ) | const |
Given the component index of a Rectangular/Grid bank, and a detector ID within it, return the (x, y, z) pixel indices of that detector.
Ports Geometry::GridDetector::getXYZForDetectorID's arithmetic exactly (detector-ID numbering is never parametrized, so this is safe to compute from the cached PixelGridComponent alone).
Definition at line 373 of file ComponentInfo.cpp.
References pixelGridComponent().
|
friend |
Definition at line 283 of file ComponentInfo.h.
|
staticconstexpr |
Returned by indexOfOrInvalid() for a component ID that is not part of this instrument.
Definition at line 53 of file ComponentInfo.h.
Referenced by Mantid::Geometry::ParameterMap::add(), Mantid::Geometry::ParameterMap::addFittingParameter(), Mantid::Geometry::ParameterMap::clearParametersByName(), Mantid::Geometry::ParameterMap::contains(), Mantid::Geometry::ParameterMap::contains(), Mantid::Algorithms::RayTracerTester::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::DataHandling::LoadParameterFile::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), export_ComponentInfo(), Mantid::DataObjects::Peak::findDetector(), Mantid::Algorithms::SmoothNeighbours::findNeighboursUbiquitous(), Mantid::Geometry::ParameterMap::get(), Mantid::Geometry::ParameterMap::getByType(), Mantid::Geometry::InstrumentRayTracer::getDetectorResult(), Mantid::Geometry::ParameterMap::getRecursiveFittingParameter(), Mantid::Geometry::ParameterMap::indexForWrite(), Mantid::Geometry::ParameterMap::indexOf(), indexOfFullName(), indexOfOrInvalid(), Mantid::Crystal::SCDPanelErrors::moveDetector(), Mantid::Geometry::ParameterMap::names(), Mantid::API::ExperimentInfo::readParameterMap(), Mantid::API::DetectorSearcher::searchUsingInstrumentRayTracing(), and Mantid::Geometry::ParameterMap::seedLogfileParameters().
|
private |
Map of component ids to indexes.
Definition at line 61 of file ComponentInfo.h.
Referenced by ComponentInfo(), indexOf(), and indexOfOrInvalid().
|
private |
Collection of component ids.
Definition at line 59 of file ComponentInfo.h.
Referenced by ComponentInfo().
|
private |
Pointer to the actual ComponentInfo object (non-wrapping part).
Definition at line 57 of file ComponentInfo.h.
Referenced by children(), componentBoundingBox(), ComponentInfo(), componentsInSubtree(), componentType(), detectorIndexAtXYZ(), detectorsInSubtree(), getMemorySize(), hasDetectorInfo(), hasDetectors(), hasEquivalentSample(), hasEquivalentSource(), hasParent(), hasSample(), hasSource(), indexOfAny(), isDetector(), isGridDetector(), isStructuredDetector(), l1(), merge(), name(), parent(), pixelGridComponent(), position(), position(), quadrilateralComponent(), relativePosition(), relativeRotation(), root(), rotation(), rotation(), sample(), samplePosition(), scaleComponent(), scaleComponent(), scaleFactor(), scanCount(), setPosition(), setPosition(), setRotation(), setRotation(), setScaleFactor(), setScanInterval(), sideBySideViewPosition(), size(), solidAngle(), source(), sourcePosition(), structuredGridComponent(), and uniqueName().
|
private |
The instrument's named parameters, keyed by component index.
Definition at line 67 of file ComponentInfo.h.
Referenced by clearParameter(), clearParameters(), findParameter(), getFittingParameter(), getParameterNames(), hasParameter(), logfileParameters(), mutableParameterInfo(), parameter(), parameterByType(), and parameters().
|
private |
The instrument's reference frame (up, along-beam and handedness), or null if none was given.
Definition at line 70 of file ComponentInfo.h.
Referenced by referenceFrame().
|
private |
Shapes for each component.
Definition at line 64 of file ComponentInfo.h.
Referenced by getMemorySize(), and shapeToComponentIndices().