BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
ElogBeam.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2// ElogBeam header file
3// Generated 27-11-2017
4// ----------------------------------------------------------------------
5
6/** ElogBeam.h
7 ** Class for the table: beam_
8 **/
9
10#ifndef ElogBeam_H
11#define ElogBeam_H 1
12
13#include "ElogConnection.h"
14#include "TDatime.h"
15#include "TString.h"
16
17class ElogBeam
18{
19 private:
20 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
21 /// connection to the database
22 ElogConnection* connectionDB;
23
24 /// beam
25 TString str_beam;
26 /// is active
27 bool b_is_active;
28
29 // Constructor
30 ElogBeam(ElogConnection* db_connect, TString beam, bool is_active);
31 /* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
32
33 public:
34 /* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
35 virtual ~ElogBeam(); // Destructor
36
37 // static class functions
38 /// add new beam to the database
39 static ElogBeam* CreateBeam(TString beam, bool is_active);
40 /// get beam from the database
41 static ElogBeam* GetBeam(TString beam);
42 /// check beam exists in the database: 1- true, 0 - false, <0 - database operation error
43 static int CheckBeamExists(TString beam);
44 /// delete beam from the database
45 static int DeleteBeam(TString beam);
46 /// print all beams
47 static int PrintAll();
48
49 // Getters
50 /// get beam of the current beam
51 TString GetBeam() { return str_beam; }
52 /// get is active of the current beam
53 bool GetIsActive() { return b_is_active; }
54
55 // Setters
56 /// set beam of the current beam
57 int SetBeam(TString beam);
58 /// set is active of the current beam
59 int SetIsActive(bool is_active);
60
61 /// print information about current beam
62 void Print();
63 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
64
66};
67
68#endif
#define ClassDef(name, id)
ElogBeam.h Class for the table: beam_.
Definition ElogBeam.h:18
static ElogBeam * GetBeam(TString beam)
get beam from the database
ElogConnection * connectionDB
connection to the database
Definition ElogBeam.h:22
static int CheckBeamExists(TString beam)
check beam exists in the database: 1- true, 0 - false, <0 - database operation error
TString GetBeam()
get beam of the current beam
Definition ElogBeam.h:51
int SetBeam(TString beam)
set beam of the current beam
static int DeleteBeam(TString beam)
delete beam from the database
static ElogBeam * CreateBeam(TString beam, bool is_active)
add new beam to the database
TString str_beam
beam
Definition ElogBeam.h:25
ElogBeam(ElogConnection *db_connect, TString beam, bool is_active)
void Print()
print information about current beam
static int PrintAll()
print all beams
bool GetIsActive()
get is active of the current beam
Definition ElogBeam.h:53
int SetIsActive(bool is_active)
set is active of the current beam
bool b_is_active
is active
Definition ElogBeam.h:27
virtual ~ElogBeam()