4 // Author: I. Hrivnacova
6 // Class TG4G3ControlVector
7 // ------------------------
8 // Vector of control process values
9 // with convenient set/get methods.
11 #ifndef TG4_G3_CONTROL_VECTOR_H
12 #define TG4_G3_CONTROL_VECTOR_H
14 #include "TG4Globals.h"
15 #include "TG4G3Control.h"
17 #include <g4std/vector>
23 class TG4G3ControlVector
25 typedef G4std::vector<TG4G3ControlValue> TG4ControlValueVector;
29 TG4G3ControlVector(const TG4G3ControlVector& right);
30 virtual ~TG4G3ControlVector();
33 TG4G3ControlVector& operator=(const TG4G3ControlVector& right);
34 TG4G3ControlValue operator[](G4int index) const;
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);
45 G4bool SetControl(TG4G3Control control, TG4G3ControlValue controlValue,
46 TG4G3CutVector& cuts);
48 G4bool Update(const TG4G3ControlVector& vector);
51 G4String Format() const;
55 TG4G3ControlValue GetControlValue(G4VProcess* process) const;
56 TG4G3ControlValue GetControlValue(TG4G3Control control) const;
57 G4bool IsControl() const;
61 static void FillControlNameVector();
63 // static data members
64 static TG4StringVector fgControlNameVector; //vector of control parameters
68 TG4ControlValueVector fControlVector; //vector of control process values
71 #endif //TG4_G3_CONTROL_VECTOR_H