]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliDetSwitch.h
TG4SteppingAction update commented
[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                  G4int pprVersion, AliModuleType modType = kDetector, 
19                  G4bool isStandalone = true);
20     AliDetSwitch(const AliDetSwitch& right);
21     virtual ~AliDetSwitch();
22
23     //operators
24     AliDetSwitch& operator=(const AliDetSwitch& right);
25     G4int operator==(const AliDetSwitch& right) const;
26     G4int operator!=(const AliDetSwitch& right) const;
27     
28     // methods
29     void SwitchOn(G4int version); 
30     void SwitchOnDefault(); 
31     void SwitchOnPPR(); 
32     void SwitchOff(); 
33
34     // get methods
35     G4String GetDetName() const;
36     G4int GetNofVersions() const;
37     G4int GetDefaultVersion() const;
38     G4int GetPPRVersion() const;
39     G4bool IsStandalone() const;
40     AliModuleType GetType() const;
41     G4int GetSwitchedVersion() const;
42
43   private:
44     // data members
45     G4String       fDetName;         //module name
46     G4int          fNofVersions;     //number of versions
47     G4int          fDefaultVersion;  //default version
48     G4int          fPPRVersion;      //default PPR version
49     G4bool         fIsStandalone;    //true if module can be built standalone
50     AliModuleType  fType;            //type of module (detector or structure)
51     G4int          fSwitchedVersion; //current selected version
52 };
53     
54 // inline methods    
55     
56 inline G4String AliDetSwitch::GetDetName() const
57 { return fDetName; }
58
59 inline G4int AliDetSwitch::GetNofVersions() const
60 { return fNofVersions; }
61
62 inline G4int AliDetSwitch::GetDefaultVersion() const
63 { return fDefaultVersion; }
64
65 inline G4int AliDetSwitch::GetPPRVersion() const
66 { return fPPRVersion; }
67
68 inline G4int AliDetSwitch::GetSwitchedVersion() const
69 { return fSwitchedVersion; }
70
71 inline AliModuleType AliDetSwitch::GetType() const
72 { return fType; }
73
74 inline G4bool AliDetSwitch::IsStandalone() const
75 { return fIsStandalone; }
76
77 #endif //ALI_DET_SWITCH_H