|
Mantid
|
Creates an instrument data from a XML instrument description file. More...
#include <InstrumentDefinitionParser.h>
Classes | |
| struct | IdList |
| Structure for holding detector IDs. More... | |
| struct | SphVec |
| Stripped down vector that holds position in terms of spherical coordinates, Needed when processing instrument definition files that use the 'Ariel format'. More... | |
Public Types | |
| enum | CachingOption { NoneApplied , ReadGeomCache , ReadFallBack , WroteGeomCache , WroteCacheTemp } |
| Caching. More... | |
Public Member Functions | |
| const std::string | createVTPFileName () |
| creates a vtp filename from a given xml filename | |
| Kernel::V3D | getAbsolutPositionInCompCoorSys (Geometry::ICompAssembly *comp, Kernel::V3D) |
| return absolute position of point which is set relative to the coordinate system of the input component | |
| CachingOption | getAppliedCachingOption () const |
| Get the applied caching option. | |
| std::string | getMangledName () |
| Handle used in the singleton constructor for instrument file should append the value file sha-1 checksum to determine if it is already in memory so that changes to the instrument file will cause file to be reloaded. | |
| InstrumentDefinitionParser () | |
| Default Constructor - not very functional in this state. | |
| InstrumentDefinitionParser (const IDFObject_const_sptr &xmlFile, const IDFObject_const_sptr &expectedCacheFile, const std::string &instName, const std::string &xmlText) | |
| Construct the XML parser based on an IDF xml and cached vtp file objects. | |
| InstrumentDefinitionParser (const std::string &filename, const std::string &instName, const std::string &xmlText) | |
| Constructor. | |
| std::shared_ptr< Instrument > | parseXML (Kernel::ProgressBase *progressReporter) |
| Parse XML contents. | |
| void | saveDOM_Tree (const std::string &outFilename) |
| Save DOM tree to xml file. | |
| void | setComponentLinks (std::shared_ptr< Geometry::Instrument > &instrument, Poco::XML::Element *pRootElem, Kernel::ProgressBase *progress=nullptr, const std::string &requestedDate=std::string()) |
| Add/overwrite any parameters specified in instrument with param values specified in <component-link> XML elements. | |
| ~InstrumentDefinitionParser ()=default | |
Static Public Member Functions | |
| static std::string | getNameOfLocationElement (const Poco::XML::Element *pElem, const Poco::XML::Element *pCompElem) |
| get name of location element | |
| static Poco::XML::Element * | getParentComponent (const Poco::XML::Element *pLocElem) |
| Get parent component element of location element. | |
Private Member Functions | |
| void | adjust (Poco::XML::Element *pElem, const std::map< std::string, bool > &isTypeAssembly, std::map< std::string, Poco::XML::Element * > &getTypeElement) |
| Takes as input a <type> element containing a <combine-components-into-one-shape>, and adjust the <type> element by replacing its containing <component> elements with <cuboid>'s (note for now this will only work for <cuboid>'s and when necessary this can be extended). | |
| void | adjustTypesContainingCombineComponentsElement (ShapeFactory &shapeCreator, const std::string &filename, const std::vector< Poco::XML::Element * > &typeElems, size_t numberOfTypes) |
| Adjust each type which contains a <combine-components-into-one-shape> element. | |
| void | appendAssembly (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, IdList &idList) |
| Add XML element to parent assuming the element contains other component elements. | |
| void | appendLeaf (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, IdList &idList) |
| Add XML element to parent assuming the element contains no other component elements. | |
| void | appendLocations (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElems, const Poco::XML::Element *pCompElem, IdList &idList) |
| Append <locations> in a locations element. | |
| void | applyCache (const IDFObject_const_sptr &cacheToApply) |
| Reads from a cache file. | |
| double | attrToDouble (const Poco::XML::Element *pElem, const std::string &name) |
| return 0 if the attribute doesn't exist. | |
| std::vector< std::string > | buildExcludeList (const Poco::XML::Element *const location) |
| void | checkComponentContainsLocationElement (Poco::XML::Element *pElem, const std::string &filename) const |
| Check component has a <location> or <locations> element. | |
| void | checkIdListExistsAndDefinesEnoughIDs (const IdList &idList, Poco::XML::Element *pElem, const std::string &filename) const |
| Check IdList. | |
| void | collateTypeInformation (const std::string &filename, const std::vector< Poco::XML::Element * > &typeElems, ShapeFactory &shapeCreator) |
| Collect some information about types for later use. | |
| Poco::AutoPtr< Poco::XML::Document > | convertLocationsElement (const Poco::XML::Element *pElem) |
| Take as input a <locations> element. | |
| void | createDetectorOrMonitor (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, const std::string &filename, IdList &idList, const std::string &category) |
| void | createGridDetector (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, const std::string &filename, const Poco::XML::Element *pType) |
| void | createNeutronicInstrument () |
| If appropriate, creates a second instrument containing neutronic detector positions. | |
| void | createRectangularDetector (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, const std::string &filename, const Poco::XML::Element *pType) |
| void | createShapeIfTypeIsNotAnAssembly (Mantid::Geometry::ShapeFactory &shapeCreator, size_t iType, Poco::XML::Element *pTypeElem, const std::string &typeName) |
| Record type as an assembly if it contains a component, otherwise create a shape for it. | |
| void | createStructuredDetector (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, const Poco::XML::Element *pCompElem, const std::string &filename, const Poco::XML::Element *pType) |
| void | createVectorOfElementsContainingAParameterElement (Poco::XML::Element *pRootElem) |
| Create a vector of elements which contain a <parameter> | |
| Poco::AutoPtr< Poco::XML::Document > | getDocument () |
| lazy loads the document and returns a pointer | |
| Kernel::V3D | getRelativeTranslation (const Geometry::IComponent *comp, const Poco::XML::Element *pElem, const double angleConvertConst, const bool deltaOffsets=false) |
| Calculate the position of comp relative to its parent from info provided by <location> element. | |
| std::string | getShapeCoorSysComp (Geometry::ICompAssembly *parent, const Poco::XML::Element *pLocElem, std::map< std::string, Poco::XML::Element * > &getTypeElement, Geometry::ICompAssembly *&endAssembly) |
| This method returns the parent appended which its child components and also name of type of the last child component. | |
| Poco::XML::Element * | getShapeElement (const Poco::XML::Element *pElem, const std::string &name) |
| Return a subelement of an XML element. | |
| void | getTypeAndComponentPointers (const Poco::XML::Element *pRootElem, std::vector< Poco::XML::Element * > &typeElems, std::vector< Poco::XML::Element * > &compElems) const |
| Populate vectors of pointers to type and component xml elements. | |
| void | initialise (const std::string &filename, const std::string &instName, const std::string &xmlText, const std::string &vtpFilename) |
| shared Constructor logic | |
| bool | isAssembly (const std::string &) const |
| Return true if assembly, false if not assembly and throws exception if string not in assembly. | |
| void | makeXYplaneFaceComponent (Geometry::IComponent *&in, const Geometry::ObjComponent *facing) |
| Make the shape defined in 1st argument face the component in the second argument. | |
| void | makeXYplaneFaceComponent (Geometry::IComponent *&in, const Kernel::V3D &facingPoint) |
| Make the shape defined in 1st argument face the position in the second argument. | |
| Kernel::V3D | parseFacingElementToV3D (Poco::XML::Element *pElem) |
| Parse position of facing element to V3D. | |
| void | parseLocationsForEachTopLevelComponent (Kernel::ProgressBase *progressReporter, const std::string &filename, const std::vector< Poco::XML::Element * > &compElems) |
| Aggregate locations and IDs for components. | |
| Kernel::V3D | parsePosition (Poco::XML::Element *pElem) |
| Get position coordinates from XML element. | |
| void | populateIdList (Poco::XML::Element *pE, IdList &idList) |
| Method for populating IdList. | |
| void | readDefaults (Poco::XML::Element *defaults) |
| Reads the contents of the <defaults> element to set member variables,. | |
| void | setFacing (Geometry::IComponent *comp, const Poco::XML::Element *pElem) |
| Set facing of comp as specified in XML facing element. | |
| void | setLocation (Geometry::IComponent *comp, const Poco::XML::Element *pElem, const double angleConvertConst, const bool deltaOffsets=false) |
| Set location (position) of comp as specified in XML location element. | |
| void | setLogfile (const Geometry::IComponent *comp, const Poco::XML::Element *pElem, InstrumentParameterCache &logfileCache, const std::string &requestedDate=std::string()) |
| Set parameter/logfile info (if any) associated with component. | |
| void | setSideBySideViewLocation (Geometry::IComponent *comp, const Poco::XML::Element *pCompElem) |
| Set location (position) of comp as specified in XML side-by-side-view-location element. | |
| CachingOption | setupGeometryCache () |
| Reads in or creates the geometry cache ('vtp') file. | |
| void | setValidityRange (const Poco::XML::Element *pRootElem) |
| Check the validity range and add it to the instrument object. | |
| void | throwIfTypeNameNotUnique (const std::string &filename, const std::string &typeName) const |
| Throw exception if type name is not unique in the IDF. | |
| std::string | translateRotateXMLcuboid (Geometry::ICompAssembly *comp, const Poco::XML::Element *cuboidEle, const std::string &cuboidName) |
| Returns a translated and rotated <cuboid> element. | |
| std::string | translateRotateXMLcuboid (Geometry::ICompAssembly *comp, const std::string &cuboidXML, const std::string &cuboidName) |
| Returns a translated and rotated <cuboid> element. | |
| CachingOption | writeAndApplyCache (IDFObject_const_sptr firstChoiceCache, IDFObject_const_sptr fallBackCache) |
| Write out a cache file. | |
Private Attributes | |
| std::map< std::string, Poco::XML::Element * > | getTypeElement |
| map which holds names of types and pointers to these type for fast retrieval in code | |
| std::map< std::string, bool > | isTypeAssembly |
| map which holds names of types and whether or not they are categorized as being assemblies, which means whether the type element contains component elements | |
| double | m_angleConvertConst |
| when this const equals 1 it means that angle=degree (default) is set in IDF otherwise if this const equals 180/pi it means that angle=radian is set in IDF | |
| IDFObject_const_sptr | m_cacheFile |
| Input vtp file. | |
| CachingOption | m_cachingOption |
| Caching applied. | |
| Kernel::V3D | m_defaultFacing |
| Hold default facing position. | |
| bool | m_deltaOffsets |
| Flag to indicate whether offsets given in spherical coordinates are to be added to the current position (true) or are a vector from the current position (false, default) | |
| std::vector< Geometry::ObjComponent * > | m_facingComponent |
| Container to hold all detectors and monitors added to the instrument. | |
| std::vector< Poco::XML::Element * > | m_hasParameterElement |
| Holds all the xml elements that have a <parameter> child element. | |
| bool | m_hasParameterElement_beenSet |
| has m_hasParameterElement been set - used when public method setComponentLinks is used | |
| bool | m_haveDefaultFacing |
| True if defaults->components-are-facing is set in instrument def. file. | |
| bool | m_indirectPositions |
| Flag to indicate whether IDF contains physical & neutronic positions. | |
| std::string | m_instName |
| Name of the instrument. | |
| std::shared_ptr< Geometry::Instrument > | m_instrument |
| For convenience added pointer to instrument here. | |
| std::map< Geometry::IComponent *, Poco::XML::Element * > | m_neutronicPos |
| A map containing the neutronic position for each detector. | |
| Poco::AutoPtr< Poco::XML::Document > | m_pDoc |
| XML document is lazy loaded. | |
| bool | m_sideBySideViewLocation_exists |
| Store if xml text contains side-by-side-view-location string. | |
| std::map< const Geometry::IComponent *, SphVec > | m_tempPosHolder |
| Map to store positions of parent components in spherical coordinates. | |
| IDFObject_const_sptr | m_xmlFile |
| Input xml file. | |
| std::map< std::string, std::shared_ptr< Geometry::IObject > > | mapTypeNameToShape |
| map which maps the type name to a shared pointer to a geometric shape | |
Creates an instrument data from a XML instrument description file.
Definition at line 43 of file InstrumentDefinitionParser.h.
Caching.
| Enumerator | |
|---|---|
| NoneApplied | |
| ReadGeomCache | |
| ReadFallBack | |
| WroteGeomCache | |
| WroteCacheTemp | |
Definition at line 52 of file InstrumentDefinitionParser.h.
| Mantid::Geometry::InstrumentDefinitionParser::InstrumentDefinitionParser | ( | ) |
Default Constructor - not very functional in this state.
Definition at line 65 of file InstrumentDefinitionParser.cpp.
References initialise().
| Mantid::Geometry::InstrumentDefinitionParser::InstrumentDefinitionParser | ( | const std::string & | filename, |
| const std::string & | instName, | ||
| const std::string & | xmlText | ||
| ) |
Constructor.
| filename | :: IDF .xml path (full). This is needed mostly to find the instrument geometry cache. |
| instName | :: name of the instrument |
| xmlText | :: XML contents of IDF |
Definition at line 78 of file InstrumentDefinitionParser.cpp.
References initialise().
| Mantid::Geometry::InstrumentDefinitionParser::InstrumentDefinitionParser | ( | const IDFObject_const_sptr & | xmlFile, |
| const IDFObject_const_sptr & | expectedCacheFile, | ||
| const std::string & | instName, | ||
| const std::string & | xmlText | ||
| ) |
Construct the XML parser based on an IDF xml and cached vtp file objects.
| xmlFile | :: The xml file, here wrapped in a IDFObject |
| expectedCacheFile | :: Expected vtp cache file |
| instName | :: Instrument name |
| xmlText | :: XML contents of IDF |
Definition at line 94 of file InstrumentDefinitionParser.cpp.
References initialise(), and m_cacheFile.
|
default |
|
private |
Takes as input a <type> element containing a <combine-components-into-one-shape>, and adjust the <type> element by replacing its containing <component> elements with <cuboid>'s (note for now this will only work for <cuboid>'s and when necessary this can be extended).
| pElem | :: Poco::XML <type> element that we want to adjust |
| isTypeAssembly | [in] :: tell whether any other type, but the special one treated here, is assembly or not |
| getTypeElement | [in] :: contain pointers to all types but the onces treated here |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 2634 of file InstrumentDefinitionParser.cpp.
References getParentComponent(), getShapeCoorSysComp(), getTypeElement, isTypeAssembly, m_angleConvertConst, setLocation(), translateRotateXMLcuboid(), and UNUSED_ARG.
Referenced by adjustTypesContainingCombineComponentsElement().
|
private |
Adjust each type which contains a <combine-components-into-one-shape> element.
"Adjust" (see adjust method) each type which contains a <combine-components-into-one-shape> element
| shapeCreator | :: Factory for creating a shape |
| filename | :: Name of the IDF file |
| typeElems | :: Vector of pointers to type elements |
| numberOfTypes | :: Total number of type elements |
Definition at line 459 of file InstrumentDefinitionParser.cpp.
References adjust(), Mantid::Geometry::ShapeFactory::createShape(), getTypeElement, isTypeAssembly, mapTypeNameToShape, and throwIfTypeNameNotUnique().
Referenced by collateTypeInformation().
|
private |
Add XML element to parent assuming the element contains other component elements.
Assumes second argument is a XML location element and its parent is a component element which is assigned to be an assembly.
This method appends the parent component element of the location element to the CompAssembly passed as the 1st arg. Note this method may call itself, i.e. it may act recursively.
| parent | :: CompAssembly to append new component to |
| pLocElem | :: Poco::XML element that points to a location element in an instrument description XML file, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| pCompElem | :: The Poco::XML <component> element that contains the <location> element |
| idList | :: The current IDList |
Definition at line 1094 of file InstrumentDefinitionParser.cpp.
References appendAssembly(), appendLeaf(), appendLocations(), buildExcludeList(), Mantid::Geometry::g_log, getNameOfLocationElement(), getParentComponent(), getTypeElement, Mantid::Geometry::InstrumentDefinitionParser::IdList::idname, isAssembly(), m_angleConvertConst, m_deltaOffsets, m_indirectPositions, m_instrument, m_neutronicPos, m_xmlFile, mapTypeNameToShape, obj, populateIdList(), Mantid::Geometry::InstrumentDefinitionParser::IdList::reset(), setFacing(), setLocation(), setLogfile(), setSideBySideViewLocation(), and Mantid::Kernel::Logger::warning().
Referenced by appendAssembly(), appendLocations(), and parseLocationsForEachTopLevelComponent().
|
private |
Add XML element to parent assuming the element contains no other component elements.
Assumes second argument is pointing to a leaf, which here means the location element (indirectly representing a component element) that contains no sub-components.
This component is appended to the parent (1st argument).
| parent | :: CompAssembly to append component to |
| pLocElem | :: Poco::XML element that points to the element in the XML doc we want to add, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| pCompElem | :: The Poco::XML <component> element that contains the <location> element, which may optionally be detached from the DOM tree also |
| idList | :: The current IDList |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1664 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::ICompAssembly::add(), Mantid::Geometry::GridDetector::compareName(), Mantid::Geometry::RectangularDetector::compareName(), Mantid::Geometry::StructuredDetector::compareName(), createDetectorOrMonitor(), createGridDetector(), createRectangularDetector(), createStructuredDetector(), getNameOfLocationElement(), getTypeElement, Mantid::Geometry::InstrumentDefinitionParser::IdList::idname, m_angleConvertConst, m_deltaOffsets, m_instrument, m_xmlFile, mapTypeNameToShape, name, populateIdList(), Mantid::Geometry::InstrumentDefinitionParser::IdList::reset(), setFacing(), setLocation(), and setLogfile().
Referenced by appendAssembly(), appendLocations(), and parseLocationsForEachTopLevelComponent().
|
private |
Append <locations> in a locations element.
Assumes second argument is a XML location element and its parent is a component element which is assigned to be an assembly.
This method appends the parent component element of the location element to the CompAssembly passed as the 1st arg. Note this method may call itself, i.e. it may act recursively.
| parent | :: CompAssembly to append new component to |
| pLocElems | :: Poco::XML element that points to a locations element in an instrument description XML file, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| pCompElem | :: The Poco::XML <component> element that contains the <locations> element |
| idList | :: The current IDList |
Definition at line 556 of file InstrumentDefinitionParser.cpp.
References appendAssembly(), appendLeaf(), convertLocationsElement(), and isAssembly().
Referenced by appendAssembly(), and parseLocationsForEachTopLevelComponent().
|
private |
Reads from a cache file.
Apply the cache.
| cacheToApply | : Cache file object to use the geometries. |
Definition at line 2491 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::g_log, Mantid::Kernel::Logger::information(), and mapTypeNameToShape.
Referenced by setupGeometryCache().
|
private |
return 0 if the attribute doesn't exist.
This is to follow the behavior of atof which always returns 0 if there is a problem.
Definition at line 604 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::g_log, name, value, and Mantid::Kernel::Logger::warning().
Referenced by createGridDetector(), createRectangularDetector(), createStructuredDetector(), getRelativeTranslation(), parseFacingElementToV3D(), parsePosition(), setFacing(), setLocation(), setLogfile(), and setSideBySideViewLocation().
|
private |
Definition at line 1064 of file InstrumentDefinitionParser.cpp.
Referenced by appendAssembly().
|
private |
Check component has a <location> or <locations> element.
Component must contain a <location> or <locations> Throw an exception if it does not.
| pElem | :: Element with the idlist |
| filename | :: Name of the IDF, for exception message |
Definition at line 376 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), and Mantid::Geometry::g_log.
Referenced by parseLocationsForEachTopLevelComponent().
|
private |
Check IdList.
Check that the required IdList exists in the IDF and defines a sufficient number of IDs.
| idList | :: The IdList |
| pElem | :: Element with the idlist |
| filename | :: Name of the IDF, for exception message |
Definition at line 402 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::InstrumentDefinitionParser::IdList::counted, Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, and Mantid::Geometry::InstrumentDefinitionParser::IdList::vec.
Referenced by parseLocationsForEachTopLevelComponent().
|
private |
Collect some information about types for later use.
Collect some information about types for later use including:
| filename | :: Name of the IDF, for exception message |
| typeElems | :: Vector of pointers to type elements |
| shapeCreator | :: Factory for creating a shape |
Definition at line 295 of file InstrumentDefinitionParser.cpp.
References adjustTypesContainingCombineComponentsElement(), createShapeIfTypeIsNotAnAssembly(), getTypeElement, and throwIfTypeNameNotUnique().
Referenced by parseXML().
|
private |
Take as input a <locations> element.
Such an element is a short-hand notation for a sequence of <location> elements. This method return this sequence as a xml string
Such an element is a short-hand notation for a sequence of <location> elements. This method return this sequence as a xml string
| pElem | Input <locations> element |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 2852 of file InstrumentDefinitionParser.cpp.
References n, name, Mantid::Kernel::Strings::strip(), and std::to_string().
Referenced by appendLocations().
|
private |
Definition at line 1229 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::ICompAssembly::add(), Mantid::Geometry::InstrumentDefinitionParser::IdList::counted, Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, Mantid::Geometry::Detector::getID(), getNameOfLocationElement(), Mantid::Geometry::InstrumentDefinitionParser::IdList::idname, m_angleConvertConst, m_deltaOffsets, m_facingComponent, m_indirectPositions, m_instrument, m_neutronicPos, mapTypeNameToShape, name, setFacing(), setLocation(), setLogfile(), setSideBySideViewLocation(), Mantid::Geometry::InstrumentDefinitionParser::IdList::vec, and Mantid::Kernel::Logger::warning().
Referenced by appendLeaf().
|
private |
Definition at line 1319 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), getNameOfLocationElement(), m_angleConvertConst, m_defaultFacing, m_deltaOffsets, m_haveDefaultFacing, m_instrument, makeXYplaneFaceComponent(), mapTypeNameToShape, name, setFacing(), setLocation(), setLogfile(), setSideBySideViewLocation(), Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by appendLeaf().
|
private |
If appropriate, creates a second instrument containing neutronic detector positions.
Definition at line 2579 of file InstrumentDefinitionParser.cpp.
References m_angleConvertConst, m_deltaOffsets, m_instrument, m_neutronicPos, mapTypeNameToShape, setLocation(), and Mantid::Geometry::ObjComponent::setShape().
Referenced by parseXML().
|
private |
Definition at line 1423 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), getNameOfLocationElement(), m_angleConvertConst, m_defaultFacing, m_deltaOffsets, m_haveDefaultFacing, m_instrument, makeXYplaneFaceComponent(), mapTypeNameToShape, name, setFacing(), setLocation(), setLogfile(), setSideBySideViewLocation(), Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by appendLeaf().
|
private |
Record type as an assembly if it contains a component, otherwise create a shape for it.
If type does not contain a component element then it is not an assembly and a shape can be created.
| shapeCreator | :: Factory for creating a shape |
| iType | :: The i-th type |
| pTypeElem | :: Pointer to the type element |
| typeName | :: Name of the type |
Definition at line 499 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::ShapeFactory::createShape(), isTypeAssembly, and mapTypeNameToShape.
Referenced by collateTypeInformation().
|
private |
Definition at line 1517 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Geometry::StructuredDetector::compareName(), getNameOfLocationElement(), m_angleConvertConst, m_defaultFacing, m_deltaOffsets, m_haveDefaultFacing, m_instrument, makeXYplaneFaceComponent(), name, setLocation(), setLogfile(), Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by appendLeaf().
|
private |
Create a vector of elements which contain a <parameter>
| pRootElem | :: Pointer to the root element |
Definition at line 429 of file InstrumentDefinitionParser.cpp.
References m_hasParameterElement, and m_hasParameterElement_beenSet.
Referenced by parseXML().
| const std::string Mantid::Geometry::InstrumentDefinitionParser::createVTPFileName | ( | ) |
creates a vtp filename from a given xml filename
Generates a vtp filename from a xml filename.
Definition at line 2963 of file InstrumentDefinitionParser.cpp.
References getMangledName().
Referenced by initialise().
| V3D Mantid::Geometry::InstrumentDefinitionParser::getAbsolutPositionInCompCoorSys | ( | Geometry::ICompAssembly * | comp, |
| Kernel::V3D | pos | ||
| ) |
return absolute position of point which is set relative to the coordinate system of the input component
| comp | Reference coordinate system |
| pos | A position relative to the coord. sys. of comp |
Definition at line 2808 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::ICompAssembly::add(), Mantid::Geometry::Component::getPos(), and Mantid::Geometry::Component::setPos().
Referenced by translateRotateXMLcuboid().
| InstrumentDefinitionParser::CachingOption Mantid::Geometry::InstrumentDefinitionParser::getAppliedCachingOption | ( | ) | const |
Get the applied caching option.
Getter for the applied caching option.
Definition at line 2575 of file InstrumentDefinitionParser.cpp.
References m_cachingOption.
|
private |
lazy loads the document and returns a pointer
Lazy loads the document and returns a autopointer.
Definition at line 176 of file InstrumentDefinitionParser.cpp.
References m_instrument, and m_pDoc.
Referenced by parseXML(), and saveDOM_Tree().
| std::string Mantid::Geometry::InstrumentDefinitionParser::getMangledName | ( | ) |
Handle used in the singleton constructor for instrument file should append the value file sha-1 checksum to determine if it is already in memory so that changes to the instrument file will cause file to be reloaded.
Definition at line 156 of file InstrumentDefinitionParser.cpp.
References m_instName, m_instrument, m_xmlFile, and Mantid::Kernel::ChecksumHelper::sha1FromString().
Referenced by createVTPFileName(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::DataHandling::LoadMcStas::readEventData(), MantidQt::MantidWidgets::SlitCalculator::setInstrument(), Mantid::API::ExperimentInfo::setInstumentFromXML(), and setupGeometryCache().
|
static |
get name of location element
Get name of a location element.
It will return the value of the attribute 'name', or the parent's name attribute, or the parent's type, if all else fails.
| pElem | :: Poco::XML element that points to a <location> element, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| pCompElem | :: The Poco::XML <component> element that contain the location element, which may optionally be detached from the DOM tree also |
Definition at line 889 of file InstrumentDefinitionParser.cpp.
Referenced by appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createRectangularDetector(), createStructuredDetector(), and getShapeCoorSysComp().
|
static |
Get parent component element of location element.
Get parent <component> element of <location> element.
| pLocElem | :: Poco::XML element that points a location element in the XML doc |
| logic_error | Thrown if argument is not a child of component element |
Definition at line 842 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), and Mantid::Geometry::g_log.
Referenced by adjust(), appendAssembly(), and getShapeCoorSysComp().
|
private |
Calculate the position of comp relative to its parent from info provided by <location> element.
| comp | :: To set position/location off |
| pElem | :: Poco::XML element that points a <location> element, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| angleConvertConst | :: constant for converting deg to rad |
| deltaOffsets | :: radial position offsets |
Definition at line 754 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Geometry::IComponent::getParent(), m_tempPosHolder, Mantid::Kernel::V3D::spherical(), tmp, Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by setLocation().
|
private |
This method returns the parent appended which its child components and also name of type of the last child component.
Adds component with coordinate system as defined by the input <location> element to the input parent component.
Nested <location> elements are allowed and this method is recursive. As this method is running recursively it will eventually return a leaf component (in endAssembly) and the name of the <type> of this leaf
| parent | :: CompAssembly Parent component |
| pLocElem | :: Poco::XML element that points to a location element |
| getTypeElement | :: contain pointers to all <type>s |
| endAssembly | :: Output child component, which coor. sys. modified according to pLocElem |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 3052 of file InstrumentDefinitionParser.cpp.
References getNameOfLocationElement(), getParentComponent(), getShapeCoorSysComp(), getTypeElement, m_angleConvertConst, and setLocation().
Referenced by adjust(), and getShapeCoorSysComp().
|
private |
Return a subelement of an XML element.
Return a subelement of an XML element, but also checks that there exist exactly one entry of this subelement.
| pElem | :: XML from instrument def. file |
| name | :: Name of subelement |
| std::invalid_argument | Thrown if issues with XML string |
Definition at line 2985 of file InstrumentDefinitionParser.cpp.
References name.
Referenced by translateRotateXMLcuboid().
|
private |
Populate vectors of pointers to type and component xml elements.
Create vectors of pointers to <type>s and <component>s".
| pRootElem | :: Pointer to the root element |
| typeElems | :: Reference to type vector to populate |
| compElems | :: Reference to component vector to populate |
Definition at line 527 of file InstrumentDefinitionParser.cpp.
Referenced by parseXML().
|
private |
shared Constructor logic
Initialise method used in Constructor.
| filename | :: IDF .xml path (full). This is needed mostly to find the instrument geometry cache. |
| instName | :: name of the instrument |
| xmlText | :: XML contents of IDF |
| vtpFilename | :: the path to the vtp file if you want to override the default |
Definition at line 114 of file InstrumentDefinitionParser.cpp.
References createVTPFileName(), m_cacheFile, m_instName, m_instrument, m_sideBySideViewLocation_exists, and m_xmlFile.
Referenced by InstrumentDefinitionParser(), InstrumentDefinitionParser(), and InstrumentDefinitionParser().
|
private |
Return true if assembly, false if not assembly and throws exception if string not in assembly.
Returns True if the (string) type given is an assembly.
| type | :: name of the type of a component in XML instrument definition |
| InstrumentDefinitionError | Thrown if type not defined in XML definition |
Definition at line 1887 of file InstrumentDefinitionParser.cpp.
References isTypeAssembly, and m_xmlFile.
Referenced by appendAssembly(), appendLocations(), and parseLocationsForEachTopLevelComponent().
|
private |
Make the shape defined in 1st argument face the component in the second argument.
Make the shape defined in 1st argument face the component in the second argument, by rotating the z-axis of the component passed in 1st argument so that it points in the direction: from the component as specified 2nd argument to the component as specified in 1st argument.
| in | :: Component to be rotated |
| facing | :: Object to face |
Definition at line 1909 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::Component::getPos(), and makeXYplaneFaceComponent().
Referenced by createGridDetector(), createRectangularDetector(), createStructuredDetector(), makeXYplaneFaceComponent(), and setFacing().
|
private |
Make the shape defined in 1st argument face the position in the second argument.
Make the shape defined in 1st argument face the position in the second argument, by rotating the z-axis of the component passed in 1st argument so that it points in the direction: from the position (as specified 2nd argument) to the component (1st argument).
| in | :: Component to be rotated |
| facingPoint | :: position to face |
Definition at line 1923 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::V3D::angle(), Mantid::Kernel::V3D::cross_prod(), Mantid::Geometry::IComponent::getPos(), Mantid::Geometry::IComponent::getRotation(), Mantid::Kernel::Quat::inverse(), Mantid::Kernel::V3D::norm(), Mantid::Kernel::normalize(), Mantid::Geometry::IComponent::rotate(), Mantid::Kernel::Quat::rotate(), and Mantid::Geometry::z.
|
private |
Parse position of facing element to V3D.
| pElem | :: Facing type element to parse |
Definition at line 1965 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), m_angleConvertConst, Mantid::Kernel::V3D::spherical(), Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by readDefaults(), and setFacing().
|
private |
Aggregate locations and IDs for components.
| progressReporter | :: A progress reporter |
| filename | :: Name of the IDF, for exception message |
| compElems | :: Vector of pointers for component elements |
Definition at line 326 of file InstrumentDefinitionParser.cpp.
References appendAssembly(), appendLeaf(), appendLocations(), checkComponentContainsLocationElement(), checkIdListExistsAndDefinesEnoughIDs(), isAssembly(), m_instrument, Mantid::Kernel::ProgressBase::report(), Mantid::Geometry::InstrumentDefinitionParser::IdList::reset(), and Mantid::Kernel::ProgressBase::resetNumSteps().
Referenced by parseXML().
|
private |
Get position coordinates from XML element.
| pElem | :: XML element whose attributes contain position coordinates |
Definition at line 3003 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Kernel::V3D::spherical(), Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by translateRotateXMLcuboid().
| Instrument_sptr Mantid::Geometry::InstrumentDefinitionParser::parseXML | ( | Kernel::ProgressBase * | progressReporter | ) |
Parse XML contents.
Fully parse the IDF XML contents and returns the instrument thus created.
| progressReporter | :: Optional Progress reporter object. If NULL, no progress reporting. |
Definition at line 222 of file InstrumentDefinitionParser.cpp.
References collateTypeInformation(), createNeutronicInstrument(), createVectorOfElementsContainingAParameterElement(), Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, getDocument(), getTypeAndComponentPointers(), m_cachingOption, m_indirectPositions, m_instrument, m_tempPosHolder, m_xmlFile, parseLocationsForEachTopLevelComponent(), readDefaults(), setComponentLinks(), setLogfile(), setupGeometryCache(), and setValidityRange().
Referenced by Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::DataHandling::LoadMcStas::readEventData(), MantidQt::MantidWidgets::SlitCalculator::setInstrument(), and Mantid::API::ExperimentInfo::setInstumentFromXML().
|
private |
Method for populating IdList.
| pE | :: Poco::XML element that points to an <idlist> |
| idList | :: The structure to populate with detector ID numbers |
| logic_error | Thrown if argument is not a child of component element |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 1757 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, Mantid::Geometry::InstrumentDefinitionParser::IdList::idname, m_xmlFile, and Mantid::Geometry::InstrumentDefinitionParser::IdList::vec.
Referenced by appendAssembly(), and appendLeaf().
|
private |
Reads the contents of the <defaults> element to set member variables,.
Reads the contents of the <defaults> element to set member variables, requires m_instrument to be already set.
| defaults | :: points to the data read from the <defaults> element, can be null. |
Definition at line 963 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::axisNameToAxisType(), Mantid::Geometry::Left, m_angleConvertConst, m_defaultFacing, m_deltaOffsets, m_haveDefaultFacing, m_indirectPositions, m_instrument, parseFacingElementToV3D(), and Mantid::Geometry::Right.
Referenced by parseXML().
| void Mantid::Geometry::InstrumentDefinitionParser::saveDOM_Tree | ( | const std::string & | outFilename | ) |
Save DOM tree to xml file.
This method was initially added for testing purpose but may be useful for other purposes. During the parsing of the DOM tree in parseXML() the tree may be modified, e.g. if <combine-components-into-one-shape> is used.
| outFilename | :: Output filename |
Definition at line 593 of file InstrumentDefinitionParser.cpp.
References getDocument().
| void Mantid::Geometry::InstrumentDefinitionParser::setComponentLinks | ( | std::shared_ptr< Geometry::Instrument > & | instrument, |
| Poco::XML::Element * | pRootElem, | ||
| Kernel::ProgressBase * | progress = nullptr, |
||
| const std::string & | requestedDate = std::string() |
||
| ) |
Add/overwrite any parameters specified in instrument with param values specified in <component-link> XML elements.
Apply parameters that may be specified in <component-link> XML elements.
Input variable pRootElem may e.g. be the root element of an XML parameter file or the root element of a IDF
| instrument | :: Instrument |
| pRootElem | :: Associated Poco::XML element that may contain <component-link> elements |
| progress | :: Optional progress object for reporting progress to an algorithm |
| requestedDate | :: Optional Date against which to check the validity of an IPF parameter |
Definition at line 2390 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, Mantid::Kernel::ProgressBase::hasCancellationBeenRequested(), m_angleConvertConst, name, Mantid::Kernel::ProgressBase::report(), Mantid::Kernel::ProgressBase::resetNumSteps(), setLogfile(), and Mantid::Kernel::Logger::warning().
Referenced by Mantid::DataHandling::LoadParameterFile::exec(), and parseXML().
|
private |
Set facing of comp as specified in XML facing element.
Set facing of comp as specified in XML facing element (which must be sub-element of a location element).
| comp | :: To set facing of |
| pElem | :: Poco::XML element that points a <location> element, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| logic_error | Thrown if second argument is not a pointer to a 'location' XML element |
Definition at line 2008 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, m_angleConvertConst, m_defaultFacing, m_haveDefaultFacing, makeXYplaneFaceComponent(), parseFacingElementToV3D(), and Mantid::Geometry::IComponent::rotate().
Referenced by appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), and createRectangularDetector().
|
private |
Set location (position) of comp as specified in XML location element.
| comp | :: To set position/location off |
| pElem | :: Poco::XML element that points a <location> element, which optionally may be detached (meaning it is not required to be part of the DOM tree of the IDF) |
| angleConvertConst | :: constant for converting deg to rad |
| deltaOffsets | :: radial position offsets |
| logic_error | Thrown if second argument is not a pointer to a 'location' XML element |
Definition at line 635 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Geometry::CompAssembly::getPos(), getRelativeTranslation(), Mantid::Geometry::IComponent::getRotation(), Mantid::Geometry::IComponent::rotate(), Mantid::Geometry::Component::setParent(), Mantid::Geometry::Component::setPos(), Mantid::Geometry::IComponent::setPos(), Mantid::Geometry::Component::setRot(), and Mantid::Geometry::IComponent::translate().
Referenced by adjust(), appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createNeutronicInstrument(), createRectangularDetector(), createStructuredDetector(), and getShapeCoorSysComp().
|
private |
Set parameter/logfile info (if any) associated with component.
| comp | :: Some component |
| pElem | :: Poco::XML element that may hold <parameter> elements |
| logfileCache | :: Cache to add information about parameter to |
| requestedDate | :: Reference date to check the validity of the parameter against |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument file |
Definition at line 2063 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, Mantid::Geometry::IComponent::getName(), index, m_angleConvertConst, m_hasParameterElement, m_hasParameterElement_beenSet, m_xmlFile, value, Mantid::Kernel::Logger::warning(), Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createRectangularDetector(), createStructuredDetector(), parseXML(), and setComponentLinks().
|
private |
Set location (position) of comp as specified in XML side-by-side-view-location element.
Definition at line 726 of file InstrumentDefinitionParser.cpp.
References attrToDouble(), m_sideBySideViewLocation_exists, Mantid::Geometry::IComponent::setSideBySideViewPos(), Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by appendAssembly(), createDetectorOrMonitor(), createGridDetector(), and createRectangularDetector().
|
private |
Reads in or creates the geometry cache ('vtp') file.
Definition at line 2551 of file InstrumentDefinitionParser.cpp.
References applyCache(), getMangledName(), m_cacheFile, NoneApplied, ReadFallBack, ReadGeomCache, Mantid::Kernel::toString(), and writeAndApplyCache().
Referenced by parseXML().
|
private |
Check the validity range and add it to the instrument object.
Checks the validity range in the IDF and adds it to the instrument object.
| pRootElem | A pointer to the root element of the instrument definition |
Definition at line 908 of file InstrumentDefinitionParser.cpp.
References Mantid::Geometry::d, m_instrument, and m_xmlFile.
Referenced by parseXML().
|
private |
Throw exception if type name is not unique in the IDF.
Type names in the IDF must be unique.
Throw an exception if this one is not.
| filename | :: Filename of the IDF, for the exception message |
| typeName | :: Name of the type being checked |
Definition at line 201 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, and getTypeElement.
Referenced by adjustTypesContainingCombineComponentsElement(), and collateTypeInformation().
|
private |
Returns a translated and rotated <cuboid> element.
Returns a translated and rotated <cuboid> element with "id" attribute equal cuboidName.
| comp | coordinate system to translate and rotate cuboid to |
| cuboidEle | Input <cuboid> element |
| cuboidName | What the "id" attribute of the returned <coboid> will be set to |
Definition at line 2755 of file InstrumentDefinitionParser.cpp.
References getAbsolutPositionInCompCoorSys(), getShapeElement(), parsePosition(), Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().
Referenced by adjust(), and translateRotateXMLcuboid().
|
private |
Returns a translated and rotated <cuboid> element.
Returns a translated and rotated <cuboid> element with "id" attribute equal cuboidName.
| comp | coordinate system to translate and rotate cuboid to |
| cuboidXML | Input <cuboid> xml string |
| cuboidName | What the "id" attribute of the returned <coboid> will be set to |
Definition at line 2827 of file InstrumentDefinitionParser.cpp.
References translateRotateXMLcuboid().
|
private |
Write out a cache file.
Write the cache file from the IDF file and apply it.
| firstChoiceCache | : File location for a first choice cache. |
| fallBackCache | : File location for a fallback cache if required. |
Definition at line 2512 of file InstrumentDefinitionParser.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Geometry::g_log, Mantid::Kernel::Logger::information(), mapTypeNameToShape, Mantid::Kernel::Logger::notice(), WroteCacheTemp, and WroteGeomCache.
Referenced by setupGeometryCache().
|
private |
map which holds names of types and pointers to these type for fast retrieval in code
Definition at line 316 of file InstrumentDefinitionParser.h.
Referenced by adjust(), adjustTypesContainingCombineComponentsElement(), appendAssembly(), appendLeaf(), collateTypeInformation(), getShapeCoorSysComp(), and throwIfTypeNameNotUnique().
|
private |
map which holds names of types and whether or not they are categorized as being assemblies, which means whether the type element contains component elements
Definition at line 303 of file InstrumentDefinitionParser.h.
Referenced by adjust(), adjustTypesContainingCombineComponentsElement(), createShapeIfTypeIsNotAnAssembly(), and isAssembly().
|
private |
when this const equals 1 it means that angle=degree (default) is set in IDF otherwise if this const equals 180/pi it means that angle=radian is set in IDF
Definition at line 330 of file InstrumentDefinitionParser.h.
Referenced by adjust(), appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createNeutronicInstrument(), createRectangularDetector(), createStructuredDetector(), getShapeCoorSysComp(), parseFacingElementToV3D(), readDefaults(), setComponentLinks(), setFacing(), and setLogfile().
|
private |
Input vtp file.
Definition at line 275 of file InstrumentDefinitionParser.h.
Referenced by initialise(), InstrumentDefinitionParser(), and setupGeometryCache().
|
private |
Caching applied.
Definition at line 355 of file InstrumentDefinitionParser.h.
Referenced by getAppliedCachingOption(), and parseXML().
|
private |
Hold default facing position.
Definition at line 313 of file InstrumentDefinitionParser.h.
Referenced by createGridDetector(), createRectangularDetector(), createStructuredDetector(), readDefaults(), and setFacing().
|
private |
Flag to indicate whether offsets given in spherical coordinates are to be added to the current position (true) or are a vector from the current position (false, default)
Definition at line 324 of file InstrumentDefinitionParser.h.
Referenced by appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createNeutronicInstrument(), createRectangularDetector(), createStructuredDetector(), and readDefaults().
|
private |
Container to hold all detectors and monitors added to the instrument.
Used for 'facing' these to component specified under <defaults>. NOTE: Seems unused, ever.
Definition at line 309 of file InstrumentDefinitionParser.h.
Referenced by createDetectorOrMonitor().
|
private |
Holds all the xml elements that have a <parameter> child element.
Added purely for the purpose of computing speed and is used in setLogFile() for the purpose of quickly accessing if a component have a parameter/logfile associated with it or not
Definition at line 294 of file InstrumentDefinitionParser.h.
Referenced by createVectorOfElementsContainingAParameterElement(), and setLogfile().
|
private |
has m_hasParameterElement been set - used when public method setComponentLinks is used
Definition at line 297 of file InstrumentDefinitionParser.h.
Referenced by createVectorOfElementsContainingAParameterElement(), and setLogfile().
|
private |
True if defaults->components-are-facing is set in instrument def. file.
Definition at line 311 of file InstrumentDefinitionParser.h.
Referenced by createGridDetector(), createRectangularDetector(), createStructuredDetector(), readDefaults(), and setFacing().
|
private |
Flag to indicate whether IDF contains physical & neutronic positions.
Definition at line 332 of file InstrumentDefinitionParser.h.
Referenced by appendAssembly(), createDetectorOrMonitor(), parseXML(), and readDefaults().
|
private |
Name of the instrument.
Definition at line 278 of file InstrumentDefinitionParser.h.
Referenced by getMangledName(), and initialise().
|
private |
For convenience added pointer to instrument here.
Definition at line 319 of file InstrumentDefinitionParser.h.
Referenced by appendAssembly(), appendLeaf(), createDetectorOrMonitor(), createGridDetector(), createNeutronicInstrument(), createRectangularDetector(), createStructuredDetector(), getDocument(), getMangledName(), initialise(), parseLocationsForEachTopLevelComponent(), parseXML(), readDefaults(), and setValidityRange().
|
private |
A map containing the neutronic position for each detector.
Used when m_indirectPositions is true.
Definition at line 336 of file InstrumentDefinitionParser.h.
Referenced by appendAssembly(), createDetectorOrMonitor(), and createNeutronicInstrument().
|
private |
XML document is lazy loaded.
Definition at line 284 of file InstrumentDefinitionParser.h.
Referenced by getDocument().
|
private |
Store if xml text contains side-by-side-view-location string.
Definition at line 281 of file InstrumentDefinitionParser.h.
Referenced by initialise(), and setSideBySideViewLocation().
|
private |
Map to store positions of parent components in spherical coordinates.
Definition at line 352 of file InstrumentDefinitionParser.h.
Referenced by getRelativeTranslation(), and parseXML().
|
private |
Input xml file.
Definition at line 272 of file InstrumentDefinitionParser.h.
Referenced by appendAssembly(), appendLeaf(), getMangledName(), initialise(), isAssembly(), parseXML(), populateIdList(), setLogfile(), and setValidityRange().
|
private |
map which maps the type name to a shared pointer to a geometric shape
Definition at line 305 of file InstrumentDefinitionParser.h.
Referenced by adjustTypesContainingCombineComponentsElement(), appendAssembly(), appendLeaf(), applyCache(), createDetectorOrMonitor(), createGridDetector(), createNeutronicInstrument(), createRectangularDetector(), createShapeIfTypeIsNotAnAssembly(), and writeAndApplyCache().