]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: geometry | |
3 | // | |
7005154f | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class AliDetSwitch | |
7 | // ------------------ | |
8 | // Data type class that stores available detector options. | |
676fb573 | 9 | // Used in interactive detector setup. |
10 | ||
11 | #ifndef ALI_DET_SWITCH_H | |
12 | #define ALI_DET_SWITCH_H | |
13 | ||
14 | #include "AliModuleType.h" | |
15 | ||
16 | #include <globals.hh> | |
17 | ||
18 | class AliDetSwitch | |
19 | { | |
20 | public: | |
21 | AliDetSwitch(G4String detName, G4int nofVersions, G4int defaultVersion, | |
488f10fc | 22 | G4int pprVersion, AliModuleType modType = kDetector, |
23 | G4bool isStandalone = true); | |
676fb573 | 24 | AliDetSwitch(const AliDetSwitch& right); |
25 | virtual ~AliDetSwitch(); | |
26 | ||
27 | //operators | |
28 | AliDetSwitch& operator=(const AliDetSwitch& right); | |
29 | G4int operator==(const AliDetSwitch& right) const; | |
30 | G4int operator!=(const AliDetSwitch& right) const; | |
31 | ||
32 | // methods | |
33 | void SwitchOn(G4int version); | |
34 | void SwitchOnDefault(); | |
488f10fc | 35 | void SwitchOnPPR(); |
676fb573 | 36 | void SwitchOff(); |
37 | ||
38 | // get methods | |
39 | G4String GetDetName() const; | |
40 | G4int GetNofVersions() const; | |
41 | G4int GetDefaultVersion() const; | |
488f10fc | 42 | G4int GetPPRVersion() const; |
676fb573 | 43 | G4bool IsStandalone() const; |
44 | AliModuleType GetType() const; | |
45 | G4int GetSwitchedVersion() const; | |
46 | ||
47 | private: | |
48 | // data members | |
49 | G4String fDetName; //module name | |
50 | G4int fNofVersions; //number of versions | |
51 | G4int fDefaultVersion; //default version | |
488f10fc | 52 | G4int fPPRVersion; //default PPR version |
676fb573 | 53 | G4bool fIsStandalone; //true if module can be built standalone |
54 | AliModuleType fType; //type of module (detector or structure) | |
55 | G4int fSwitchedVersion; //current selected version | |
56 | }; | |
57 | ||
58 | // inline methods | |
59 | ||
60 | inline G4String AliDetSwitch::GetDetName() const | |
61 | { return fDetName; } | |
62 | ||
63 | inline G4int AliDetSwitch::GetNofVersions() const | |
64 | { return fNofVersions; } | |
65 | ||
66 | inline G4int AliDetSwitch::GetDefaultVersion() const | |
67 | { return fDefaultVersion; } | |
68 | ||
488f10fc | 69 | inline G4int AliDetSwitch::GetPPRVersion() const |
70 | { return fPPRVersion; } | |
71 | ||
676fb573 | 72 | inline G4int AliDetSwitch::GetSwitchedVersion() const |
73 | { return fSwitchedVersion; } | |
74 | ||
75 | inline AliModuleType AliDetSwitch::GetType() const | |
76 | { return fType; } | |
77 | ||
78 | inline G4bool AliDetSwitch::IsStandalone() const | |
79 | { return fIsStandalone; } | |
80 | ||
81 | #endif //ALI_DET_SWITCH_H |