/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/cmd/include/RAT/DBMessenger.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/cmd/include/RAT/DBMessenger.hh Source File
Ratpac-two
DBMessenger.hh
1 #ifndef __RAT_DBMessenger__
2 #define __RAT_DBMessenger__
3 
4 #include <G4String.hh>
5 #include <G4UIcmdWithAString.hh>
6 #include <G4UIcmdWithAnInteger.hh>
7 #include <G4UIcommand.hh>
8 #include <G4UImessenger.hh>
9 #include <RAT/DB.hh>
10 #include <string>
11 
12 namespace RAT {
13 
14 class DBMessenger : public G4UImessenger {
15  public:
16  DBMessenger() { Init(DB::Get()); };
17  DBMessenger(DB *dbToUse) { Init(dbToUse); };
18  ~DBMessenger();
19 
20  G4String GetCurrentValue(G4UIcommand *command);
21  void SetNewValue(G4UIcommand *command, G4String newValue);
22 
23  void Load(std::string filename);
24  void Set(std::string tbl_descriptor, std::string field, std::string value);
25  void Server(std::string url);
26  void Run(int run);
27 
28  protected:
29  void Init(DB *dbToUse);
30 
31  DB *db;
32  G4UIcmdWithAString *loadCmd;
33  G4UIcommand *setCmd;
34  G4UIcmdWithAString *serverCmd;
35  G4UIcmdWithAnInteger *runCmd;
36 };
37 
38 } // namespace RAT
39 
40 #endif
Definition: DBMessenger.hh:14
Definition: DB.hh:126
static DB * Get()
Definition: DB.hh:135
Definition: CCCrossSecMessenger.hh:29