]>
Commit | Line | Data |
---|---|---|
ae542d51 | 1 | // $Id$ |
2 | // Category: global | |
3 | // | |
e5967ab3 | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class TG4G3ControlVector | |
7 | // ------------------------ | |
ae542d51 | 8 | // Vector of control process values |
e5967ab3 | 9 | // with convenient set/get methods. |
ae542d51 | 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 | ||
e5967ab3 | 17 | #include <g4std/vector> |
18 | ||
19 | class TG4G3CutVector; | |
20 | ||
ae542d51 | 21 | class G4VProcess; |
22 | ||
23 | class TG4G3ControlVector | |
24 | { | |
e5967ab3 | 25 | typedef G4std::vector<TG4G3ControlValue> TG4ControlValueVector; |
ae542d51 | 26 | |
27 | public: | |
28 | TG4G3ControlVector(); | |
29 | TG4G3ControlVector(const TG4G3ControlVector& right); | |
30 | virtual ~TG4G3ControlVector(); | |
31 | ||
32 | // operators | |
33 | TG4G3ControlVector& operator=(const TG4G3ControlVector& right); | |
e5967ab3 | 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); | |
ae542d51 | 43 | |
44 | // set methods | |
e5967ab3 | 45 | G4bool SetControl(TG4G3Control control, TG4G3ControlValue controlValue, |
46 | TG4G3CutVector& cuts); | |
47 | void SetG3Defaults(); | |
48 | G4bool Update(const TG4G3ControlVector& vector); | |
49 | ||
50 | // methods | |
d3fd330b | 51 | G4String Format() const; |
e5967ab3 | 52 | void Print() const; |
ae542d51 | 53 | |
54 | // get methods | |
e5967ab3 | 55 | TG4G3ControlValue GetControlValue(G4VProcess* process) const; |
56 | TG4G3ControlValue GetControlValue(TG4G3Control control) const; | |
57 | G4bool IsControl() const; | |
ae542d51 | 58 | |
59 | private: | |
e5967ab3 | 60 | // static methods |
61 | static void FillControlNameVector(); | |
62 | ||
63 | // static data members | |
64 | static TG4StringVector fgControlNameVector; //vector of control parameters | |
65 | //names | |
66 | ||
ae542d51 | 67 | // data members |
e5967ab3 | 68 | TG4ControlValueVector fControlVector; //vector of control process values |
ae542d51 | 69 | }; |
70 | ||
71 | #endif //TG4_G3_CONTROL_VECTOR_H | |
72 | ||
73 | ||
74 |