]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TGeant4/TG4G3ControlVector.h
Avoid errors in the VirtuaMC version of AliRoot
[u/mrichter/AliRoot.git] / TGeant4 / TG4G3ControlVector.h
1 // $Id$
2 // Category: global
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class TG4G3ControlVector
7 // ------------------------
8 // Vector of control process values
9 // with convenient set/get methods.
10
11 #ifndef TG4_G3_CONTROL_VECTOR_H
12 #define TG4_G3_CONTROL_VECTOR_H
13
14 #include "TG4Globals.h"
15 #include "TG4G3Control.h"
16
17 #include <g4std/vector>
18
19 class TG4G3CutVector;
20
21 class G4VProcess;
22
23 class TG4G3ControlVector
24 {
25   typedef G4std::vector<TG4G3ControlValue> TG4ControlValueVector;
26
27   public:
28     TG4G3ControlVector();
29     TG4G3ControlVector(const TG4G3ControlVector& right);
30     virtual ~TG4G3ControlVector();
31     
32     // operators
33     TG4G3ControlVector& operator=(const TG4G3ControlVector& right);
34     TG4G3ControlValue operator[](G4int index) const;
35
36     // static methods 
37     static TG4G3Control      GetControl(const G4String& controlName);
38     static const G4String&   GetControlName(TG4G3Control control);
39     static TG4G3ControlValue GetControlValue(G4int value, 
40                                              TG4G3Control control);
41     static TG4G3ControlValue GetControlValue(G4double value, 
42                                              TG4G3Control control);
43
44     // set methods
45     G4bool SetControl(TG4G3Control control, TG4G3ControlValue controlValue,
46                     TG4G3CutVector& cuts);
47     void   SetG3Defaults();
48     G4bool Update(const TG4G3ControlVector& vector);
49     
50     // methods
51     G4String Format() const;
52     void Print() const;
53     
54     // get methods
55     TG4G3ControlValue GetControlValue(G4VProcess* process) const; 
56     TG4G3ControlValue GetControlValue(TG4G3Control control) const; 
57     G4bool IsControl() const;
58
59   private:
60     // static methods 
61     static void FillControlNameVector();
62   
63     // static data members
64     static TG4StringVector  fgControlNameVector; //vector of control parameters
65                                                  //names
66
67     // data members
68     TG4ControlValueVector   fControlVector; //vector of control process values
69 };
70
71 #endif //TG4_G3_CONTROL_VECTOR_H
72
73
74