CbmRoot
GeoReader.h
Go to the documentation of this file.
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 
7 /*
8  * File: GeoReader.h
9  * Author: tablyaz
10  *
11  * Created on August 11, 2017, 5:34 PM
12  */
13 
14 #ifndef GEOREADER_H
15 #define GEOREADER_H
16 
17 #include "FairRootManager.h"
18 #include "HitReader.h"
19 #include "TGeoManager.h"
20 #include "Tracker.h"
21 #include <list>
22 #include <map>
23 #include <string>
24 
25 class CbmBinnedTracker;
26 
28 public:
29  static CbmBinnedGeoReader* Instance();
30 
31 public:
32  CbmBinnedGeoReader(FairRootManager*, CbmBinnedTracker* tracker);
35  void
36  FindGeoChild(TGeoNode* node, const char* name, std::list<TGeoNode*>& results);
37  void Read();
38 
39 private:
40  void ReadDetector(const char* name);
41  void SearchStation(ECbmModuleId stationType,
42  TGeoNode* node,
43  CbmBinnedHitReader* hitReader,
44  std::list<const char*>::const_iterator stationPath,
45  std::list<const char*>::const_iterator stationPathEnd,
46  const std::list<const char*>& geoPath,
47  bool is4d = false);
48  void HandleStation(TGeoNode* node,
49  std::list<const char*>::const_iterator geoPath,
50  std::list<const char*>::const_iterator geoPathEnd,
51  Double_t& left,
52  Double_t& right,
53  Double_t& top,
54  Double_t& bottom,
55  Double_t& front,
56  Double_t& back);
57  void HandleActive(TGeoNode* node,
58  Double_t& left,
59  Double_t& right,
60  Double_t& top,
61  Double_t& bottom,
62  Double_t& front,
63  Double_t& back);
64  void ReadSts();
65  void ReadRich();
66  void ReadMuch();
67  void ReadTrd();
68  void ReadTof();
69  void ReadTarget();
70  void FindNode(std::list<const char*> nodePath,
71  std::list<TGeoNode*>& results,
72  TGeoNode* rootNode = 0);
73 
74 private:
75  //FairRootManager* fIoman; (VF) unused
76  TGeoNavigator* fNavigator;
77  std::map<std::string, void (CbmBinnedGeoReader::*)()> fDetectorReaders;
80 };
81 
82 #endif /* GEOREADER_H */
CbmBinnedGeoReader::ReadMuch
void ReadMuch()
Definition: GeoReader.cxx:317
CbmBinnedGeoReader::fLastStationNumber
int fLastStationNumber
Definition: GeoReader.h:79
CbmBinnedGeoReader::FindNode
void FindNode(std::list< const char * > nodePath, std::list< TGeoNode * > &results, TGeoNode *rootNode=0)
Definition: GeoReader.cxx:428
CbmBinnedGeoReader::Instance
static CbmBinnedGeoReader * Instance()
Definition: GeoReader.cxx:17
CbmBinnedGeoReader::CbmBinnedGeoReader
CbmBinnedGeoReader(const CbmBinnedGeoReader &)=delete
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmBinnedGeoReader::fNavigator
TGeoNavigator * fNavigator
Definition: GeoReader.h:76
CbmBinnedGeoReader::ReadRich
void ReadRich()
Definition: GeoReader.cxx:302
CbmBinnedGeoReader::fDetectorReaders
std::map< std::string, void(CbmBinnedGeoReader::*)()> fDetectorReaders
Definition: GeoReader.h:77
CbmBinnedGeoReader::CbmBinnedGeoReader
CbmBinnedGeoReader(FairRootManager *, CbmBinnedTracker *tracker)
Definition: GeoReader.cxx:30
CbmBinnedHitReader
Definition: HitReader.h:26
CbmBinnedGeoReader::HandleActive
void HandleActive(TGeoNode *node, Double_t &left, Double_t &right, Double_t &top, Double_t &bottom, Double_t &front, Double_t &back)
Definition: GeoReader.cxx:251
CbmBinnedGeoReader::HandleStation
void HandleStation(TGeoNode *node, std::list< const char * >::const_iterator geoPath, std::list< const char * >::const_iterator geoPathEnd, Double_t &left, Double_t &right, Double_t &top, Double_t &bottom, Double_t &front, Double_t &back)
Definition: GeoReader.cxx:224
Tracker.h
HitReader.h
CbmBinnedTracker
Definition: Tracker.h:29
CbmBinnedGeoReader::ReadTrd
void ReadTrd()
Definition: GeoReader.cxx:334
CbmBinnedGeoReader::fTracker
CbmBinnedTracker * fTracker
Definition: GeoReader.h:78
CbmBinnedGeoReader::FindGeoChild
void FindGeoChild(TGeoNode *node, const char *name, std::list< TGeoNode * > &results)
Definition: GeoReader.cxx:93
CbmBinnedGeoReader
Definition: GeoReader.h:27
CbmBinnedGeoReader::Read
void Read()
Definition: GeoReader.cxx:109
CbmBinnedGeoReader::SearchStation
void SearchStation(ECbmModuleId stationType, TGeoNode *node, CbmBinnedHitReader *hitReader, std::list< const char * >::const_iterator stationPath, std::list< const char * >::const_iterator stationPathEnd, const std::list< const char * > &geoPath, bool is4d=false)
Definition: GeoReader.cxx:136
CbmBinnedGeoReader::ReadSts
void ReadSts()
Definition: GeoReader.cxx:285
CbmBinnedGeoReader::ReadDetector
void ReadDetector(const char *name)
Definition: GeoReader.cxx:127
CbmBinnedGeoReader::operator=
CbmBinnedGeoReader & operator=(const CbmBinnedGeoReader &)=delete
CbmBinnedGeoReader::ReadTarget
void ReadTarget()
Definition: GeoReader.cxx:366
CbmBinnedGeoReader::ReadTof
void ReadTof()
Definition: GeoReader.cxx:351