48 const std::string &instName,
const std::string &xmlText);
52 enum CachingOption { NoneApplied, ReadGeomCache, ReadFallBack, WroteGeomCache, WroteCacheTemp };
59 void setComponentLinks(std::shared_ptr<Geometry::Instrument> &instrument, Poco::XML::Element *pRootElem,
62 std::string getMangledName();
65 static Poco::XML::Element *getParentComponent(
const Poco::XML::Element *pLocElem);
68 static std::string getNameOfLocationElement(
const Poco::XML::Element *pElem,
const Poco::XML::Element *pCompElem);
71 void saveDOM_Tree(
const std::string &outFilename);
74 CachingOption getAppliedCachingOption()
const;
77 const std::string createVTPFileName();
81 void initialise(
const std::string &filename,
const std::string &instName,
const std::string &xmlText,
82 const std::string &vtpFilename);
85 Poco::AutoPtr<Poco::XML::Document> getDocument();
88 void setLocation(
Geometry::IComponent *comp,
const Poco::XML::Element *pElem,
const double angleConvertConst,
89 const bool deltaOffsets =
false);
96 const double angleConvertConst,
const bool deltaOffsets =
false);
99 void setValidityRange(
const Poco::XML::Element *pRootElem);
102 void readDefaults(Poco::XML::Element *defaults);
127 void populateIdList(Poco::XML::Element *pE, IdList &idList);
129 std::vector<std::string> buildExcludeList(
const Poco::XML::Element *
const location);
134 const Poco::XML::Element *pCompElem, IdList &idList);
137 bool isAssembly(
const std::string &)
const;
142 const Poco::XML::Element *pCompElem, IdList &idList);
145 const Poco::XML::Element *pCompElem,
const std::string &filename, IdList &idList,
146 const std::string &category);
149 const Poco::XML::Element *pCompElem,
const std::string &filename,
150 const Poco::XML::Element *pType);
153 const Poco::XML::Element *pCompElem,
const std::string &filename,
154 const Poco::XML::Element *pType);
157 const Poco::XML::Element *pCompElem,
const std::string &filename,
158 const Poco::XML::Element *pType);
162 const Poco::XML::Element *pCompElem, IdList &idList);
169 Kernel::V3D parseFacingElementToV3D(Poco::XML::Element *pElem);
180 CachingOption setupGeometryCache();
184 void createNeutronicInstrument();
192 void adjust(Poco::XML::Element *pElem,
const std::map<std::string, bool> &isTypeAssembly,
193 std::map<std::string, Poco::XML::Element *> &getTypeElement);
198 Poco::AutoPtr<Poco::XML::Document> convertLocationsElement(
const Poco::XML::Element *pElem);
202 double attrToDouble(
const Poco::XML::Element *pElem,
const std::string &
name);
205 void getTypeAndComponentPointers(
const Poco::XML::Element *pRootElem, std::vector<Poco::XML::Element *> &typeElems,
206 std::vector<Poco::XML::Element *> &compElems)
const;
209 void throwIfTypeNameNotUnique(
const std::string &filename,
const std::string &typeName)
const;
214 Poco::XML::Element *pTypeElem,
const std::string &typeName);
218 void adjustTypesContainingCombineComponentsElement(
ShapeFactory &shapeCreator,
const std::string &filename,
219 const std::vector<Poco::XML::Element *> &typeElems,
220 size_t numberOfTypes);
223 void createVectorOfElementsContainingAParameterElement(Poco::XML::Element *pRootElem);
226 void checkIdListExistsAndDefinesEnoughIDs(
const IdList &idList, Poco::XML::Element *pElem,
227 const std::string &filename)
const;
230 void checkComponentContainsLocationElement(Poco::XML::Element *pElem,
const std::string &filename)
const;
233 void parseLocationsForEachTopLevelComponent(
Kernel::ProgressBase *progressReporter,
const std::string &filename,
234 const std::vector<Poco::XML::Element *> &compElems);
237 void collateTypeInformation(
const std::string &filename,
const std::vector<Poco::XML::Element *> &typeElems,
255 std::map<std::string, Poco::XML::Element *> &getTypeElement,
260 const std::string &cuboidName);
263 const std::string &cuboidName);
266 Poco::XML::Element *getShapeElement(
const Poco::XML::Element *pElem,
const std::string &
name);
269 Kernel::V3D parsePosition(Poco::XML::Element *pElem);
284 Poco::AutoPtr<Poco::XML::Document>
m_pDoc;
345 double r, theta, phi;
346 SphVec() : r(0.0), theta(0.0), phi(0.0) {}
347 SphVec(
const double &r,
const double &theta,
const double &phi) : r(r), theta(theta), phi(phi) {}