BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
UniSimulationFile.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2// UniSimulationFile header file
3// Generated 05-11-2015
4// ----------------------------------------------------------------------
5
6/** UniSimulationFile.h
7 ** Class for the table: simulation_file
8 **/
9
10#ifndef UniSimulationFile_H
11#define UniSimulationFile_H 1
12
13#include "TDatime.h"
14#include "TString.h"
15#include "UniConnection.h"
16#include "UniSearchCondition.h"
17
19{
20 private:
21 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22 /// connection to the database
23 UniConnection* connectionDB;
24
25 /// file id
26 int i_file_id;
27 /// generator name
28 TString str_generator_name;
29 /// file type
30 int i_file_type;
31 /// file path
32 TString str_file_path;
33 /// beam particle
34 TString str_beam_particle;
35 /// target particle
36 TString str_target_particle;
37 /// energy
38 double* d_energy;
39 /// centrality
40 TString str_centrality;
41 /// event count
42 int* i_event_count;
43 /// file size
44 int64_t* i64_file_size;
45 /// file hash
46 TString* str_file_hash;
47 /// file desc
48 TString* str_file_desc;
49
50 // Constructor
52 int file_id,
53 TString generator_name,
54 int file_type,
55 TString file_path,
56 TString beam_particle,
57 TString target_particle,
58 double* energy,
59 TString centrality,
60 int* event_count,
61 int64_t* file_size,
62 TString* file_hash,
63 TString* file_desc);
64 /* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
65
66 public:
67 /* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
68 virtual ~UniSimulationFile(); // Destructor
69
70 // static class functions
71 /// add new simulation file to the database
73 int file_type,
74 TString file_path,
75 TString beam_particle,
76 TString target_particle,
77 double* energy,
78 TString centrality,
79 int* event_count,
80 int64_t* file_size,
81 TString* file_hash,
82 TString* file_desc);
83 /// get simulation file from the database
85 /// get simulation file from the database
87 /// check simulation file exists in the database: 1- true, 0 - false, <0 - database operation error
88 static int CheckSimulationFileExists(int file_id);
89 /// check simulation file exists in the database: 1- true, 0 - false, <0 - database operation error
90 static int CheckSimulationFileExists(TString file_path);
91 /// delete simulation file from the database
92 static int DeleteSimulationFile(int file_id);
93 /// delete simulation file from the database
94 static int DeleteSimulationFile(TString file_path);
95 /// print all simulation files
96 static int PrintAll();
97
98 // Getters
99 /// get file id of the current simulation file
100 int GetFileId() { return i_file_id; }
101 /// get generator name of the current simulation file
103 /// get file type of the current simulation file
104 int GetFileType() { return i_file_type; }
105 /// get file path of the current simulation file
107 /// get beam particle of the current simulation file
109 /// get target particle of the current simulation file
111 /// get energy of the current simulation file
112 double* GetEnergy()
113 {
114 if (d_energy == nullptr)
115 return nullptr;
116 else
117 return new double(*d_energy);
118 }
119 /// get centrality of the current simulation file
121 /// get event count of the current simulation file
123 {
124 if (i_event_count == nullptr)
125 return nullptr;
126 else
127 return new int(*i_event_count);
128 }
129 /// get file size of the current simulation file
130 int64_t* GetFileSize()
131 {
132 if (i64_file_size == nullptr)
133 return nullptr;
134 else
135 return new int64_t(*i64_file_size);
136 }
137 /// get file hash of the current simulation file
139 {
140 if (str_file_hash == nullptr)
141 return nullptr;
142 else
143 return new TString(*str_file_hash);
144 }
145 /// get file desc of the current simulation file
147 {
148 if (str_file_desc == nullptr)
149 return nullptr;
150 else
151 return new TString(*str_file_desc);
152 }
153
154 // Setters
155 /// set generator name of the current simulation file
156 int SetGeneratorName(TString generator_name);
157 /// set file type of the current simulation file
158 int SetFileType(int file_type);
159 /// set file path of the current simulation file
160 int SetFilePath(TString file_path);
161 /// set beam particle of the current simulation file
162 int SetBeamParticle(TString beam_particle);
163 /// set target particle of the current simulation file
164 int SetTargetParticle(TString target_particle);
165 /// set energy of the current simulation file
166 int SetEnergy(double* energy);
167 /// set centrality of the current simulation file
168 int SetCentrality(TString centrality);
169 /// set event count of the current simulation file
170 int SetEventCount(int* event_count);
171 /// set file size of the current simulation file
172 int SetFileSize(int64_t* file_size);
173 /// set file hash of the current simulation file
174 int SetFileHash(TString* file_hash);
175 /// set file desc of the current simulation file
176 int SetFileDesc(TString* file_desc);
177
178 /// print information about current simulation file
179 void Print();
180 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
181
182 /// get array of all UniSimulationFile-s from the database
184
185 /// get simulation files corresponding to the specified single condition and set owner for search_condition to kTRUE
186 static TObjArray* Search(UniSearchCondition& search_condition);
187 /// get simulation files corresponding to the specified (vector) conditions and set owner for search_condition to
188 /// kTRUE
189 static TObjArray* Search(TObjArray& search_conditions);
190
192};
193
194#endif
#define ClassDef(name, id)
UniSimulationFile.h Class for the table: simulation_file.
int SetEnergy(double *energy)
set energy of the current simulation file
UniSimulationFile(UniConnection *db_connect, int file_id, TString generator_name, int file_type, TString file_path, TString beam_particle, TString target_particle, double *energy, TString centrality, int *event_count, int64_t *file_size, TString *file_hash, TString *file_desc)
int64_t * GetFileSize()
get file size of the current simulation file
void Print()
print information about current simulation file
int SetEventCount(int *event_count)
set event count of the current simulation file
int SetFileHash(TString *file_hash)
set file hash of the current simulation file
int SetCentrality(TString centrality)
set centrality of the current simulation file
static int PrintAll()
print all simulation files
static UniSimulationFile * GetSimulationFile(int file_id)
get simulation file from the database
TString GetBeamParticle()
get beam particle of the current simulation file
TString str_centrality
centrality
int * GetEventCount()
get event count of the current simulation file
static TObjArray * Search(UniSearchCondition &search_condition)
get simulation files corresponding to the specified single condition and set owner for search_conditi...
TString GetFilePath()
get file path of the current simulation file
int64_t * i64_file_size
file size
TString str_generator_name
generator name
static int CheckSimulationFileExists(TString file_path)
check simulation file exists in the database: 1- true, 0 - false, <0 - database operation error
static int CheckSimulationFileExists(int file_id)
check simulation file exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteSimulationFile(TString file_path)
delete simulation file from the database
TString GetGeneratorName()
get generator name of the current simulation file
static int DeleteSimulationFile(int file_id)
delete simulation file from the database
int GetFileType()
get file type of the current simulation file
static TObjArray * GetSimulationFiles()
get array of all UniSimulationFile-s from the database
int SetFileType(int file_type)
set file type of the current simulation file
static UniSimulationFile * GetSimulationFile(TString file_path)
get simulation file from the database
static TObjArray * Search(TObjArray &search_conditions)
get simulation files corresponding to the specified (vector) conditions and set owner for search_cond...
virtual ~UniSimulationFile()
int * i_event_count
event count
int SetFileDesc(TString *file_desc)
set file desc of the current simulation file
TString str_file_path
file path
TString * str_file_desc
file desc
TString * str_file_hash
file hash
TString GetTargetParticle()
get target particle of the current simulation file
int i_file_type
file type
double * GetEnergy()
get energy of the current simulation file
int SetBeamParticle(TString beam_particle)
set beam particle of the current simulation file
TString str_beam_particle
beam particle
static UniSimulationFile * CreateSimulationFile(TString generator_name, int file_type, TString file_path, TString beam_particle, TString target_particle, double *energy, TString centrality, int *event_count, int64_t *file_size, TString *file_hash, TString *file_desc)
add new simulation file to the database
TString GetCentrality()
get centrality of the current simulation file
UniConnection * connectionDB
connection to the database
TString str_target_particle
target particle
TString * GetFileDesc()
get file desc of the current simulation file
int SetGeneratorName(TString generator_name)
set generator name of the current simulation file
int SetFilePath(TString file_path)
set file path of the current simulation file
int SetTargetParticle(TString target_particle)
set target particle of the current simulation file
int GetFileId()
get file id of the current simulation file
TString * GetFileHash()
get file hash of the current simulation file
int SetFileSize(int64_t *file_size)
set file size of the current simulation file
double * d_energy
energy