BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
event_date_hist.C
Go to the documentation of this file.
1// macro for visualizing event acquisition during the experiemnt
2
3/* SQL queries for event statistics by shift leaders
4 select max(period_number)
5 from record_
6
7 select (date(min(record_date) - interval '1 DAY'))::timestamp + INTERVAL '00:00:00', (date(max(record_date) +
8 interval '1 DAY'))::timestamp + INTERVAL '23:59:59' from record_ where period_number = 9 and
9 ((replace(replace(lower(record_comment), ' ', ''), 'mv', '')) ~ '\d+((\.|,)\d+)?(k|m)')
10
11 select date(record_date), person_name,
12 (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')), '(\d+((\.|,)\d+)?)k'), 'k')
13 :: float),0) + (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')),
14 '(\d+((\.|,)\d+)?)m'), 'm') :: float),0)*1000)) as event_count from record_ r join person_ p on r.shift_leader_id =
15 p.person_id where period_number = 9 and run_number is not null and record_date >= '2026-01-18 00:00:00' and
16 record_date <= '2026-02-14 23:59:59' and
17 ((lower(regexp_replace(record_comment, ' |mv', '', 'gi'))) ~ '\d+((\.|,)\d+)?(k|m)')
18 group by date(record_date), person_name
19 order by date(record_date)
20*/
21
22template<class T>
23string FormatWithCommas(T value)
24{
25 stringstream ss;
26 ss.imbue(std::locale(""));
27 ss << std::fixed << value;
28 return ss.str();
29}
30
31// date_start, date_end format: "yyyy-mm-dd" (if empty, define maximum+1 and minimum-1 date from e-Log records)
32void event_date_hist(int period_number = 9,
33 TString str_date_start = "",
34 TString str_date_end = "",
35 TString save_hist = "")
36{
37 // split save_hist with file names to save two histograms (';' and ',' are delimiters)
38 TObjArray* arr_save_hist = save_hist.Tokenize(";,");
39 TString save_hist1 = "", save_hist2 = "";
40 if (arr_save_hist->GetEntries() > 0)
41 save_hist1 = ((TObjString*)arr_save_hist[0][0])->GetString().Strip(TString::kBoth);
42 if (arr_save_hist->GetEntries() > 1)
43 save_hist2 = ((TObjString*)arr_save_hist[0][1])->GetString().Strip(TString::kBoth);
44
46 if (connDb == nullptr)
47 return;
48
49 TSQLServer* db_server = connDb->GetSQLServer();
50 // if start or end date is not set, then define one day before the first record for this run and one day after
51 if ((str_date_start == "") || (str_date_end == "")) {
52 int start_run_number = 0;
53 if (period_number == 8)
54 start_run_number = 5301;
55 // get one day before and one day after for the current records of the run (where comments contain a number)
56 TString sql_date = TString::Format(
57 "select date(min(record_date) - interval '1 DAY'), date(max(record_date) + interval '1 DAY') "
58 "from record_ "
59 "where period_number = %d and run_number >= %d and ((lower(replace(record_comment, ' ', ''))) ~ '\\d+k')",
60 period_number, start_run_number);
61
62 TSQLStatement* stmt_date = db_server->Statement(sql_date);
63 // get records from the database
64 if (!stmt_date->Process()) {
65 cout << "ERROR: getting record from the database has been failed" << endl;
66 delete stmt_date;
67 delete connDb;
68 return;
69 }
70 // store result of statement in buffer
71 stmt_date->StoreResult();
72
73 if (!stmt_date->NextResultRow()) {
74 cout << "ERROR: max and min record date was not found in the database" << endl;
75 delete stmt_date;
76 delete connDb;
77 return;
78 }
79 // save the found dates (one day before and one day after)
80 if (str_date_start == "")
81 str_date_start = stmt_date->GetString(0);
82 if (str_date_end == "")
83 str_date_end = stmt_date->GetString(1);
84
85 delete stmt_date;
86 }
87 // check the start and end dates for the correct format
88 TPRegexp sql_date_format("^\\d{4}\\-(0[1-9]|1[012])\\-(0[1-9]|[12][0-9]|3[01])$");
89 if ((!str_date_start.Contains(sql_date_format)) || (!str_date_end.Contains(sql_date_format))) {
90 cout << "ERROR: 'date_start' or 'date_end' format is not correct, please, set them as \"YYYY-MM-DD\"" << endl;
91 delete connDb;
92 return;
93 }
94
95 // add time part to the start and end dates
96 str_date_start += " 00:00:00";
97 str_date_end += " 23:59:59";
98 TDatime date_start(str_date_start), date_end(str_date_end);
99 if (date_start >= date_end) {
100 cout << "ERROR: 'date_end' must be greater than 'date_end'" << endl;
101 delete connDb;
102 return;
103 }
104
105 TString sql =
106 TString::Format("select date(record_date), type_text, "
107 " (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')), "
108 "'(\\d+((\\.|,)\\d+)?)k'), 'k') :: float),0) + "
109 " (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')), "
110 "'(\\d+((\\.|,)\\d+)?)m'), 'm') :: float),0)*1000)) "
111 " as event_count "
112 "from record_ r join type_ t on r.type_id = t.type_id "
113 "where period_number = %d and run_number is not null and "
114 " record_date >= '%s' and record_date <= '%s' and "
115 " ((lower(regexp_replace(record_comment, ' |mv', '', 'gi'))) ~ '\\d+((\\.|,)\\d+)?(k|m)') "
116 "group by date(record_date), type_text "
117 "order by date(record_date)",
118 period_number, str_date_start.Data(), str_date_end.Data());
119 // cout<<"SQL query: \""<<sql<<"\""<<endl;
120 TSQLStatement* stmt = db_server->Statement(sql);
121
122 // get records from the database
123 if (!stmt->Process()) {
124 cout << "ERROR: getting record from the database has been failed" << endl;
125
126 delete stmt;
127 delete connDb;
128 return;
129 }
130
131 // store result of statement in buffer
132 stmt->StoreResult();
133
134 // create histogram with bars
135 TCanvas* c1 = new TCanvas("c1", "Event statistics by different types", 1000, 500);
136 gPad->SetGrid();
137 if (save_hist1.EndsWith("svg", TString::kIgnoreCase))
138 gStyle->SetGridColor(17);
139 int bin_count = (date_end.Convert() - date_start.Convert() + 1) / 24 / 3600;
140 // cout<<"bin count = "<<bin_count<<endl;
141
142 TH1I* hEventByDatePhys = new TH1I("hEventByDatePhys", "", bin_count, date_start.Convert(), date_end.Convert() + 1);
143 // gStyle->SetTitleFontSize(0.03); // only one approach to change histogram title size
144 hEventByDatePhys->SetStats(kFALSE);
145 hEventByDatePhys->LabelsDeflate();
146 hEventByDatePhys->SetLabelFont(62);
147 hEventByDatePhys->SetMarkerSize(0.65);
148 // hEventByDatePhys->LabelsOption("v");
149 hEventByDatePhys->GetXaxis()->SetTitle("run date");
150 hEventByDatePhys->GetXaxis()->SetTitleSize(0.03);
151 hEventByDatePhys->GetXaxis()->CenterTitle();
152 hEventByDatePhys->GetXaxis()->SetTimeDisplay(1); // The X axis is a time axis
153 hEventByDatePhys->GetXaxis()->SetLabelSize(0.02 - 0.00017 * bin_count);
154 hEventByDatePhys->GetXaxis()->CenterLabels();
155 hEventByDatePhys->GetXaxis()->SetTimeFormat("%d.%m ");
156 hEventByDatePhys->GetXaxis()->SetNdivisions(bin_count);
157 hEventByDatePhys->GetYaxis()->SetTitle("event count");
158 // hEventByDatePhys->GetYaxis()->SetTitleSize(0.03);
159 hEventByDatePhys->GetYaxis()->SetNdivisions(1007);
160 hEventByDatePhys->GetYaxis()->SetLabelSize(0.02);
161 TH1I* hEventByDateTest = (TH1I*)hEventByDatePhys->Clone("hEventByDateTest");
162 TH1I* hEventByDateCalib = (TH1I*)hEventByDatePhys->Clone("hEventByDateCalib");
163 hEventByDatePhys->SetBarWidth(0.28);
164 hEventByDatePhys->SetBarOffset(0.1);
165 hEventByDatePhys->SetFillColor(49);
166 hEventByDateTest->SetBarWidth(0.28);
167 hEventByDateTest->SetBarOffset(0.38);
168 hEventByDateTest->SetFillColor(50);
169 hEventByDateCalib->SetBarWidth(0.28);
170 hEventByDateCalib->SetBarOffset(0.66);
171 hEventByDateCalib->SetFillColor(42);
172
173 int total_phys_events = 0, total_test_events = 0, total_calib_events = 0;
174 cout << endl << "|date |type |event_number|" << endl;
175 cout << "|-----------|----------------|------------|" << endl;
176 // extract rows from the database query
177 while (stmt->NextResultRow()) {
178 TString str_record_date = stmt->GetString(0);
179 TDatime record_date(str_record_date + " 00:00:00");
180 TString type_text = stmt->GetString(1);
181 int event_count = stmt->GetInt(2);
182 TString str_event_count = FormatWithCommas(event_count * 1000);
183 for (int i = str_event_count.Length(); i < 12; i++)
184 str_event_count += " ";
185
186 cout << "|" << str_record_date << " |" << type_text.Data();
187 if (type_text == "Physics Run") {
188 hEventByDatePhys->Fill(record_date.Convert(), event_count * 1000);
189 cout << " " << " |" << str_event_count << "|" << endl;
190 total_phys_events += event_count * 1000;
191 } else if (type_text == "Test Run") {
192 hEventByDateTest->Fill(record_date.Convert(), event_count * 1000);
193 cout << " " << " |" << str_event_count << "|" << endl;
194 total_test_events += event_count * 1000;
195 } else if (type_text == "Calibration Run") {
196 hEventByDateCalib->Fill(record_date.Convert(), event_count * 1000);
197 cout << " |" << str_event_count << "|" << endl;
198 total_calib_events += event_count * 1000;
199 } else {
200 for (int i = type_text.Length(); i < 15; i++)
201 cout << " ";
202 cout << " |" << str_event_count << "|" << endl;
203 cout << "WARNING: Incorrect type of the record with event number is \"" << type_text << "\"" << endl;
204 }
205 }
206 cout << endl
207 << "Total physics events - " << FormatWithCommas(total_phys_events) << endl
208 << "Total test events - " << FormatWithCommas(total_test_events) << endl
209 << "Total calibration events - " << FormatWithCommas(total_calib_events) << endl;
210
211 TString hist_options = "bar2,hist,text"; // 'text' option for vertical captions with event count
212 TH1* h1 = hEventByDatePhys->DrawCopy(hist_options);
213 TH1* h2 = hEventByDateTest->DrawCopy(hist_options + ",same");
214 TH1* h3 = hEventByDateCalib->DrawCopy(hist_options + ",same");
215
216 TLegend* legend = new TLegend(0.13, 0.74, 0.30, 0.88);
217 legend->AddEntry(h1, "Physics Events", "f");
218 legend->AddEntry(h2, "Test Events", "f");
219 legend->AddEntry(h3, "Calibration Events", "f");
220 legend->Draw();
221
222 if (save_hist1 != "")
223 c1->SaveAs(save_hist1.Data());
224
225 // SECOND CANVAS WITH INTEGRAL HISTOGRAM
226 TH1F* hIntegralPhys = new TH1F("hIntegralPhys", "", bin_count, date_start.Convert(), date_end.Convert() + 1);
227 hIntegralPhys->SetBinContent(0, hEventByDatePhys->GetBinContent(0) / 1000000.0);
228 for (Int_t i = 1; i < hEventByDatePhys->GetNbinsX(); ++i) {
229 hIntegralPhys->SetBinContent(i, hEventByDatePhys->GetBinContent(i) / 1000000.0
230 + hIntegralPhys->GetBinContent(i - 1));
231 }
232
233 TCanvas* c2 = new TCanvas("c2", "Integral statistics of physics events", 1000, 500);
234 c2->cd();
235 gPad->SetGridy();
236 hIntegralPhys->SetStats(kFALSE);
237 hIntegralPhys->LabelsDeflate();
238 hIntegralPhys->SetLineWidth(2);
239 hIntegralPhys->SetLineColor(49);
240 hIntegralPhys->SetLabelFont(62);
241 hIntegralPhys->SetTitleFont(62);
242 hIntegralPhys->SetMarkerSize(0.65);
243 hIntegralPhys->GetXaxis()->SetTitle("run date");
244 hIntegralPhys->GetXaxis()->SetTitleFont(62);
245 // hIntegralPhys->GetXaxis()->LabelsOption("v");
246 hIntegralPhys->GetYaxis()->SetTitleFont(62);
247 hIntegralPhys->GetYaxis()->SetTitle("Integral statistics, events #times 10^{6}");
248 hIntegralPhys->GetXaxis()->SetTitleSize(0.03);
249 hIntegralPhys->GetXaxis()->CenterTitle();
250 hIntegralPhys->GetXaxis()->SetTimeDisplay(1); // The X axis is a time axis
251 hIntegralPhys->GetXaxis()->SetLabelSize(0.02 - 0.00017 * bin_count);
252 hIntegralPhys->GetXaxis()->CenterLabels();
253 hIntegralPhys->GetXaxis()->SetNdivisions(bin_count);
254 hIntegralPhys->SetFillColor(49);
255 hIntegralPhys->SetFillStyle(3001);
256 hIntegralPhys->Draw("");
257
258 if (save_hist2 != "")
259 c2->SaveAs(save_hist2.Data());
260}
261
262// date_start, date_end format: "yyyy-mm-dd" (if empty, define maximum+1 and minimum-1 date from e-Log records)
263void event_shift_hist(int period_number = 8,
264 TString str_date_start = "",
265 TString str_date_end = "",
266 TString save_hist = "")
267{
269 if (connDb == nullptr)
270 return;
271
272 TSQLServer* db_server = connDb->GetSQLServer();
273 if ((str_date_start == "") || (str_date_end == "")) {
274 int start_run_number = 0;
275 if (period_number == 8)
276 start_run_number = 5301;
277 TString sql_date = TString::Format(
278 "select date(min(record_date) - interval '1 DAY'), date(max(record_date) + interval '1 DAY') "
279 "from record_ "
280 "where period_number = %d and run_number >= %d and ((lower(replace(record_comment, ' ', ''))) ~ '\\d+k')",
281 period_number, start_run_number);
282
283 TSQLStatement* stmt_date = db_server->Statement(sql_date);
284 // get records from the database
285 if (!stmt_date->Process()) {
286 cout << "ERROR: getting record from the database has been failed" << endl;
287 delete stmt_date;
288 delete connDb;
289 return;
290 }
291 // store result of statement in buffer
292 stmt_date->StoreResult();
293
294 if (!stmt_date->NextResultRow()) {
295 cout << "ERROR: max and min record date was not found in the database" << endl;
296 delete stmt_date;
297 delete connDb;
298 return;
299 }
300 if (str_date_start == "")
301 str_date_start = stmt_date->GetString(0);
302 if (str_date_end == "")
303 str_date_end = stmt_date->GetString(1);
304
305 delete stmt_date;
306 }
307 TPRegexp sql_date_format("^\\d{4}\\-(0[1-9]|1[012])\\-(0[1-9]|[12][0-9]|3[01])$");
308 if ((!str_date_start.Contains(sql_date_format)) || (!str_date_end.Contains(sql_date_format))) {
309 cout << "ERROR: 'date_start' or 'date_end' format is not correct, please, set them as \"YYYY-MM-DD\"" << endl;
310 delete connDb;
311 return;
312 }
313
314 str_date_start += " 00:00:00";
315 str_date_end += " 23:59:59";
316 TDatime date_start(str_date_start), date_end(str_date_end);
317 if (date_start >= date_end) {
318 cout << "ERROR: 'date_end' must be greater than 'date_end'" << endl;
319 delete connDb;
320 return;
321 }
322
323 TString sql =
324 TString::Format("select date(record_date), trunc((date_part('hour', record_date) / 8)), type_text, "
325 " (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')), "
326 "'(\\d+((\\.|,)\\d+)?)k'), 'k') :: float),0) + "
327 " (coalesce(sum(rtrim(substring(lower(regexp_replace(record_comment, ' |mv', '', 'gi')), "
328 "'(\\d+((\\.|,)\\d+)?)m'), 'm') :: float),0)*1000)) "
329 " as event_count "
330 "from record_ r join type_ t on r.type_id = t.type_id "
331 "where period_number = %d and run_number is not null and "
332 " record_date >= '%s' and record_date <= '%s' and "
333 " ((lower(regexp_replace(record_comment, ' |mv', '', 'gi'))) ~ '\\d+((\\.|,)\\d+)?(k|m)') "
334 "group by date(record_date), trunc((date_part('hour', record_date) / 8)), type_text "
335 "order by date(record_date)",
336 period_number, str_date_start.Data(), str_date_end.Data());
337 // cout<<"SQL query: \""<<sql<<"\""<<endl;
338 TSQLStatement* stmt = db_server->Statement(sql);
339
340 // get records from the database
341 if (!stmt->Process()) {
342 cout << "ERROR: getting record from the database has been failed" << endl;
343
344 delete stmt;
345 delete connDb;
346 return;
347 }
348
349 // store result of statement in buffer
350 stmt->StoreResult();
351
352 // create histogram with bars
353 TCanvas* c1 = new TCanvas("c1", "Event Acquisition Histogram", 1000, 600);
354 gPad->SetGrid();
355 if (save_hist.EndsWith("svg", TString::kIgnoreCase))
356 gStyle->SetGridColor(17);
357 int bin_count = (date_end.Convert() - date_start.Convert() + 1) / 8 / 3600;
358 // cout<<"bin count = "<<bin_count<<endl;
359
360 TH1I* hEventByDatePhys = new TH1I("hEventByDatePhys", "", bin_count, date_start.Convert(), date_end.Convert() + 1);
361 // gStyle->SetTitleFontSize(0.03); // only one approach to change histogram title size
362 hEventByDatePhys->SetStats(kFALSE);
363 hEventByDatePhys->LabelsDeflate();
364 hEventByDatePhys->SetLabelFont(62);
365 hEventByDatePhys->SetMarkerSize(0.65);
366 hEventByDatePhys->GetXaxis()->SetTitle("run date");
367 hEventByDatePhys->GetXaxis()->SetTitleSize(0.03);
368 hEventByDatePhys->GetXaxis()->CenterTitle();
369 hEventByDatePhys->GetXaxis()->SetTimeDisplay(1); // The X axis is a time axis
370 hEventByDatePhys->GetXaxis()->SetLabelSize(0.012);
371 hEventByDatePhys->GetXaxis()->CenterLabels();
372 // hEventByDatePhys->GetXaxis()->SetTimeFormat(" %d/%m");
373 hEventByDatePhys->GetXaxis()->SetNdivisions(bin_count / 3); // divisions by days
374 hEventByDatePhys->GetYaxis()->SetTitle("event count");
375 hEventByDatePhys->GetYaxis()->SetTitleSize(0.03);
376 hEventByDatePhys->GetYaxis()->SetNdivisions(1007);
377 hEventByDatePhys->GetYaxis()->SetLabelSize(0.02);
378 TH1I* hEventByDateTest = (TH1I*)hEventByDatePhys->Clone("hEventByDateTest");
379 TH1I* hEventByDateCalib = (TH1I*)hEventByDatePhys->Clone("hEventByDateCalib");
380 hEventByDatePhys->SetBarWidth(0.28);
381 hEventByDatePhys->SetBarOffset(0.1);
382 hEventByDatePhys->SetFillColor(49);
383 hEventByDateTest->SetBarWidth(0.28);
384 hEventByDateTest->SetBarOffset(0.38);
385 hEventByDateTest->SetFillColor(50);
386 hEventByDateCalib->SetBarWidth(0.28);
387 hEventByDateCalib->SetBarOffset(0.66);
388 hEventByDateCalib->SetFillColor(42);
389
390 int total_phys_events = 0, total_test_events = 0, total_calib_events = 0;
391 cout << endl << "|shift |type |event_number|" << endl;
392 cout << "|-------------------|----------------|------------|" << endl;
393 // extract rows from the database query
394 while (stmt->NextResultRow()) {
395 TString str_record_date = stmt->GetString(0), str_shift_time = "";
396 int shift_num = stmt->GetInt(1);
397 TDatime record_date;
398 switch (shift_num) {
399 case 0: {
400 record_date.Set(str_record_date + " 04:00:00");
401 str_shift_time = " 00h-08h";
402 break;
403 }
404 case 1: {
405 record_date.Set(str_record_date + " 12:00:00");
406 str_shift_time = " 08h-16h";
407 break;
408 }
409 case 2: {
410 record_date.Set(str_record_date + " 20:00:00");
411 str_shift_time = " 16h-24h";
412 break;
413 }
414 }
415 TString type_text = stmt->GetString(2);
416 int event_count = stmt->GetInt(3);
417 TString str_event_count = FormatWithCommas(event_count * 1000);
418 for (int i = str_event_count.Length(); i < 12; i++)
419 str_event_count += " ";
420
421 cout << "|" << str_record_date << str_shift_time << " |" << type_text.Data();
422 if (type_text == "Physics Run") {
423 hEventByDatePhys->Fill(record_date.Convert(), event_count * 1000);
424 cout << " " << " |" << str_event_count << "|" << endl;
425 total_phys_events += event_count * 1000;
426 } else if (type_text == "Test Run") {
427 hEventByDateTest->Fill(record_date.Convert(), event_count * 1000);
428 cout << " " << " |" << str_event_count << "|" << endl;
429 total_test_events += event_count * 1000;
430 } else if (type_text == "Calibration Run") {
431 hEventByDateCalib->Fill(record_date.Convert(), event_count * 1000);
432 cout << " |" << str_event_count << "|" << endl;
433 total_calib_events += event_count * 1000;
434 } else {
435 for (int i = type_text.Length(); i < 15; i++)
436 cout << " ";
437 cout << " |" << str_event_count << "|" << endl;
438 cout << "WARNING: Incorrect type of the record with event number is \"" << type_text << "\"" << endl;
439 }
440 }
441 cout << endl
442 << "Total physics events - " << FormatWithCommas(total_phys_events) << endl
443 << "Total test events - " << FormatWithCommas(total_test_events) << endl
444 << "Total calibration events - " << FormatWithCommas(total_calib_events) << endl;
445
446 TString hist_options = "bar2,hist,text"; // 'text' option for vertical captions with event count
447 TH1* h1 = hEventByDatePhys->DrawCopy(hist_options);
448 TH1* h2 = hEventByDateTest->DrawCopy(hist_options + ",same");
449 TH1* h3 = hEventByDateCalib->DrawCopy(hist_options + ",same");
450
451 TLegend* legend = new TLegend(0.13, 0.79, 0.30, 0.88);
452 legend->AddEntry(h1, "Physics Events", "f");
453 legend->AddEntry(h2, "Test Events", "f");
454 legend->AddEntry(h3, "Calibration Events", "f");
455 legend->Draw();
456
457 if (save_hist != "")
458 c1->SaveAs(save_hist.Data());
459}
int i
Definition P4_F32vec4.h:22
int Int_t
constexpr Bool_t kFALSE
R__EXTERN TStyle * gStyle
#define gPad
static ElogConnection * Open()
TSQLServer * GetSQLServer()
virtual void SetLabelSize(Float_t size=0.04)
virtual void SetTitleFont(Style_t font=62)
virtual void SetTitleSize(Float_t size=0.04)
virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t optim=kTRUE)
virtual void SetFillColor(Color_t fcolor)
virtual void SetFillStyle(Style_t fstyle)
virtual void SetLineWidth(Width_t lwidth)
virtual void SetLineColor(Color_t lcolor)
virtual void SetMarkerSize(Size_t msize=1)
void CenterLabels(Bool_t center=kTRUE)
virtual void SetTimeDisplay(Int_t value)
void CenterTitle(Bool_t center=kTRUE)
virtual void SetTimeFormat(const char *format="")
TVirtualPad * cd(Int_t subpadnumber=0) override
void Set()
UInt_t Convert(Bool_t toGMT=kFALSE) const
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
virtual void SetBarOffset(Float_t offset=0.25)
TAxis * GetXaxis()
virtual Int_t GetNbinsX() const
TAxis * GetYaxis()
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual void SetBinContent(Int_t bin, Double_t content)
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
virtual Double_t GetBinContent(Int_t bin) const
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
TObject * Clone(const char *newname="") const override
virtual void LabelsDeflate(Option_t *axis="X")
virtual void SetBarWidth(Float_t width=0.5)
virtual void SetStats(Bool_t stats=kTRUE)
void Draw(Option_t *option="") override
TLegendEntry * AddEntry(const char *name, const char *label="", Option_t *option="lpf")
virtual void SetTitle(const char *title="")
Int_t GetEntries() const override
void SaveAs(const char *filename="", Option_t *option="") const override
virtual TSQLStatement * Statement(const char *, Int_t=100)
virtual const char * GetString(Int_t)
virtual Bool_t NextResultRow()=0
virtual Int_t GetInt(Int_t)
virtual Bool_t Process()=0
virtual Bool_t StoreResult()=0
Ssiz_t Length() const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
TSubString Strip(EStripType s=kTrailing, char c=' ') const
const char * Data() const
static TString Format(const char *fmt,...)
string FormatWithCommas(T value)
void event_shift_hist(int period_number=8, TString str_date_start="", TString str_date_end="", TString save_hist="")
void event_date_hist(int period_number=9, TString str_date_start="", TString str_date_end="", TString save_hist="")