BmnRoot
Loading...
Searching...
No Matches
ElogTrigger.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2// ElogTrigger header file
3// Generated 27-11-2017
4// ----------------------------------------------------------------------
5
10#ifndef ElogTrigger_H
11#define ElogTrigger_H 1
12
13#include "ElogConnection.h"
14#include "TDatime.h"
15#include "TString.h"
16
17class ElogTrigger
18{
19 private:
20 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22 ElogConnection* connectionDB;
23
25 int i_trigger_id;
27 TString str_trigger_info;
29 bool b_is_active;
30
31 // Constructor
32 ElogTrigger(ElogConnection* db_connect, int trigger_id, TString trigger_info, bool is_active);
33 /* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
34
35 public:
36 /* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
37 virtual ~ElogTrigger(); // Destructor
38
39 // static class functions
41 static ElogTrigger* CreateTrigger(TString trigger_info, bool is_active);
43 static ElogTrigger* GetTrigger(int trigger_id);
45 static ElogTrigger* GetTrigger(TString trigger_info);
47 static int CheckTriggerExists(int trigger_id);
49 static int CheckTriggerExists(TString trigger_info);
51 static int DeleteTrigger(int trigger_id);
53 static int DeleteTrigger(TString trigger_info);
55 static int PrintAll();
56
57 // Getters
59 int GetTriggerId() { return i_trigger_id; }
61 TString GetTriggerInfo() { return str_trigger_info; }
63 bool GetIsActive() { return b_is_active; }
64
65 // Setters
67 int SetTriggerInfo(TString trigger_info);
69 int SetIsActive(bool is_active);
70
72 void Print();
73 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
74
76};
77
78#endif
int SetTriggerInfo(TString trigger_info)
set trigger info of the current trigger
static int CheckTriggerExists(int trigger_id)
check trigger exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteTrigger(TString trigger_info)
delete trigger from the database
static ElogTrigger * GetTrigger(TString trigger_info)
get trigger from the database
static int CheckTriggerExists(TString trigger_info)
check trigger exists in the database: 1- true, 0 - false, <0 - database operation error
static ElogTrigger * GetTrigger(int trigger_id)
get trigger from the database
void Print()
print information about current trigger
static int DeleteTrigger(int trigger_id)
delete trigger from the database
virtual ~ElogTrigger()
ClassDef(ElogTrigger, 1)
bool GetIsActive()
get is active of the current trigger
Definition ElogTrigger.h:63
TString GetTriggerInfo()
get trigger info of the current trigger
Definition ElogTrigger.h:61
static ElogTrigger * CreateTrigger(TString trigger_info, bool is_active)
add new trigger to the database
static int PrintAll()
print all triggers
int GetTriggerId()
get trigger id of the current trigger
Definition ElogTrigger.h:59
int SetIsActive(bool is_active)
set is active of the current trigger