/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: GeoReader.h * Author: tablyaz * * Created on August 11, 2017, 5:34 PM */ #ifndef GEOREADER_H #define GEOREADER_H #include #include #include #include "TGeoManager.h" #include "FairRootManager.h" #include "Tracker.h" #include "HitReader.h" class CbmBinnedTracker; class CbmBinnedGeoReader { public: static CbmBinnedGeoReader* Instance(); public: CbmBinnedGeoReader(FairRootManager*, CbmBinnedTracker* tracker); CbmBinnedGeoReader(const CbmBinnedGeoReader&) = delete; CbmBinnedGeoReader& operator=(const CbmBinnedGeoReader&) = delete; void FindGeoChild(TGeoNode* node, const char* name, std::list& results); void Read(); private: void ReadDetector(const char* name); void SearchStation(ECbmModuleId stationType, TGeoNode* node, CbmBinnedHitReader* hitReader, std::list::const_iterator stationPath, std::list::const_iterator stationPathEnd, const std::list& geoPath, bool is4d = false); void HandleStation(TGeoNode* node, std::list::const_iterator geoPath, std::list::const_iterator geoPathEnd, Double_t& left, Double_t& right, Double_t& top, Double_t& bottom, Double_t& front, Double_t& back); void HandleActive(TGeoNode* node, Double_t& left, Double_t& right, Double_t& top, Double_t& bottom, Double_t& front, Double_t& back); void ReadSts(); void ReadRich(); void ReadMuch(); void ReadTrd(); void ReadTof(); void ReadTarget(); void FindNode(std::list nodePath, std::list& results, TGeoNode* rootNode = 0); private: //FairRootManager* fIoman; (VF) unused TGeoNavigator* fNavigator; std::map fDetectorReaders; CbmBinnedTracker* fTracker; int fLastStationNumber; }; #endif /* GEOREADER_H */