|
Mantid
|
Defines the properties of a named SampleEnvironment setup. More...
#include <SampleEnvironmentSpec.h>
Public Types | |
| using | ComponentList = std::vector< Geometry::IObject_const_sptr > |
| using | ContainerIndex = std::unordered_map< std::string, Geometry::Container_const_sptr > |
Public Member Functions | |
| void | addComponent (const Geometry::IObject_const_sptr &component) |
| Add a non-can component to the specification. More... | |
| void | addContainer (const Geometry::Container_const_sptr &can) |
| Adds a can definition to the known list. More... | |
| Geometry::SampleEnvironment_uptr | buildEnvironment (const std::string &canID) const |
| Build a new SampleEnvironment instance from a given can ID. More... | |
| Geometry::Container_const_sptr | findContainer (const std::string &id) const |
| Find a can by id string. More... | |
| const std::string & | name () const |
| size_t | ncans () const |
| size_t | ncomponents () const |
| SampleEnvironmentSpec (std::string name) | |
| Constructor. More... | |
Private Attributes | |
| ContainerIndex | m_cans |
| ComponentList | m_components |
| std::string | m_name |
Defines the properties of a named SampleEnvironment setup.
It is used in conjunction with the SampleEnvionmentBuilder to construct given configuration of SampleEnvironment. It can be read from XML by a SampleEnvironmentParser.
Definition at line 26 of file SampleEnvironmentSpec.h.
| using Mantid::DataHandling::SampleEnvironmentSpec::ComponentList = std::vector<Geometry::IObject_const_sptr> |
Definition at line 30 of file SampleEnvironmentSpec.h.
| using Mantid::DataHandling::SampleEnvironmentSpec::ContainerIndex = std::unordered_map<std::string, Geometry::Container_const_sptr> |
Definition at line 29 of file SampleEnvironmentSpec.h.
| Mantid::DataHandling::SampleEnvironmentSpec::SampleEnvironmentSpec | ( | std::string | name | ) |
Constructor.
| name | The string name of the specification |
Definition at line 15 of file SampleEnvironmentSpec.cpp.
| void Mantid::DataHandling::SampleEnvironmentSpec::addComponent | ( | const Geometry::IObject_const_sptr & | component | ) |
Add a non-can component to the specification.
| component | A pointer to a Object |
Definition at line 68 of file SampleEnvironmentSpec.cpp.
References m_components.
Referenced by Mantid::DataHandling::SampleEnvironmentSpecParser::loadFullSpecification(), and Mantid::DataHandling::SampleEnvironmentSpecParser::parseAndAddComponents().
| void Mantid::DataHandling::SampleEnvironmentSpec::addContainer | ( | const Geometry::Container_const_sptr & | can | ) |
Adds a can definition to the known list.
| can | A pointer to a Container object |
| std::invalid::argument | if the id is empty |
Definition at line 56 of file SampleEnvironmentSpec.cpp.
References m_cans.
Referenced by Mantid::DataHandling::SampleEnvironmentSpecParser::loadFullSpecification(), and Mantid::DataHandling::SampleEnvironmentSpecParser::parseAndAddContainers().
| Geometry::SampleEnvironment_uptr Mantid::DataHandling::SampleEnvironmentSpec::buildEnvironment | ( | const std::string & | canID | ) | const |
Build a new SampleEnvironment instance from a given can ID.
Definition at line 43 of file SampleEnvironmentSpec.cpp.
References findContainer(), m_components, and m_name.
Referenced by Mantid::DataHandling::SampleEnvironmentFactory::create().
| Geometry::Container_const_sptr Mantid::DataHandling::SampleEnvironmentSpec::findContainer | ( | const std::string & | id | ) | const |
Find a can by id string.
| id | The string id to search for |
| std::invalid_argument |
Definition at line 23 of file SampleEnvironmentSpec.cpp.
References m_cans.
Referenced by buildEnvironment().
|
inline |
Definition at line 35 of file SampleEnvironmentSpec.h.
|
inline |
Definition at line 37 of file SampleEnvironmentSpec.h.
Referenced by Mantid::DataHandling::SampleEnvironmentSpecParser::loadFullSpecification().
|
inline |
Definition at line 39 of file SampleEnvironmentSpec.h.
|
private |
Definition at line 49 of file SampleEnvironmentSpec.h.
Referenced by addContainer(), and findContainer().
|
private |
Definition at line 50 of file SampleEnvironmentSpec.h.
Referenced by addComponent(), and buildEnvironment().
|
private |
Definition at line 48 of file SampleEnvironmentSpec.h.
Referenced by buildEnvironment().