BmnRoot
Loading...
Searching...
No Matches
UniDetector.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2// UniDetector header file
3// Generated 05-11-2015
4// ----------------------------------------------------------------------
5
10#ifndef UniDetector_H
11#define UniDetector_H 1
12
13#include "TDatime.h"
14#include "TString.h"
15#include "UniConnection.h"
16
17class UniDetector
18{
19 private:
20 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22 UniConnection* connectionDB;
23
25 TString str_detector_name;
27 TString* str_detector_desc;
28
29 // Constructor
30 UniDetector(UniConnection* db_connect, TString detector_name, TString* detector_desc);
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 ~UniDetector(); // Destructor
36
37 // static class functions
39 static UniDetector* CreateDetector(TString detector_name, TString* detector_desc);
41 static UniDetector* GetDetector(TString detector_name);
43 static int CheckDetectorExists(TString detector_name);
45 static int DeleteDetector(TString detector_name);
47 static int PrintAll();
48
49 // Getters
51 TString GetDetectorName() { return str_detector_name; }
53 TString* GetDetectorDesc()
54 {
55 if (str_detector_desc == nullptr)
56 return nullptr;
57 else
58 return new TString(*str_detector_desc);
59 }
60
61 // Setters
63 int SetDetectorName(TString detector_name);
65 int SetDetectorDesc(TString* detector_desc);
66
68 void Print();
69 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
70
72};
73
74#endif
void Print()
print information about current detector
int SetDetectorName(TString detector_name)
set detector name of the current detector
static int PrintAll()
print all detectors
static UniDetector * GetDetector(TString detector_name)
get detector from the database
TString GetDetectorName()
get detector name of the current detector
Definition UniDetector.h:51
static UniDetector * CreateDetector(TString detector_name, TString *detector_desc)
add new detector to the database
ClassDef(UniDetector, 1)
static int DeleteDetector(TString detector_name)
delete detector from the database
virtual ~UniDetector()
static int CheckDetectorExists(TString detector_name)
check detector exists in the database: 1- true, 0 - false, <0 - database operation error
TString * GetDetectorDesc()
get detector description of the current detector
Definition UniDetector.h:53
int SetDetectorDesc(TString *detector_desc)
set detector description of the current detector