|
Mantid
|
ParameterMap class. More...
#include <ParameterMap.h>
Public Types | |
| using | pmap = tbb::concurrent_unordered_multimap< ComponentID, std::shared_ptr< Parameter > > |
| Parameter map typedef. | |
| using | pmap_cit = tbb::concurrent_unordered_multimap< ComponentID, std::shared_ptr< Parameter > >::const_iterator |
| Parameter map iterator typedef. | |
| using | pmap_it = tbb::concurrent_unordered_multimap< ComponentID, std::shared_ptr< Parameter > >::iterator |
| Parameter map iterator typedef. | |
Public Member Functions | |
| void | add (const IComponent *comp, const std::shared_ptr< Parameter > &par, const std::string *const pDescription=nullptr) |
| Method for adding a parameter providing shared pointer to it. | |
| void | add (const std::string &type, const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &visible="true") |
| Method for adding a parameter providing its value as a string. | |
| template<class T > | |
| void | add (const std::string &type, const IComponent *comp, const std::string &name, const T &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Method for adding a parameter providing its value of a particular type. | |
| void | clear () |
| Clears the map. | |
| void | clearParametersByName (const std::string &name) |
| Clear any parameters with the given name. | |
| void | clearParametersByName (const std::string &name, const IComponent *comp) |
| Clear any parameters with the given name for a specified component. | |
| const std::string | diff (const ParameterMap &rhs, const bool &firstDiffOnly=false, const bool relative=false, const double doubleTolerance=Kernel::Tolerance) const |
| Output information that helps understanding the mismatch between two parameter maps. | |
| bool | empty () const |
| Returns true if the map is empty, false otherwise. | |
| bool | operator!= (const ParameterMap &rhs) const |
| Inquality comparison operator. | |
| bool | operator== (const ParameterMap &rhs) const |
| Equality comparison operator. | |
| ParameterMap () | |
| Default constructor. | |
| ParameterMap (const ParameterMap &other) | |
| Const constructor. | |
| int | size () const |
| Return the size of the map. | |
| void | swap (ParameterMap &other) |
| method swaps two parameter maps contents each other. | |
| ~ParameterMap () | |
Static Public Member Functions | |
| static const std::string & | pBool () |
| static const std::string & | pDouble () |
| static const std::string & | pInt () |
| static const std::string & | pos () |
| Return string to be used in the map. | |
| static const std::string & | posx () |
| static const std::string & | posy () |
| static const std::string & | posz () |
| static const std::string & | pQuat () |
| static const std::string & | pString () |
| static const std::string & | pV3D () |
| static const std::string & | rot () |
| static const std::string & | rotx () |
| static const std::string & | roty () |
| static const std::string & | rotz () |
| static const std::string & | scale () |
Helper methods for adding and updating parameter types <br> | |
| std::vector< std::string > | m_parameterFileNames |
| internal list of parameter files loaded | |
| pmap | m_map |
| internal parameter map instance | |
| std::unique_ptr< Kernel::Cache< const ComponentID, Kernel::V3D > > | m_cacheLocMap |
| internal cache map instance for cached position values | |
| std::unique_ptr< Kernel::Cache< const ComponentID, Kernel::Quat > > | m_cacheRotMap |
| internal cache map instance for cached rotation values | |
| std::unique_ptr< Geometry::DetectorInfo > | m_detectorInfo |
| Pointer to the DetectorInfo wrapper. | |
| std::unique_ptr< Geometry::ComponentInfo > | m_componentInfo |
| Pointer to the ComponentInfo wrapper. | |
| const Instrument * | m_instrument {nullptr} |
| Pointer to the owning instrument for translating detector IDs into detector indices when accessing the DetectorInfo object. | |
| void | addPositionCoordinate (const IComponent *comp, const std::string &name, const double value, const std::string *const pDescription=nullptr) |
| Create or adjust "pos" parameter for a component. | |
| void | addRotationParam (const IComponent *comp, const std::string &name, const double deg, const std::string *const pDescription=nullptr) |
| Create or adjust "rot" parameter for a component. | |
| void | addDouble (const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds a double value to the parameter map. | |
| void | addDouble (const IComponent *comp, const std::string &name, double value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds a double value to the parameter map. | |
| void | addInt (const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds an int value to the parameter map. | |
| void | addInt (const IComponent *comp, const std::string &name, int value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds an int value to the parameter map. | |
| void | addBool (const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds a bool value to the parameter map. | |
| void | addBool (const IComponent *comp, const std::string &name, bool value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds a bool value to the parameter map. | |
| void | addString (const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr, const std::string &pVisible="true") |
| Adds a std::string value to the parameter map. | |
| void | addV3D (const IComponent *comp, const std::string &name, const std::string &value, const std::string *const pDescription=nullptr) |
| Adds a Kernel::V3D value to the parameter map. | |
| void | addV3D (const IComponent *comp, const std::string &name, const Kernel::V3D &value, const std::string *const pDescription=nullptr) |
| Adds a Kernel::V3D value to the parameter map. | |
| void | addQuat (const IComponent *comp, const std::string &name, const Kernel::Quat &value, const std::string *const pDescription=nullptr) |
| Adds a Kernel::Quat value to the parameter map. | |
| void | forceUnsafeSetMasked (const IComponent *comp, bool value) |
| Force adding masking information. | |
| bool | contains (const IComponent *comp, const std::string &name, const std::string &type="") const |
| Does the named parameter exist for the given component and type (std::string version) | |
| bool | contains (const IComponent *comp, const char *name, const char *type="") const |
| Does the named parameter exist for the given component (c-string version) | |
| bool | contains (const IComponent *comp, const Parameter ¶meter) const |
| Does the given parameter & component combination exist. | |
| std::shared_ptr< Parameter > | get (const IComponent *comp, const std::string &name, const std::string &type="") const |
| Get a parameter with a given name and type (std::string version) | |
| std::shared_ptr< Parameter > | get (const IComponent *comp, const char *name, const char *type="") const |
| Get a parameter with a given name and type (c-string version) | |
| std::shared_ptr< Parameter > | getByType (const IComponent *comp, const std::string &type) const |
| Finds the parameter in the map via the parameter type. | |
| std::shared_ptr< Parameter > | getRecursive (const IComponent *comp, const std::string &name, const std::string &type="") const |
| Use get() recursively to see if can find param in all parents of comp and given type (std::string version) | |
| std::shared_ptr< Parameter > | getRecursive (const IComponent *comp, const char *name, const char *type="") const |
| Use get() recursively to see if can find param in all parents of comp and given type (const char type) | |
| std::shared_ptr< Parameter > | getRecursiveByType (const IComponent *comp, const std::string &type) const |
| Looks recursively upwards in the component tree for the first instance of a parameter with a specified type. | |
| template<class T > | |
| std::vector< T > | getType (const std::string &compName, const std::string &name) const |
| Get the values of a given parameter of all the components that have the name: compName. | |
| const std::string | getDescription (const std::string &compName, const std::string &name) const |
| Get the component description by name. | |
| const std::string | getShortDescription (const std::string &compName, const std::string &name) const |
| Get the component tooltip by name. | |
| std::string | getString (const IComponent *comp, const std::string &name, bool recursive=false) const |
| Return the value of a parameter as a string. | |
| std::vector< std::string > | getString (const std::string &compName, const std::string &name) const |
| Returns a string parameter as vector's first element if exists and an empty vector if it doesn't. | |
| std::vector< double > | getDouble (const std::string &compName, const std::string &name) const |
| Returns a double parameter as vector's first element if exists and an empty vector if it doesn't. | |
| std::vector< Kernel::V3D > | getV3D (const std::string &compName, const std::string &name) const |
| Returns a Kernel::V3D parameter as vector's first element if exists and an empty vector if it doesn't. | |
| std::set< std::string > | names (const IComponent *comp) const |
| Returns a set with all parameter names for component. | |
| std::string | asString () const |
| Returns a string with all component names, parameter names and values. | |
| void | clearPositionSensitiveCaches () |
| Clears the location, rotation & bounding box caches. | |
| void | setCachedLocation (const IComponent *comp, const Kernel::V3D &location) const |
| Sets a cached location on the location cache. | |
| bool | getCachedLocation (const IComponent *comp, Kernel::V3D &location) const |
| Attempts to retrieve a location from the location cache. | |
| void | setCachedRotation (const IComponent *comp, const Kernel::Quat &rotation) const |
| Sets a cached rotation on the rotation cache. | |
| bool | getCachedRotation (const IComponent *comp, Kernel::Quat &rotation) const |
| Attempts to retrieve a rotation from the rotation cache. | |
| void | saveNexus (Nexus::File *file, const std::string &group) const |
| Persist a representation of the Parameter map to the open Nexus file. | |
| void | copyFromParameterMap (const IComponent *oldComp, const IComponent *newComp, const ParameterMap *oldPMap) |
| Copy pairs (oldComp->id,Parameter) to the m_map assigning the new newComp->id. | |
| const std::vector< std::string > & | getParameterFilenames () const |
| Returns a list of all the parameter files loaded. | |
| void | addParameterFilename (const std::string &filename) |
| adds a parameter filename that has been loaded | |
| pmap_it | begin () |
| access iterators. begin; | |
| pmap_cit | begin () const |
| pmap_it | end () |
| access iterators. end; | |
| pmap_cit | end () const |
| bool | hasDetectorInfo (const Instrument *instrument) const |
| Only for use by ExperimentInfo. | |
| bool | hasComponentInfo (const Instrument *instrument) const |
| Only for use by ExperimentInfo. | |
| const Geometry::DetectorInfo & | detectorInfo () const |
| Only for use by ExperimentInfo. Returns a reference to the DetectorInfo. | |
| Geometry::DetectorInfo & | mutableDetectorInfo () |
| Only for use by ExperimentInfo. Returns a reference to the DetectorInfo. | |
| const Geometry::ComponentInfo & | componentInfo () const |
| Only for use by ExperimentInfo. Returns a reference to the ComponentInfo. | |
| Geometry::ComponentInfo & | mutableComponentInfo () |
| Only for use by ExperimentInfo. Returns a reference to the ComponentInfo. | |
| size_t | detectorIndex (const detid_t detID) const |
| Only for use by Detector. Returns a detector index for a detector ID. | |
| size_t | componentIndex (const Geometry::ComponentID componentId) const |
| const std::vector< Geometry::ComponentID > & | componentIds () const |
| void | setInstrument (const Instrument *instrument) |
| Only for use by Instrument. Sets the pointer to the owning instrument. | |
| std::shared_ptr< Parameter > | create (const std::string &className, const std::string &name, const std::string &visible="true") const |
| Wrapper for ParameterFactory::create to avoid include in header. | |
| ParameterMap & | operator= (ParameterMap *rhs) |
| Assignment operator. | |
| component_map_it | positionOf (const IComponent *comp, const char *name, const char *type) |
| internal function to get position of the parameter in the parameter map | |
| component_map_cit | positionOf (const IComponent *comp, const char *name, const char *type) const |
| const version of the internal function to get position of the parameter in the parameter map | |
| bool | relErr (double x1, double x2, double errorVal) const |
| calculate relative error for use in diff | |
ParameterMap class.
Holds the parameters of modified (parametrized) instrument components. ParameterMap has a number of 'add' methods for adding parameters of different types.
Definition at line 43 of file ParameterMap.h.
| using Mantid::Geometry::ParameterMap::pmap = tbb::concurrent_unordered_multimap<ComponentID, std::shared_ptr<Parameter> > |
Parameter map typedef.
Definition at line 46 of file ParameterMap.h.
| using Mantid::Geometry::ParameterMap::pmap_cit = tbb::concurrent_unordered_multimap<ComponentID, std::shared_ptr<Parameter> >::const_iterator |
Parameter map iterator typedef.
Definition at line 50 of file ParameterMap.h.
| using Mantid::Geometry::ParameterMap::pmap_it = tbb::concurrent_unordered_multimap<ComponentID, std::shared_ptr<Parameter> >::iterator |
Parameter map iterator typedef.
Definition at line 48 of file ParameterMap.h.
| Mantid::Geometry::ParameterMap::ParameterMap | ( | ) |
Default constructor.
Definition at line 64 of file ParameterMap.cpp.
| Mantid::Geometry::ParameterMap::ParameterMap | ( | const ParameterMap & | other | ) |
Const constructor.
Definition at line 68 of file ParameterMap.cpp.
References m_componentInfo, m_detectorInfo, m_instrument, and Mantid::Geometry::Instrument::makeBeamline().
|
default |
| void Mantid::Geometry::ParameterMap::add | ( | const IComponent * | comp, |
| const std::shared_ptr< Parameter > & | par, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Method for adding a parameter providing shared pointer to it.
Method for adding/replacing a parameter providing shared pointer to it.
The class stores share pointer and increment ref count to it
| comp | :: A pointer to the component that this parameter is attached to |
| par | :: a shared pointer to existing parameter. The ParameterMap stores share pointer and increment ref count to it |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
Definition at line 360 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_map, and positionOf().
| void Mantid::Geometry::ParameterMap::add | ( | const std::string & | type, |
| const IComponent * | comp, | ||
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Method for adding a parameter providing its value as a string.
Add a value into the map.
| type | :: A string denoting the type, e.g. double, string, fitting |
| comp | :: A pointer to the component that this parameter is attached to |
| name | :: The name of the parameter |
| value | :: The parameter's value |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 346 of file ParameterMap.cpp.
References add(), Mantid::Geometry::ParameterFactory::create(), name, and value.
Referenced by add(), addBool(), addBool(), addDouble(), addDouble(), addInt(), addInt(), addQuat(), addV3D(), addV3D(), Mantid::Algorithms::CopyInstrumentParameters::exec(), and Mantid::API::ExperimentInfo::populateWithParameter().
|
inline |
Method for adding a parameter providing its value of a particular type.
If a parameter already exists then it is replaced with a new one of the given type and value
| T | The concrete type |
| type | :: A string denoting the type, e.g. double, string, fitting |
| comp | :: A pointer to the component that this parameter is attached to |
| name | :: The name of the parameter |
| value | :: The parameter's value |
| pDescription | :: if present, the constant pointer to a constant string, containing parameter's description. |
| pVisible | :: if present, defines whether the parameter should be visible in InstrumentViewer |
Definition at line 121 of file ParameterMap.h.
References Mantid::DataObjects::create(), name, and value.
| void Mantid::Geometry::ParameterMap::addBool | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| bool | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds a bool value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a bool |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 570 of file ParameterMap.cpp.
| void Mantid::Geometry::ParameterMap::addBool | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds a bool value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a string |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 557 of file ParameterMap.cpp.
References add(), name, pBool(), and value.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addDouble | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds a double value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a string |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 501 of file ParameterMap.cpp.
References add(), name, pDouble(), and value.
Referenced by addRotationParam(), and Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addDouble | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| double | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds a double value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a double |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 515 of file ParameterMap.cpp.
| void Mantid::Geometry::ParameterMap::addInt | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds an int value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a string |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 529 of file ParameterMap.cpp.
References add(), name, pInt(), and value.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addInt | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| int | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds an int value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as an int |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 543 of file ParameterMap.cpp.
| void Mantid::Geometry::ParameterMap::addParameterFilename | ( | const std::string & | filename | ) |
adds a parameter filename that has been loaded
| filename | the filename to add |
Definition at line 1041 of file ParameterMap.cpp.
References m_parameterFileNames.
| void Mantid::Geometry::ParameterMap::addPositionCoordinate | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const double | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Create or adjust "pos" parameter for a component.
Create or adjust "pos" parameter for a component Assumed that name either equals "x", "y" or "z" otherwise this method will not add or modify "pos" parameter.
| comp | :: Component |
| name | :: name of the parameter |
| value | :: value |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameters memory |
Definition at line 401 of file ParameterMap.cpp.
References addV3D(), clearPositionSensitiveCaches(), Mantid::Geometry::g_log, get(), Mantid::Geometry::IComponent::getPos(), name, pos(), position, posx(), posy(), posz(), Mantid::Kernel::V3D::setX(), value, and Mantid::Kernel::Logger::warning().
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addQuat | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const Kernel::Quat & | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Adds a Kernel::Quat value to the parameter map.
Adds a Quat value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a Quat |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
Definition at line 652 of file ParameterMap.cpp.
References add(), clearPositionSensitiveCaches(), name, pQuat(), and value.
Referenced by addRotationParam().
| void Mantid::Geometry::ParameterMap::addRotationParam | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const double | deg, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Create or adjust "rot" parameter for a component.
Create or adjust "rot" parameter for a component Assumed that name either equals "rotx", "roty" or "rotz" otherwise this method will not add/modify "rot" parameter.
| comp | :: Component |
| name | :: Parameter name |
| deg | :: Parameter value in degrees |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
Definition at line 447 of file ParameterMap.cpp.
References addDouble(), addQuat(), clearPositionSensitiveCaches(), Mantid::Geometry::g_log, get(), name, rot(), rotx(), roty(), rotz(), and Mantid::Kernel::Logger::warning().
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addString | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr, |
||
| const std::string & | pVisible = "true" |
||
| ) |
Adds a std::string value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
| pVisible | :: Whether the parameter should be visible in InstrumentViewer |
Definition at line 611 of file ParameterMap.cpp.
References name, pString(), and value.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| void Mantid::Geometry::ParameterMap::addV3D | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const Kernel::V3D & | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Adds a Kernel::V3D value to the parameter map.
Adds a V3D value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a V3D |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
Definition at line 638 of file ParameterMap.cpp.
References add(), clearPositionSensitiveCaches(), name, pV3D(), and value.
| void Mantid::Geometry::ParameterMap::addV3D | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | value, | ||
| const std::string *const | pDescription = nullptr |
||
| ) |
Adds a Kernel::V3D value to the parameter map.
Adds a V3D value to the parameter map.
| comp | :: Component to which the new parameter is related |
| name | :: Name for the new parameter |
| value | :: Parameter value as a string |
| pDescription | :: a pointer (may be NULL) to a string, containing parameter's description. If provided, the contents of the string is copied to the parameter's memory |
Definition at line 624 of file ParameterMap.cpp.
References add(), clearPositionSensitiveCaches(), name, pV3D(), and value.
Referenced by addPositionCoordinate(), and Mantid::API::ExperimentInfo::populateInstrumentParameters().
| std::string Mantid::Geometry::ParameterMap::asString | ( | ) | const |
Returns a string with all component names, parameter names and values.
Return a string representation of the parameter map.
The format is either: |detID:id-value;param-type;param-name;param-value| for a detector or |comp-name;param-type;param-name;param-value| for other components.
Definition at line 931 of file ParameterMap.cpp.
References Mantid::Geometry::IDetector::getID(), and m_map.
Referenced by diff(), Mantid::Algorithms::CopyInstrumentParameters::exec(), and saveNexus().
|
inline |
access iterators. begin;
Definition at line 278 of file ParameterMap.h.
|
inline |
Definition at line 279 of file ParameterMap.h.
|
inline |
Clears the map.
Definition at line 86 of file ParameterMap.h.
| void Mantid::Geometry::ParameterMap::clearParametersByName | ( | const std::string & | name | ) |
Clear any parameters with the given name.
| name | :: The name of the parameter |
Definition at line 297 of file ParameterMap.cpp.
References clearPositionSensitiveCaches(), m_map, name, PARALLEL_CRITICAL, pos(), and rot().
| void Mantid::Geometry::ParameterMap::clearParametersByName | ( | const std::string & | name, |
| const IComponent * | comp | ||
| ) |
Clear any parameters with the given name for a specified component.
| name | :: The name of the parameter |
| comp | :: The component to clear parameters from |
Definition at line 317 of file ParameterMap.cpp.
References clearPositionSensitiveCaches(), Mantid::Geometry::IComponent::getComponentID(), m_map, name, PARALLEL_CRITICAL, pos(), and rot().
| void Mantid::Geometry::ParameterMap::clearPositionSensitiveCaches | ( | ) |
Clears the location, rotation & bounding box caches.
Definition at line 954 of file ParameterMap.cpp.
References m_cacheLocMap, and m_cacheRotMap.
Referenced by addPositionCoordinate(), addQuat(), addRotationParam(), addV3D(), addV3D(), clearParametersByName(), and clearParametersByName().
| const std::vector< Geometry::ComponentID > & Mantid::Geometry::ParameterMap::componentIds | ( | ) | const |
References Mantid::DataObjects::create().
| size_t Mantid::Geometry::ParameterMap::componentIndex | ( | const Geometry::ComponentID | componentId | ) | const |
Definition at line 1103 of file ParameterMap.cpp.
References m_componentInfo.
Referenced by Mantid::Geometry::Component::index().
| const Geometry::ComponentInfo & Mantid::Geometry::ParameterMap::componentInfo | ( | ) | const |
Only for use by ExperimentInfo. Returns a reference to the ComponentInfo.
Definition at line 1085 of file ParameterMap.cpp.
References hasComponentInfo(), m_componentInfo, and m_instrument.
Referenced by Mantid::Geometry::ObjComponent::getBoundingBox(), Mantid::Geometry::Instrument::getBoundingBox(), Mantid::Geometry::CompAssembly::getBoundingBox(), Mantid::Geometry::GridDetector::getBoundingBox(), Mantid::Geometry::StructuredDetector::getBoundingBox(), Mantid::Geometry::Component::getPos(), Mantid::Geometry::Component::getRelativePos(), Mantid::Geometry::Component::getRelativeRot(), Mantid::Geometry::Component::getRotation(), Mantid::Geometry::Component::getScaleFactor(), Mantid::Geometry::Instrument::makeBeamline(), and Mantid::Geometry::ObjComponent::solidAngle().
| bool Mantid::Geometry::ParameterMap::contains | ( | const IComponent * | comp, |
| const char * | name, | ||
| const char * | type = "" |
||
| ) | const |
Does the named parameter exist for the given component (c-string version)
Avoids having to instantiate temporary std::string in method below when called with a string directly.
| comp | :: The component to be searched as a c-string |
| name | :: The name of the parameter |
| type | :: The type of the component |
Definition at line 677 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_map, and name.
| bool Mantid::Geometry::ParameterMap::contains | ( | const IComponent * | comp, |
| const Parameter & | parameter | ||
| ) | const |
Does the given parameter & component combination exist.
| comp | A pointer to a component |
| parameter | A Parameter object |
Definition at line 698 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_map, and Mantid::Geometry::Parameter::name().
| bool Mantid::Geometry::ParameterMap::contains | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | type = "" |
||
| ) | const |
Does the named parameter exist for the given component and type (std::string version)
Does the named parameter exist for the given component and given type.
| comp | :: The component to be searched |
| name | :: The name of the parameter |
| type | :: The type of the component as a string |
Definition at line 665 of file ParameterMap.cpp.
References contains(), and name.
Referenced by contains(), Mantid::API::ExperimentInfo::getEMode(), Mantid::Geometry::Component::getRelativePos(), Mantid::Geometry::GridDetector::getRelativePosAtXYZ(), Mantid::Geometry::Component::getRelativeRot(), Mantid::Geometry::Component::hasParameter(), Mantid::Geometry::GridDetector::xsize(), Mantid::Geometry::GridDetector::xstart(), Mantid::Geometry::GridDetector::xstep(), Mantid::Geometry::GridDetector::ysize(), Mantid::Geometry::GridDetector::ystart(), Mantid::Geometry::GridDetector::ystep(), Mantid::Geometry::GridDetector::zsize(), Mantid::Geometry::GridDetector::zstart(), and Mantid::Geometry::GridDetector::zstep().
| void Mantid::Geometry::ParameterMap::copyFromParameterMap | ( | const IComponent * | oldComp, |
| const IComponent * | newComp, | ||
| const ParameterMap * | oldPMap | ||
| ) |
Copy pairs (oldComp->id,Parameter) to the m_map assigning the new newComp->id.
| oldComp | :: Old component |
| newComp | :: New component |
| oldPMap | :: Old map corresponding to the Old component |
Definition at line 996 of file ParameterMap.cpp.
References get(), Mantid::Geometry::IComponent::getComponentID(), m_map, and names().
|
private |
Wrapper for ParameterFactory::create to avoid include in header.
Definition at line 1044 of file ParameterMap.cpp.
References Mantid::Geometry::ParameterFactory::create(), and name.
Referenced by forceUnsafeSetMasked().
| size_t Mantid::Geometry::ParameterMap::detectorIndex | ( | const detid_t | detID | ) | const |
Only for use by Detector. Returns a detector index for a detector ID.
Definition at line 1101 of file ParameterMap.cpp.
References Mantid::Geometry::Instrument::detectorIndex(), and m_instrument.
Referenced by Mantid::Geometry::Detector::index().
| const Geometry::DetectorInfo & Mantid::Geometry::ParameterMap::detectorInfo | ( | ) | const |
Only for use by ExperimentInfo. Returns a reference to the DetectorInfo.
Definition at line 1071 of file ParameterMap.cpp.
References hasDetectorInfo(), m_detectorInfo, and m_instrument.
Referenced by Mantid::Geometry::Instrument::makeBeamline().
| const std::string Mantid::Geometry::ParameterMap::diff | ( | const ParameterMap & | rhs, |
| const bool & | firstDiffOnly = false, |
||
| const bool | relative = false, |
||
| const double | doubleTolerance = Kernel::Tolerance |
||
| ) | const |
Output information that helps understanding the mismatch between two parameter maps.
To loop through the difference between two very large parameter map can take time, in which you can a hit to what causes the difference faster setting firstDiffOnly to true
| rhs | A reference to a ParameterMap object to compare it to |
| firstDiffOnly | If true return only first difference found |
| relative | Indicates whether to treat the error as relative or absolute |
| doubleTolerance | The tolerance to use when comparing parameter values of type double |
Definition at line 216 of file ParameterMap.cpp.
References asString(), m_map, name, relErr(), rhs, size(), and std::to_string().
Referenced by Mantid::Algorithms::CompareWorkspaces::checkInstrument(), and operator==().
|
inline |
Returns true if the map is empty, false otherwise.
Definition at line 57 of file ParameterMap.h.
Referenced by Mantid::Geometry::InstrumentVisitor::walkInstrument().
|
inline |
access iterators. end;
Definition at line 281 of file ParameterMap.h.
|
inline |
Definition at line 282 of file ParameterMap.h.
| void Mantid::Geometry::ParameterMap::forceUnsafeSetMasked | ( | const IComponent * | comp, |
| bool | value | ||
| ) |
Force adding masking information.
ONLY FOR INTERNAL USE by class Instrument.
ParameterMap usually rejects "legacy style" masking information since it is now stored in DetectorInfo. However, for the purpose of writing files class Instrument needs to insert masking information. This method is only for internal use by class Instrument. ParameterMaps modified by this method are only for use as a temporary.
Definition at line 582 of file ParameterMap.cpp.
References create(), Mantid::Geometry::IComponent::getComponentID(), m_map, name, pBool(), and value.
| std::shared_ptr< Parameter > Mantid::Geometry::ParameterMap::get | ( | const IComponent * | comp, |
| const char * | name, | ||
| const char * | type = "" |
||
| ) | const |
Get a parameter with a given name and type (c-string version)
Return a named parameter of a given type.
Avoids allocating std::string temporaries
| comp | :: Component to which parameter is related |
| name | :: Parameter name |
| type | :: An optional type string |
Definition at line 734 of file ParameterMap.cpp.
References m_map, name, and positionOf().
| Parameter_sptr Mantid::Geometry::ParameterMap::get | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | type = "" |
||
| ) | const |
Get a parameter with a given name and type (std::string version)
Return a named parameter of a given type.
| comp | :: Component to which parameter is related |
| name | :: Parameter name |
| type | :: An optional type string |
Definition at line 723 of file ParameterMap.cpp.
Referenced by addPositionCoordinate(), addRotationParam(), copyFromParameterMap(), get(), getDescription(), Mantid::API::ExperimentInfo::getEMode(), Mantid::Geometry::Component::getParamDescription(), Mantid::Geometry::Component::getParameter(), Mantid::Geometry::Component::getParamShortDescription(), getRecursive(), Mantid::Geometry::Component::getRelativePos(), Mantid::Geometry::GridDetectorPixel::getRelativePos(), Mantid::Geometry::GridDetector::getRelativePosAtXYZ(), Mantid::Geometry::Component::getRelativeRot(), Mantid::Geometry::Component::getScaleFactor(), getShortDescription(), getString(), Mantid::Geometry::InstrumentVisitor::InstrumentVisitor(), Mantid::Geometry::GridDetector::xsize(), Mantid::Geometry::GridDetector::xstart(), Mantid::Geometry::GridDetector::xstep(), Mantid::Geometry::GridDetector::ysize(), Mantid::Geometry::GridDetector::ystart(), Mantid::Geometry::GridDetector::ystep(), Mantid::Geometry::GridDetector::zsize(), Mantid::Geometry::GridDetector::zstart(), and Mantid::Geometry::GridDetector::zstep().
| Parameter_sptr Mantid::Geometry::ParameterMap::getByType | ( | const IComponent * | comp, |
| const std::string & | type | ||
| ) | const |
Finds the parameter in the map via the parameter type.
Look for a parameter in the given component by the type of the parameter.
m_map.empty()
Definition at line 809 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), and m_map.
Referenced by getRecursiveByType().
| bool Mantid::Geometry::ParameterMap::getCachedLocation | ( | const IComponent * | comp, |
| Kernel::V3D & | location | ||
| ) | const |
Attempts to retrieve a location from the location cache.
| comp | :: The Component to find the location of |
| location | :: If the location is found it's value will be set here |
Definition at line 970 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), and m_cacheLocMap.
Referenced by Mantid::Geometry::CompAssembly::getPos(), Mantid::Geometry::Component::getPos(), and Mantid::Geometry::ObjCompAssembly::getPos().
| bool Mantid::Geometry::ParameterMap::getCachedRotation | ( | const IComponent * | comp, |
| Kernel::Quat & | rotation | ||
| ) | const |
Attempts to retrieve a rotation from the rotation cache.
| comp | :: The Component to find the rotation of |
| rotation | :: If the rotation is found it's value will be set here |
Definition at line 985 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_cacheRotMap, and rotation.
Referenced by Mantid::Geometry::Component::getPos(), Mantid::Geometry::CompAssembly::getRotation(), Mantid::Geometry::Component::getRotation(), and Mantid::Geometry::ObjCompAssembly::getRotation().
| const std::string Mantid::Geometry::ParameterMap::getDescription | ( | const std::string & | compName, |
| const std::string & | name | ||
| ) | const |
Get the component description by name.
| compName | :: The name of the component |
| name | :: The name of the parameter |
Definition at line 140 of file ParameterMap.cpp.
|
inline |
Returns a double parameter as vector's first element if exists and an empty vector if it doesn't.
Definition at line 237 of file ParameterMap.h.
References name.
Referenced by Mantid::WorkflowAlgorithms::SofTwoThetaTOF::clarifyAngleStep().
| const std::vector< std::string > & Mantid::Geometry::ParameterMap::getParameterFilenames | ( | ) | const |
Returns a list of all the parameter files loaded.
Definition at line 1036 of file ParameterMap.cpp.
References m_parameterFileNames.
Referenced by Mantid::API::ExperimentInfo::toString().
| Parameter_sptr Mantid::Geometry::ParameterMap::getRecursive | ( | const IComponent * | comp, |
| const char * | name, | ||
| const char * | type = "" |
||
| ) | const |
Use get() recursively to see if can find param in all parents of comp and given type (const char type)
Find a parameter by name, recursively going up the component tree to higher parents.
| comp | :: The component to start the search with |
| name | :: Parameter name |
| type | :: An optional type string |
Definition at line 868 of file ParameterMap.cpp.
References get(), Mantid::Geometry::IComponent::getComponentID(), Mantid::Geometry::IComponent::getParent(), and name.
| Parameter_sptr Mantid::Geometry::ParameterMap::getRecursive | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| const std::string & | type = "" |
||
| ) | const |
Use get() recursively to see if can find param in all parents of comp and given type (std::string version)
Find a parameter by name, recursively going up the component tree to higher parents.
| comp | :: The component to start the search with |
| name | :: Parameter name |
| type | :: An optional type string |
Definition at line 855 of file ParameterMap.cpp.
References getRecursive(), and name.
Referenced by Mantid::Algorithms::DetectorEfficiencyCor::correctForEfficiency(), Mantid::API::TimeAtSampleStrategyIndirect::getEfixed(), Mantid::API::ExperimentInfo::getEFixedForIndirect(), Mantid::Geometry::Component::getFittingParameter(), Mantid::Geometry::Component::getParamDescription(), Mantid::Geometry::Component::getParameter(), Mantid::Geometry::Component::getParamShortDescription(), getRecursive(), getString(), and Mantid::Geometry::Component::setDescription().
| Parameter_sptr Mantid::Geometry::ParameterMap::getRecursiveByType | ( | const IComponent * | comp, |
| const std::string & | type | ||
| ) | const |
Looks recursively upwards in the component tree for the first instance of a parameter with a specified type.
Looks recursively upwards in the component tree for the first instance of a component with a matching type.
| comp | :: The component to start the search with |
| type | :: Parameter type |
Definition at line 834 of file ParameterMap.cpp.
References getByType().
| const std::string Mantid::Geometry::ParameterMap::getShortDescription | ( | const std::string & | compName, |
| const std::string & | name | ||
| ) | const |
Get the component tooltip by name.
Get the component short description by name.
| compName | :: The name of the component |
| name | :: The name of the parameter |
Definition at line 162 of file ParameterMap.cpp.
| std::string Mantid::Geometry::ParameterMap::getString | ( | const IComponent * | comp, |
| const std::string & | name, | ||
| bool | recursive = false |
||
| ) | const |
Return the value of a parameter as a string.
| comp | :: Component to which parameter is related |
| name | :: Parameter name |
| recursive | :: Whether to travel up the instrument tree if not found at this level |
Definition at line 892 of file ParameterMap.cpp.
References get(), getRecursive(), and name.
Referenced by Mantid::API::ExperimentInfo::getLog(), and Mantid::API::ExperimentInfo::getLogAsSingleValue().
|
inline |
Returns a string parameter as vector's first element if exists and an empty vector if it doesn't.
Definition at line 227 of file ParameterMap.h.
References name.
|
inline |
Get the values of a given parameter of all the components that have the name: compName.
| The | parameter type |
| compName | :: The name of the component |
| name | :: The name of the parameter |
Definition at line 205 of file ParameterMap.h.
References name.
|
inline |
Returns a Kernel::V3D parameter as vector's first element if exists and an empty vector if it doesn't.
Definition at line 247 of file ParameterMap.h.
References name.
| bool Mantid::Geometry::ParameterMap::hasComponentInfo | ( | const Instrument * | instrument | ) | const |
Only for use by ExperimentInfo.
Returns returns true if this instrument contains a ComponentInfo.
Definition at line 1064 of file ParameterMap.cpp.
References m_componentInfo, and m_instrument.
Referenced by componentInfo(), Mantid::Geometry::Instrument::getBoundingBox(), Mantid::Geometry::Component::hasComponentInfo(), Mantid::Geometry::Instrument::makeBeamline(), and mutableComponentInfo().
| bool Mantid::Geometry::ParameterMap::hasDetectorInfo | ( | const Instrument * | instrument | ) | const |
Only for use by ExperimentInfo.
Returns returns true if this instrument contains a DetectorInfo.
The instrument argument is needed for the special case of having a neutronic and* a physical instrument. Instrument uses the same parameter map for both, but the DetectorInfo is only for the neutronic instrument.
Definition at line 1055 of file ParameterMap.cpp.
References m_detectorInfo, and m_instrument.
Referenced by detectorInfo(), Mantid::Geometry::Detector::hasDetectorInfo(), and mutableDetectorInfo().
| Geometry::ComponentInfo & Mantid::Geometry::ParameterMap::mutableComponentInfo | ( | ) |
Only for use by ExperimentInfo. Returns a reference to the ComponentInfo.
Definition at line 1093 of file ParameterMap.cpp.
References hasComponentInfo(), m_componentInfo, and m_instrument.
| Geometry::DetectorInfo & Mantid::Geometry::ParameterMap::mutableDetectorInfo | ( | ) |
Only for use by ExperimentInfo. Returns a reference to the DetectorInfo.
Definition at line 1078 of file ParameterMap.cpp.
References hasDetectorInfo(), m_detectorInfo, and m_instrument.
| std::set< std::string > Mantid::Geometry::ParameterMap::names | ( | const IComponent * | comp | ) | const |
Returns a set with all parameter names for component.
Returns a set with all the parameter names for the given component.
| comp | :: A pointer to the component of interest |
Definition at line 909 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), and m_map.
Referenced by copyFromParameterMap(), Mantid::Geometry::Component::getParameterNames(), and Mantid::Geometry::Component::getParameterNamesByComponent().
| bool Mantid::Geometry::ParameterMap::operator!= | ( | const ParameterMap & | rhs | ) | const |
Inquality comparison operator.
Compares the values in this object with that given for inequality The order of the values in the map is not important.
| rhs | A reference to a ParameterMap object to compare it to |
Definition at line 123 of file ParameterMap.cpp.
References operator==().
|
private |
Assignment operator.
| bool Mantid::Geometry::ParameterMap::operator== | ( | const ParameterMap & | rhs | ) | const |
Equality comparison operator.
Compares the values in this object with that given for equality The order of the values in the map is not important.
| rhs | A reference to a ParameterMap object to compare it to |
Definition at line 131 of file ParameterMap.cpp.
Referenced by operator!=().
|
static |
Definition at line 106 of file ParameterMap.cpp.
Referenced by addBool(), addBool(), and forceUnsafeSetMasked().
|
static |
Definition at line 102 of file ParameterMap.cpp.
Referenced by addDouble(), and addDouble().
|
static |
Definition at line 104 of file ParameterMap.cpp.
|
static |
Return string to be used in the map.
Return string to be inserted into the parameter map.
Definition at line 84 of file ParameterMap.cpp.
Referenced by addPositionCoordinate(), clearParametersByName(), clearParametersByName(), Mantid::Geometry::Instrument::makeLegacyParameterMap(), and Mantid::API::ExperimentInfo::populateInstrumentParameters().
|
private |
internal function to get position of the parameter in the parameter map
Return an iterator pointing to a named parameter of a given type.
| comp | :: Component to which parameter is related |
| name | :: Parameter name |
| type | :: An optional type string. If empty, any type is returned |
Definition at line 753 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_map, and name.
|
private |
const version of the internal function to get position of the parameter in the parameter map
Return a const iterator pointing to a named parameter of a given type.
| comp | :: Component to which parameter is related |
| name | :: Parameter name |
| type | :: An optional type string. If empty, any type is returned |
Definition at line 782 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_map, and name.
|
static |
Definition at line 86 of file ParameterMap.cpp.
Referenced by addPositionCoordinate().
|
static |
Definition at line 88 of file ParameterMap.cpp.
Referenced by addPositionCoordinate().
|
static |
Definition at line 90 of file ParameterMap.cpp.
Referenced by addPositionCoordinate().
|
static |
Definition at line 112 of file ParameterMap.cpp.
Referenced by addQuat().
|
static |
Definition at line 108 of file ParameterMap.cpp.
Referenced by addString().
|
static |
Definition at line 110 of file ParameterMap.cpp.
|
private |
calculate relative error for use in diff
Function which calculates relative error between two values and analyses if this error is within the limits requested.
When the absolute value of the difference is smaller then the value of the error requested, absolute error is used instead of relative error.
| x1 | – first value to check difference |
| x2 | – second value to check difference |
| errorVal | – the value of the error, to check against. Should be large then 0 |
Definition at line 192 of file ParameterMap.cpp.
Referenced by diff().
|
static |
Definition at line 93 of file ParameterMap.cpp.
Referenced by addRotationParam(), clearParametersByName(), clearParametersByName(), and Mantid::Geometry::Instrument::makeLegacyParameterMap().
|
static |
Definition at line 95 of file ParameterMap.cpp.
Referenced by addRotationParam().
|
static |
Definition at line 97 of file ParameterMap.cpp.
Referenced by addRotationParam().
|
static |
Definition at line 99 of file ParameterMap.cpp.
Referenced by addRotationParam().
| void Mantid::Geometry::ParameterMap::saveNexus | ( | Nexus::File * | file, |
| const std::string & | group | ||
| ) | const |
Persist a representation of the Parameter map to the open Nexus file.
Save the object to an open NeXus file.
| file | :: open NeXus file |
| group | :: name of the group to create |
Definition at line 1016 of file ParameterMap.cpp.
References asString(), and group.
|
static |
Definition at line 115 of file ParameterMap.cpp.
Referenced by Mantid::Geometry::Component::getScaleFactor(), and Mantid::Geometry::Instrument::makeLegacyParameterMap().
| void Mantid::Geometry::ParameterMap::setCachedLocation | ( | const IComponent * | comp, |
| const Kernel::V3D & | location | ||
| ) | const |
Sets a cached location on the location cache.
| comp | :: The Component to set the location of |
| location | :: The location |
Definition at line 962 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), and m_cacheLocMap.
Referenced by Mantid::Geometry::CompAssembly::getPos(), and Mantid::Geometry::ObjCompAssembly::getPos().
| void Mantid::Geometry::ParameterMap::setCachedRotation | ( | const IComponent * | comp, |
| const Kernel::Quat & | rotation | ||
| ) | const |
Sets a cached rotation on the rotation cache.
| comp | :: The Component to set the rotation of |
| rotation | :: The rotation as a quaternion |
Definition at line 977 of file ParameterMap.cpp.
References Mantid::Geometry::IComponent::getComponentID(), m_cacheRotMap, and rotation.
Referenced by Mantid::Geometry::CompAssembly::getRotation(), and Mantid::Geometry::ObjCompAssembly::getRotation().
| void Mantid::Geometry::ParameterMap::setInstrument | ( | const Instrument * | instrument | ) |
Only for use by Instrument. Sets the pointer to the owning instrument.
Definition at line 1108 of file ParameterMap.cpp.
References Mantid::Geometry::Component::isParametrized(), m_componentInfo, m_detectorInfo, m_instrument, and Mantid::Geometry::Instrument::makeBeamline().
|
inline |
|
inline |
method swaps two parameter maps contents each other.
All caches contents is nullified (TO DO: it can be efficiently swapped too)
Definition at line 92 of file ParameterMap.h.
|
private |
internal cache map instance for cached position values
Definition at line 315 of file ParameterMap.h.
Referenced by clearPositionSensitiveCaches(), getCachedLocation(), and setCachedLocation().
|
private |
internal cache map instance for cached rotation values
Definition at line 317 of file ParameterMap.h.
Referenced by clearPositionSensitiveCaches(), getCachedRotation(), and setCachedRotation().
|
private |
Pointer to the ComponentInfo wrapper.
NULL unless the instrument is associated with an ExperimentInfo object.
Definition at line 325 of file ParameterMap.h.
Referenced by componentIndex(), componentInfo(), hasComponentInfo(), mutableComponentInfo(), ParameterMap(), and setInstrument().
|
private |
Pointer to the DetectorInfo wrapper.
NULL unless the instrument is associated with an ExperimentInfo object.
Definition at line 321 of file ParameterMap.h.
Referenced by detectorInfo(), hasDetectorInfo(), mutableDetectorInfo(), ParameterMap(), and setInstrument().
|
private |
Pointer to the owning instrument for translating detector IDs into detector indices when accessing the DetectorInfo object.
If the workspace distinguishes between a neutronic instrument and a physical instrument the owning instrument is the neutronic one.
Definition at line 331 of file ParameterMap.h.
Referenced by componentInfo(), detectorIndex(), detectorInfo(), hasComponentInfo(), hasDetectorInfo(), mutableComponentInfo(), mutableDetectorInfo(), ParameterMap(), and setInstrument().
|
private |
internal parameter map instance
Definition at line 313 of file ParameterMap.h.
Referenced by add(), asString(), clearParametersByName(), clearParametersByName(), contains(), contains(), copyFromParameterMap(), diff(), forceUnsafeSetMasked(), get(), getByType(), getDescription(), getShortDescription(), names(), positionOf(), and positionOf().
|
private |
internal list of parameter files loaded
Definition at line 310 of file ParameterMap.h.
Referenced by addParameterFilename(), and getParameterFilenames().