]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliDetSwitch.h
uncommented loading libZDC
[u/mrichter/AliRoot.git] / AliGeant4 / AliDetSwitch.h
1 // $Id$
2 // Category: geometry
3 //
4 // Data type class that stores available detector option.
5 // Used in interactive detector setup.
6
7 #ifndef ALI_DET_SWITCH_H
8 #define ALI_DET_SWITCH_H
9
10 #include "AliModuleType.h"
11
12 #include <globals.hh>
13
14 class AliDetSwitch
15 {
16   public:
17     AliDetSwitch(G4String detName, G4int nofVersions, G4int defaultVersion,
18                  AliModuleType modType = kDetector, G4bool isStandalone = true);
19     AliDetSwitch(const AliDetSwitch& right);
20     virtual ~AliDetSwitch();
21
22     //operators
23     AliDetSwitch& operator=(const AliDetSwitch& right);
24     G4int operator==(const AliDetSwitch& right) const;
25     G4int operator!=(const AliDetSwitch& right) const;
26     
27     // methods
28     void SwitchOn(G4int version); 
29     void SwitchOnDefault(); 
30     void SwitchOff(); 
31
32     // get methods
33     G4String GetDetName() const;
34     G4int GetNofVersions() const;
35     G4int GetDefaultVersion() const;
36     G4bool IsStandalone() const;
37     AliModuleType GetType() const;
38     G4int GetSwitchedVersion() const;
39
40   private:
41     // data members
42     G4String       fDetName;         //module name
43     G4int          fNofVersions;     //number of versions
44     G4int          fDefaultVersion;  //default version
45     G4bool         fIsStandalone;    //true if module can be built standalone
46     AliModuleType  fType;            //type of module (detector or structure)
47     G4int          fSwitchedVersion; //current selected version
48 };
49     
50 // inline methods    
51     
52 inline G4String AliDetSwitch::GetDetName() const
53 { return fDetName; }
54
55 inline G4int AliDetSwitch::GetNofVersions() const
56 { return fNofVersions; }
57
58 inline G4int AliDetSwitch::GetDefaultVersion() const
59 { return fDefaultVersion; }
60
61 inline G4int AliDetSwitch::GetSwitchedVersion() const
62 { return fSwitchedVersion; }
63
64 inline AliModuleType AliDetSwitch::GetType() const
65 { return fType; }
66
67 inline G4bool AliDetSwitch::IsStandalone() const
68 { return fIsStandalone; }
69
70 #endif //ALI_DET_SWITCH_H