BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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
6/** UniDetector.h
7 ** Class for the table: detector_
8 **/
9
10#ifndef UniDetector_H
11#define UniDetector_H 1
12
13#include "TDatime.h"
14#include "TString.h"
15#include "UniConnection.h"
16
18{
19 private:
20 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
21 /// connection to the database
23
24 /// detector name
26 /// detector description
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
38 /// add new detector to the database
39 static UniDetector* CreateDetector(TString detector_name, TString* detector_desc);
40 /// get detector from the database
41 static UniDetector* GetDetector(TString detector_name);
42 /// check detector exists in the database: 1- true, 0 - false, <0 - database operation error
43 static int CheckDetectorExists(TString detector_name);
44 /// delete detector from the database
45 static int DeleteDetector(TString detector_name);
46 /// print all detectors
47 static int PrintAll();
48
49 // Getters
50 /// get detector name of the current detector
52 /// get detector description of the current detector
54 {
55 if (str_detector_desc == nullptr)
56 return nullptr;
57 else
58 return new TString(*str_detector_desc);
59 }
60
61 // Setters
62 /// set detector name of the current detector
63 int SetDetectorName(TString detector_name);
64 /// set detector description of the current detector
65 int SetDetectorDesc(TString* detector_desc);
66
67 /// print information about current detector
68 void Print();
69 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
70
72};
73
74#endif
#define ClassDef(name, id)
UniDetector.h Class for the table: detector_.
Definition UniDetector.h:18
void Print()
print information about current detector
int SetDetectorName(TString detector_name)
set detector name of the current detector
TString str_detector_name
detector name
Definition UniDetector.h:25
UniDetector(UniConnection *db_connect, TString detector_name, TString *detector_desc)
TString GetDetectorName()
get detector name of the current detector
Definition UniDetector.h:51
static int CheckDetectorExists(TString detector_name)
check detector exists in the database: 1- true, 0 - false, <0 - database operation error
TString * str_detector_desc
detector description
Definition UniDetector.h:27
static int PrintAll()
print all detectors
static int DeleteDetector(TString detector_name)
delete detector from the database
virtual ~UniDetector()
UniConnection * connectionDB
connection to the database
Definition UniDetector.h:22
static UniDetector * CreateDetector(TString detector_name, TString *detector_desc)
add new detector to the database
TString * GetDetectorDesc()
get detector description of the current detector
Definition UniDetector.h:53
static UniDetector * GetDetector(TString detector_name)
get detector from the database
int SetDetectorDesc(TString *detector_desc)
set detector description of the current detector