]>
Commit | Line | Data |
---|---|---|
2f310734 | 1 | // $Id$ |
2 | // Category: geometry | |
3 | // | |
4 | // Author: I. Hrivnacova | |
5 | // | |
6 | // Class AliDetSwitchVector | |
7 | // --------------------------- | |
8 | // The class contains a vector of detector switches | |
9 | // and provides methods for their interactive setting. | |
10 | ||
11 | #ifndef ALI_DET_SWITCH_VECTOR_H | |
12 | #define ALI_DET_SWITCH_VECTOR_H | |
13 | ||
14 | #include "AliDetSwitchVectorMessenger.h" | |
15 | ||
16 | #include <globals.hh> | |
17 | #include <g4std/vector> | |
18 | ||
19 | class AliDetSwitch; | |
20 | ||
21 | class AliDetSwitchVector | |
22 | { | |
23 | typedef G4std::vector<AliDetSwitch*> DetSwitchVector; | |
24 | typedef DetSwitchVector::iterator DetSwitchIterator; | |
25 | typedef DetSwitchVector::const_iterator DetSwitchConstIterator; | |
26 | ||
27 | public: | |
28 | AliDetSwitchVector(); | |
29 | // --> protected | |
30 | // AliDetSwitchVector(const AliDetSwitchVector& right); | |
31 | virtual ~AliDetSwitchVector(); | |
32 | ||
33 | // methods | |
34 | void Add(AliDetSwitch* detSwitch); | |
f9e5604c | 35 | void UpdateMessenger(); |
2f310734 | 36 | void SwitchDetOn(const G4String& moduleNameVer); |
37 | void SwitchDetOn(const G4String& moduleName, G4int version); | |
38 | void SwitchDetOnDefault(const G4String& moduleName); | |
39 | void SwitchDetOff(const G4String& moduleName); | |
40 | void PrintSwitchedDets() const; | |
41 | void PrintAvailableDets() const; | |
42 | ||
43 | // get methods | |
44 | G4int GetSize() const; | |
45 | AliDetSwitch* GetDetSwitch(G4int i) const; | |
46 | AliDetSwitch* GetDetSwitch(const G4String& moduleName) const; | |
47 | G4String GetSwitchedDetsList() const; | |
48 | G4String GetAvailableDetsList() const; | |
49 | G4String GetAvailableDetsListWithCommas() const; | |
50 | G4String GetDetNamesList() const; | |
51 | G4String GetDetNamesListWithCommas() const; | |
52 | ||
53 | protected: | |
54 | AliDetSwitchVector(const AliDetSwitchVector& right); | |
55 | ||
56 | // operators | |
57 | AliDetSwitchVector& operator=(const AliDetSwitchVector& right); | |
58 | ||
59 | private: | |
60 | // data members | |
61 | AliDetSwitchVectorMessenger fMessenger; //messenger | |
62 | DetSwitchVector fDetSwitchVector; //vector of AliDetSwitch | |
63 | }; | |
64 | ||
65 | // inline methods | |
66 | ||
f9e5604c | 67 | inline void AliDetSwitchVector::UpdateMessenger() |
68 | { fMessenger.Update(); } | |
69 | ||
2f310734 | 70 | inline G4int AliDetSwitchVector::GetSize() const |
71 | { return fDetSwitchVector.size(); } | |
72 | ||
73 | inline AliDetSwitch* AliDetSwitchVector::GetDetSwitch(G4int i) const | |
74 | { return fDetSwitchVector[i]; } | |
75 | ||
76 | #endif //ALI_DET_SWITCH_VECTOR_H | |
77 |