/// @file ReadGeoDescription.hh /// @brief Header file for the geometry description reader class. #ifndef ReadGeoDescriptions_hh #define ReadGeoDescriptions_hh // Standard include statements. #include #include #include // Allpix include statements. #include "AllPixGeoDsc.hh" #include "Utils.h" // GEANT4 include statements. #include "G4Types.hh" using namespace std; using namespace Utils; class TXMLNode; #define __FIRST_DET_INDX 0 /// @brief A class for reading the geometry description. /// /// @author J. Idarraga (principle author - idarraga@cern.ch) /// @author T. Whyntie (editor, CERN\@school - t.whyntie@qmul.ac.uk) class ReadGeoDescription { public: /// @brief The constructor. ReadGeoDescription() {}; ReadGeoDescription(string); /// @brief The destructor. ~ReadGeoDescription(){}; static ReadGeoDescription * GetInstance(); map * GetDetectorsMap(){return &m_detsGeo;}; void BuildListOfExpectedTags(); void ParseContext(TXMLNode *); bool StringIsRelevant(string); vector ProcessIdString(const char *); /// @brief Replicate a detector if required. /// /// i.e. create new instances by copying from the first object in /// the vector. void ReplicateDetectors(); /// @brief Keep only the detectors that will be used. /// /// @param [in] dets Vector of the detector IDs to be used. G4int UseTheseDetectorsOnly(vector dets); private: string m_xmlfile; string m_currentNodeName; string m_currentAtt; map m_detsGeo; //vector m_detsGeoIndx; map > m_detsGeoIndx; int m_firstIndx; // map for replicated detectors //vector > m_replicationVector; map m_unitsMap; };//end of ReadGeoDescription class definition. #endif