CbmRoot
CbmLitDetectorSetup.h
Go to the documentation of this file.
1 
7 #ifndef CBMLITDETECTORSETUP_H_
8 #define CBMLITDETECTORSETUP_H_
9 
10 #include "CbmDefs.h"
11 #include <map>
12 #include <string>
13 using std::map;
14 using std::string;
15 
23 public:
28 
32  virtual ~CbmLitDetectorSetup();
33 
39  void SetDet(ECbmModuleId detId, bool isDet);
40 
46  bool GetDet(ECbmModuleId detId) const;
47 
52  void SetElectronSetup(bool isElectronSetup) {
53  fIsElectronSetup = isElectronSetup;
54  }
55 
60  bool GetElectronSetup() const { return fIsElectronSetup; }
61 
66  void SetMuonSetup(bool isMuonSetup) { fIsMuonSetup = isMuonSetup; }
67 
72  bool GetMuonSetup() const { return fIsMuonSetup; }
73 
77  void DetermineSetup();
78 
83  string ToString() const;
84 
85 private:
91  bool CheckDetectorPresence(const std::string& name) const;
92 
93  bool fIsElectronSetup; // If "electron" setup detected than true
94  bool fIsMuonSetup; // If "muon" setup detected than true
95  map<ECbmModuleId, bool> fDet; // Map DetectorId to detector presence
96 };
97 
98 #endif /* CBMLITDETECTORSETUP_H_ */
CbmLitDetectorSetup::SetMuonSetup
void SetMuonSetup(bool isMuonSetup)
Set muon setup of detector.
Definition: CbmLitDetectorSetup.h:66
CbmLitDetectorSetup::CheckDetectorPresence
bool CheckDetectorPresence(const std::string &name) const
Check detector presence using TGeoManager.
Definition: CbmLitDetectorSetup.cxx:32
CbmLitDetectorSetup::GetMuonSetup
bool GetMuonSetup() const
Return true if muon setup is detected.
Definition: CbmLitDetectorSetup.h:72
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmLitDetectorSetup
Helper class to access detector presence.
Definition: CbmLitDetectorSetup.h:22
CbmLitDetectorSetup::fIsMuonSetup
bool fIsMuonSetup
Definition: CbmLitDetectorSetup.h:94
CbmLitDetectorSetup::fIsElectronSetup
bool fIsElectronSetup
Definition: CbmLitDetectorSetup.h:93
CbmLitDetectorSetup::SetElectronSetup
void SetElectronSetup(bool isElectronSetup)
Set electron setup of detector.
Definition: CbmLitDetectorSetup.h:52
CbmLitDetectorSetup::GetDet
bool GetDet(ECbmModuleId detId) const
Return detector presence in setup.
Definition: CbmLitDetectorSetup.cxx:27
CbmLitDetectorSetup::CbmLitDetectorSetup
CbmLitDetectorSetup()
Constructor.
Definition: CbmLitDetectorSetup.cxx:18
CbmLitDetectorSetup::fDet
map< ECbmModuleId, bool > fDet
Definition: CbmLitDetectorSetup.h:95
CbmLitDetectorSetup::GetElectronSetup
bool GetElectronSetup() const
Return true if electron setup is detected.
Definition: CbmLitDetectorSetup.h:60
CbmLitDetectorSetup::ToString
string ToString() const
Return string representation of class.
Definition: CbmLitDetectorSetup.cxx:99
CbmLitDetectorSetup::SetDet
void SetDet(ECbmModuleId detId, bool isDet)
Set detector presence manually.
Definition: CbmLitDetectorSetup.cxx:23
CbmLitDetectorSetup::~CbmLitDetectorSetup
virtual ~CbmLitDetectorSetup()
Destructor.
Definition: CbmLitDetectorSetup.cxx:21
CbmLitDetectorSetup::DetermineSetup
void DetermineSetup()
Determines detector presence using TGeoManager.
Definition: CbmLitDetectorSetup.cxx:79
CbmDefs.h