KaliVeda
Toolkit for HIC analysis
KVFAZIADBRun.cpp
1 //Created by KVClassFactory on Tue Jan 20 16:29:33 2015
2 //Author: ,,,
3 
4 #include "KVFAZIADBRun.h"
5 #include "KVFileReader.h"
6 #include "KVDataSet.h"
7 
9 
10 // BEGIN_HTML <!--
12 /* -->
13 <h2>KVFAZIADBRun</h2>
14 <h4>run description for FAZIA experiment</h4>
15 <!-- */
16 // --> END_HTML
18 
19 
20 
23 void KVFAZIADBRun::init()
24 {
25  //initialize all fields
26 
27  SetTrigger(-1);
28  SetNumberOfTriggerBlocks(-1);
29  SetDeadTime(-1);
30  SetTriggerRate(-1);
31  SetGoodEvents(-1);
32  SetACQStatus("Unkown");
33  SetError_WrongNumberOfBlocks(-1);
34  SetError_InternalBlockError(-1);
35  SetNumberOfAcqFiles(-1);
36  SetDuration(-1.);
37  SetFrequency(-1.);
38  SetRutherfordCount(-1);
39  SetRutherfordCrossSection(0.0);
40 
41 }
42 
43 
44 
45 
48 
50 {
51  // Default constructor
52  init();
53 }
54 
55 
56 
57 
60 
61 KVFAZIADBRun::KVFAZIADBRun(Int_t number, const Char_t* title) : KVDBRun(number, title)
62 {
63  //constructor with run number
64  init();
65  // Although FAZIA data has (typically) 10 files per run, they have
66  // always been treated as single-file runs for the database.
67  // Therefore we add a single dummy KVDBRunFile for backwards compatibility.
68  AddRunFile(new KVDBRunFile("dummy", {number, std::nullopt}));
69 }
70 
71 
72 
74 
76 {
77  Set("ACQ Status", status);
78 }
79 
80 
81 
83 
85 {
86  return GetString("ACQ Status");
87 }
88 
89 
90 
92 
94 {
95  SetScaler("Good Events", evt_number);
96 }
97 
98 
99 
101 
103 {
104  return GetScaler("Good Events");
105 }
106 
107 
108 
110 
112 {
113  SetScaler("Bad Events with wrong number of blocks", evt_number);
114 }
115 
116 
117 
119 
121 {
122  return GetScaler("Bad Events with wrong number of blocks");
123 }
124 
125 
126 
128 
130 {
131  SetScaler("Bad Events internal error in one block", evt_number);
132 }
133 
134 
135 
137 
139 {
140  return GetScaler("Bad Events internal error in one block");
141 }
142 
143 
144 
146 
148 {
149  SetScaler("Number of ACQ files", number);
150 }
151 
152 
153 
155 
157 {
158  return GetScaler("Number of ACQ files");
159 }
160 
161 
162 
164 
166 {
167  Set("Duration (s)", duration);
168 }
169 
170 
171 
173 
175 {
176  return Get("Duration (s)");
177 }
178 
179 
180 
182 
184 {
185  Set("ACQ rate (evts/s)", frequency);
186 }
187 
188 
189 
191 
193 {
194  return Get("ACQ rate (evts/s)");
195 }
196 
197 
198 
200 
202 {
203  Set("trigger rate (evts/s)", triggerrate);
204 }
205 
206 
207 
209 
211 {
212  return Get("trigger rate (evts/s)");
213 }
214 
215 
216 
218 
220 {
221  Set("deadtime [0;1]", deadtime);
222 }
223 
224 
225 
227 
229 {
230  return Get("deadtime [0;1]");
231 }
232 
233 
234 
236 
238 {
239  Set("number of trigger blocks", number);
240 }
241 
242 
243 
245 
247 {
248  return Get("number of trigger blocks");
249 }
250 
251 
252 
254 
256 {
257  SetScaler("Rutherford Count", number);
258 }
259 
260 
261 
263 
265 {
266  return GetScaler("Rutherford Count");
267 }
268 
269 
270 
272 
274 {
275  Set("Rutherford Cross Section (mb)", number);
276 }
277 
278 
279 
281 
283 {
284  return Get("Rutherford Cross Section (mb)");
285 }
286 
287 
int Int_t
char Char_t
double Double_t
A single raw data file associated with an experimental run ,,.
Definition: KVDBRunFile.h:36
Description of an experimental run in database ,,.
Definition: KVDBRun.h:40
void AddRunFile(KVDBRunFile *rf)
Definition: KVDBRun.h:80
void Set(const Char_t *param, Double_t val)
Set numerical (non-scaler) characteristic of run.
Definition: KVDBRun.h:267
Double_t Get(const Char_t *param) const
Get numerical (non-scaler) characteristic of run.
Definition: KVDBRun.h:273
virtual Int_t GetScaler(const Char_t *name) const
Get value of scaler with the given name for this run.
Definition: KVDBRun.h:251
const Char_t * GetString(const Char_t *param) const
Get characteristic of run.
Definition: KVDBRun.h:284
virtual void SetScaler(const Char_t *name, Int_t val)
Set value for the scaler with the given name for this run.
Definition: KVDBRun.h:245
Database entry for a run in a FAZIA experiment.
Definition: KVFAZIADBRun.h:15
Double_t GetTriggerRate() const
Int_t GetNumberOfAcqFiles() const
void SetNumberOfAcqFiles(Int_t)
void SetDuration(Double_t)
Double_t GetRutherfordCrossSection() const
Int_t GetRutherfordCount() const
const Char_t * GetACQStatus() const
Int_t GetError_InternalBlockError() const
void SetGoodEvents(Int_t)
void init()
initialize all fields
void SetError_InternalBlockError(Int_t)
void SetError_WrongNumberOfBlocks(Int_t)
Double_t GetFrequency() const
void SetRutherfordCrossSection(Double_t)
Double_t GetNumberOfTriggerBlocks() const
Double_t GetDuration() const
void SetRutherfordCount(Int_t)
void SetACQStatus(const KVString &status)
void SetFrequency(Double_t)
Int_t GetError_WrongNumberOfBlocks() const
Int_t GetGoodEvents() const
void SetTriggerRate(Double_t)
void SetDeadTime(Double_t)
void SetNumberOfTriggerBlocks(Double_t)
Double_t GetDeadTime() const
KVFAZIADBRun()
Default constructor.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
ClassImp(TPyArg)