BmnRoot
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
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) */
23 UniConnection* connectionDB;
24
26 int i_file_id;
28 TString str_generator_name;
30 int i_file_type;
32 TString str_file_path;
34 TString str_beam_particle;
36 TString str_target_particle;
38 double* d_energy;
40 TString str_centrality;
42 int* i_event_count;
44 int64_t* i64_file_size;
46 TString* str_file_hash;
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
72 static UniSimulationFile* CreateSimulationFile(TString generator_name,
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);
86 static UniSimulationFile* GetSimulationFile(TString file_path);
88 static int CheckSimulationFileExists(int file_id);
90 static int CheckSimulationFileExists(TString file_path);
92 static int DeleteSimulationFile(int file_id);
94 static int DeleteSimulationFile(TString file_path);
96 static int PrintAll();
97
98 // Getters
100 int GetFileId() { return i_file_id; }
102 TString GetGeneratorName() { return str_generator_name; }
104 int GetFileType() { return i_file_type; }
106 TString GetFilePath() { return str_file_path; }
108 TString GetBeamParticle() { return str_beam_particle; }
110 TString GetTargetParticle() { return str_target_particle; }
112 double* GetEnergy()
113 {
114 if (d_energy == nullptr)
115 return nullptr;
116 else
117 return new double(*d_energy);
118 }
120 TString GetCentrality() { return str_centrality; }
123 {
124 if (i_event_count == nullptr)
125 return nullptr;
126 else
127 return new int(*i_event_count);
128 }
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 }
138 TString* GetFileHash()
139 {
140 if (str_file_hash == nullptr)
141 return nullptr;
142 else
143 return new TString(*str_file_hash);
144 }
146 TString* GetFileDesc()
147 {
148 if (str_file_desc == nullptr)
149 return nullptr;
150 else
151 return new TString(*str_file_desc);
152 }
153
154 // Setters
156 int SetGeneratorName(TString generator_name);
158 int SetFileType(int file_type);
160 int SetFilePath(TString file_path);
162 int SetBeamParticle(TString beam_particle);
164 int SetTargetParticle(TString target_particle);
166 int SetEnergy(double* energy);
168 int SetCentrality(TString centrality);
170 int SetEventCount(int* event_count);
172 int SetFileSize(int64_t* file_size);
174 int SetFileHash(TString* file_hash);
176 int SetFileDesc(TString* file_desc);
177
179 void Print();
180 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
181
183 static TObjArray* GetSimulationFiles();
184
186 static TObjArray* Search(UniSearchCondition& search_condition);
189 static TObjArray* Search(TObjArray& search_conditions);
190
192};
193
194#endif
int SetEnergy(double *energy)
set energy of the current simulation file
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
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
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
ClassDef(UniSimulationFile, 1)
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)
virtual ~UniSimulationFile()
int SetFileDesc(TString *file_desc)
set file desc of the current simulation file
TString GetTargetParticle()
get target particle of the current simulation file
double * GetEnergy()
get energy of the current simulation file
int SetBeamParticle(TString beam_particle)
set beam particle of the current simulation file
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
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