]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliDetSwitch.h
Smaller changes
[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, 
22                  G4int nofVersions, 
23                  G4int defaultVersion,
24                  AliModuleType modType = kDetector);
25     AliDetSwitch(const AliDetSwitch& right);
26     virtual ~AliDetSwitch();
27
28     //operators
29     AliDetSwitch& operator=(const AliDetSwitch& right);
30     G4int operator==(const AliDetSwitch& right) const;
31     G4int operator!=(const AliDetSwitch& right) const;
32     
33     // methods
34     void SwitchOn(G4int version); 
35     void SwitchOnDefault(); 
36     void SwitchOff(); 
37
38     // get methods
39     G4String GetDetName() const;
40     G4int    GetNofVersions() const;
41     G4int    GetDefaultVersion() 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     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 #endif //ALI_DET_SWITCH_H