]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliDetSwitch.h
Mostly minor style modifications to be ready for cloning with EMCAL
[u/mrichter/AliRoot.git] / AliGeant4 / AliDetSwitch.h
CommitLineData
676fb573 1// $Id$
2// Category: geometry
3//
7005154f 4// Author: I. Hrivnacova
5//
6// Class AliDetSwitch
7// ------------------
3b37b924 8// Data type class that stores available detector options.
9// Used in interactive detector setup.
676fb573 10
3b37b924 11#ifndef ALI_DET_SWITCH_H
12#define ALI_DET_SWITCH_H
676fb573 13
3b37b924 14#include "AliModuleType.h"
676fb573 15
3b37b924 16#include <globals.hh>
676fb573 17
3b37b924 18class AliDetSwitch
676fb573 19{
3b37b924 20 public:
ec2c9528 21 AliDetSwitch(G4String detName,
22 G4int nofVersions,
23 G4int defaultVersion,
24 AliModuleType modType = kDetector);
3b37b924 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;
ec2c9528 40 G4int GetNofVersions() const;
41 G4int GetDefaultVersion() const;
3b37b924 42 AliModuleType GetType() const;
ec2c9528 43 G4int GetSwitchedVersion() const;
3b37b924 44
45 private:
46 // data members
47 G4String fDetName; //module name
48 G4int fNofVersions; //number of versions
49 G4int fDefaultVersion; //default version
3b37b924 50 AliModuleType fType; //type of module (detector or structure)
51 G4int fSwitchedVersion; //current selected version
52};
53
54// inline methods
55
56inline G4String AliDetSwitch::GetDetName() const
57{ return fDetName; }
58
59inline G4int AliDetSwitch::GetNofVersions() const
60{ return fNofVersions; }
61
62inline G4int AliDetSwitch::GetDefaultVersion() const
63{ return fDefaultVersion; }
64
65inline G4int AliDetSwitch::GetSwitchedVersion() const
66{ return fSwitchedVersion; }
67
68inline AliModuleType AliDetSwitch::GetType() const
69{ return fType; }
70
3b37b924 71#endif //ALI_DET_SWITCH_H