]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliDetSwitch.h
corrected previous mistaken commitment (.cxx instead of .h)
[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                  G4int pprVersion, AliModuleType modType = kDetector, 
23                  G4bool isStandalone = true);
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(); 
35     void SwitchOff(); 
36
37     // get methods
38     G4String GetDetName() const;
39     G4int GetNofVersions() const;
40     G4int GetDefaultVersion() const;
41     G4bool IsStandalone() const;
42     AliModuleType GetType() const;
43     G4int GetSwitchedVersion() const;
44
45   private:
46     // data members
47     G4String       fDetName;         //module name
48     G4int          fNofVersions;     //number of versions
49     G4int          fDefaultVersion;  //default version
50     G4bool         fIsStandalone;    //true if module can be built standalone
51     AliModuleType  fType;            //type of module (detector or structure)
52     G4int          fSwitchedVersion; //current selected version
53 };
54     
55 // inline methods    
56     
57 inline G4String AliDetSwitch::GetDetName() const
58 { return fDetName; }
59
60 inline G4int AliDetSwitch::GetNofVersions() const
61 { return fNofVersions; }
62
63 inline G4int AliDetSwitch::GetDefaultVersion() const
64 { return fDefaultVersion; }
65
66 inline G4int AliDetSwitch::GetSwitchedVersion() const
67 { return fSwitchedVersion; }
68
69 inline AliModuleType AliDetSwitch::GetType() const
70 { return fType; }
71
72 inline G4bool AliDetSwitch::IsStandalone() const
73 { return fIsStandalone; }
74
75 #endif //ALI_DET_SWITCH_H