]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliDetSwitch.h
pprVersion argument removed from constructor
[u/mrichter/AliRoot.git] / AliGeant4 / AliDetSwitch.h
1 // $Id$
2 // Category: geometry
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliDetSwitch
7 // ------------------
8 // Data type class that stores available detector options.
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,
22                  AliModuleType modType = kDetector, G4bool isStandalone = true);
23     AliDetSwitch(const AliDetSwitch& right);
24     virtual ~AliDetSwitch();
25
26     //operators
27     AliDetSwitch& operator=(const AliDetSwitch& right);
28     G4int operator==(const AliDetSwitch& right) const;
29     G4int operator!=(const AliDetSwitch& right) const;
30     
31     // methods
32     void SwitchOn(G4int version); 
33     void SwitchOnDefault(); 
34     void SwitchOff(); 
35
36     // get methods
37     G4String GetDetName() const;
38     G4int GetNofVersions() const;
39     G4int GetDefaultVersion() const;
40     G4bool IsStandalone() const;
41     AliModuleType GetType() const;
42     G4int GetSwitchedVersion() const;
43
44   private:
45     // data members
46     G4String       fDetName;         //module name
47     G4int          fNofVersions;     //number of versions
48     G4int          fDefaultVersion;  //default 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::GetSwitchedVersion() const
66 { return fSwitchedVersion; }
67
68 inline AliModuleType AliDetSwitch::GetType() const
69 { return fType; }
70
71 inline G4bool AliDetSwitch::IsStandalone() const
72 { return fIsStandalone; }
73
74 #endif //ALI_DET_SWITCH_H