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,
64 void setComponentLinks(
const std::shared_ptr<const Geometry::Instrument> &instrument, Poco::XML::Element *pRootElem,
66 const std::string &requestedDate = std::string());
68 std::string getMangledName();
71 static Poco::XML::Element *getParentComponent(
const Poco::XML::Element *pLocElem);
74 static std::string getNameOfLocationElement(
const Poco::XML::Element *pElem,
const Poco::XML::Element *pCompElem);
77 void saveDOM_Tree(
const std::string &outFilename);
80 CachingOption getAppliedCachingOption()
const;
83 const std::string createVTPFileName();
87 void initialise(
const std::string &filename,
const std::string &instName,
const std::string &xmlText,
88 const std::string &vtpFilename);
91 Poco::AutoPtr<Poco::XML::Document> getDocument();
94 void setLocation(
Geometry::IComponent *comp,
const Poco::XML::Element *pElem,
const double angleConvertConst,
95 const bool deltaOffsets =
false);
102 const double angleConvertConst,
const bool deltaOffsets =
false);
105 void setValidityRange(
const Poco::XML::Element *pRootElem);
108 void readDefaults(Poco::XML::Element *defaults);
133 void populateIdList(Poco::XML::Element *pE, IdList &idList);
135 std::vector<std::string> buildExcludeList(
const Poco::XML::Element *
const location);
140 const Poco::XML::Element *pCompElem, IdList &idList);
143 bool isAssembly(
const std::string &)
const;
148 const Poco::XML::Element *pCompElem, IdList &idList);
151 const Poco::XML::Element *pCompElem,
const std::string &filename, IdList &idList,
152 const std::string &category);
155 const Poco::XML::Element *pCompElem,
const std::string &filename,
156 const Poco::XML::Element *pType);
159 const Poco::XML::Element *pCompElem,
const std::string &filename,
160 const Poco::XML::Element *pType);
163 const Poco::XML::Element *pCompElem,
const std::string &filename,
164 const Poco::XML::Element *pType);
168 const Poco::XML::Element *pCompElem, IdList &idList);
175 Kernel::V3D parseFacingElementToV3D(Poco::XML::Element *pElem);
186 CachingOption setupGeometryCache();
190 void createNeutronicInstrument();
198 void adjust(Poco::XML::Element *pElem,
const std::map<std::string, bool> &isTypeAssembly,
199 std::map<std::string, Poco::XML::Element *> &getTypeElement);
204 Poco::AutoPtr<Poco::XML::Document> convertLocationsElement(
const Poco::XML::Element *pElem);
208 double attrToDouble(
const Poco::XML::Element *pElem,
const std::string &
name);
211 void getTypeAndComponentPointers(
const Poco::XML::Element *pRootElem, std::vector<Poco::XML::Element *> &typeElems,
212 std::vector<Poco::XML::Element *> &compElems)
const;
215 void throwIfTypeNameNotUnique(
const std::string &filename,
const std::string &typeName)
const;
220 Poco::XML::Element *pTypeElem,
const std::string &typeName);
224 void adjustTypesContainingCombineComponentsElement(
ShapeFactory &shapeCreator,
const std::string &filename,
225 const std::vector<Poco::XML::Element *> &typeElems,
226 size_t numberOfTypes);
229 void createVectorOfElementsContainingAParameterElement(Poco::XML::Element *pRootElem);
232 void checkIdListExistsAndDefinesEnoughIDs(
const IdList &idList, Poco::XML::Element *pElem,
233 const std::string &filename)
const;
236 void checkComponentContainsLocationElement(Poco::XML::Element *pElem,
const std::string &filename)
const;
239 void parseLocationsForEachTopLevelComponent(
Kernel::ProgressBase *progressReporter,
const std::string &filename,
240 const std::vector<Poco::XML::Element *> &compElems);
243 void collateTypeInformation(
const std::string &filename,
const std::vector<Poco::XML::Element *> &typeElems,
262 std::map<std::string, Poco::XML::Element *> &getTypeElement,
267 const std::string &cuboidName);
270 const std::string &cuboidName);
273 Poco::XML::Element *getShapeElement(
const Poco::XML::Element *pElem,
const std::string &
name);
276 Kernel::V3D parsePosition(Poco::XML::Element *pElem);
291 Poco::AutoPtr<Poco::XML::Document>
m_pDoc;
357 double r, theta, phi;
358 SphVec() : r(0.0), theta(0.0), phi(0.0) {}
359 SphVec(
const double &r,
const double &theta,
const double &phi) : r(r), theta(theta), phi(phi) {}