CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018MonitorDataRates.cxx
Go to the documentation of this file.
1/* Copyright (C) 2019-2021 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5// -----------------------------------------------------------------------------
6// ----- -----
7// ----- CbmMcbm2018MonitorDataRates -----
8// ----- Created 26.03.2019 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
13
14#include "CbmFlesHistosTools.h"
16#include "FairRootManager.h"
17#include "FairRun.h"
18#include "FairRunOnline.h"
19#include "FairRuntimeDb.h"
20#include "Rtypes.h"
21#include "TCanvas.h"
22#include "TClonesArray.h"
23#include "TF1.h"
24#include "TH1.h"
25#include "TH2.h"
26#include "THStack.h"
27#include "THttpServer.h"
28#include "TMath.h"
29#include "TPaveStats.h"
30#include "TProfile.h"
31#include "TProfile2D.h"
32#include "TROOT.h"
33#include "TString.h"
34#include "TStyle.h"
35
36#include <Logger.h>
37
38#include <TFile.h>
39
40#include <algorithm>
41#include <cstdint>
42#include <ctime>
43#include <iomanip>
44#include <iostream>
45
48
84
86
88{
89 LOG(info) << "Initializing Get4 monitor";
90
91 FairRootManager* ioman = FairRootManager::Instance();
92 if (ioman == NULL) { LOG(fatal) << "No FairRootManager instance"; } // if( ioman == NULL )
93
94 return kTRUE;
95}
96
97void CbmMcbm2018MonitorDataRates::SetParContainers() { LOG(info) << "Setting parameter containers for " << GetName(); }
98
100{
101 LOG(info) << "Init parameter containers for " << GetName();
102 Bool_t initOK = ReInitContainers();
103
105
106 return initOK;
107}
108
110{
111 LOG(info) << "ReInit parameter containers for " << GetName();
112 return kTRUE;
113}
114
115
116void CbmMcbm2018MonitorDataRates::AddMsComponentToList(size_t component, UShort_t /*usDetectorId*/)
117{
119 for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
120 if (component == fvMsComponentsList[uCompIdx]) return;
121
123 fvMsComponentsList.push_back(component);
124
125 UInt_t uComp = component;
126 if (fuNbFlimLinks <= uComp) {
127 fuNbFlimLinks = uComp + 1;
128 fvhDataRateTimePerLink.resize(fuNbFlimLinks, nullptr);
129 fvhTsSzPerLink.resize(fuNbFlimLinks, nullptr);
130 fvhTsSzTimePerLink.resize(fuNbFlimLinks, nullptr);
131 fvhMsSzPerLink.resize(fuNbFlimLinks, nullptr);
132 fvhMsSzTimePerLink.resize(fuNbFlimLinks, nullptr);
133 fvhMsMessPerLink.resize(fuNbFlimLinks, nullptr);
134 fvhMsMessTimePerLink.resize(fuNbFlimLinks, nullptr);
135 fvhMsMeanChDataPerLink.resize(fuNbFlimLinks, nullptr);
137
139 uint32_t iNbBinsLog = 0;
141 std::vector<double> dBinsLogVector = GenerateLogBinArray(9, 9, 10, iNbBinsLog);
142 double* dBinsLog = dBinsLogVector.data();
143 // double * dBinsLog = GenerateLogBinArray( 9, 9, 10, iNbBinsLog );
144
147 new TH1D(Form("DataRateTime_link_%02u", uComp),
148 Form("Data Rate vs time for DPB of link %02u; Time[s] ; DataRate [bytes/s]", uComp), fuHistoryHistoSize,
150
152 fvhTsSzPerLink[uComp] = new TH1F(Form("TsSz_link_%02u", uComp),
153 Form("Size of TS from link %02u; Ts Size [bytes]", uComp), iNbBinsLog, dBinsLog);
154
155 fvhTsSzTimePerLink[uComp] =
156 new TProfile(Form("TsSzTime_link_%02u", uComp),
157 Form("Size of TS vs time for DPB of link %02u; Time[s] ; Ts Size [bytes]", uComp),
159
160 TString sMsSzName = Form("MsSz_link_%02u", uComp);
161 TString sMsSzTitle = Form("Size of MS from link %02u; Ms Size [bytes]", uComp);
162 fvhMsSzPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
163
164 sMsSzName = Form("MsSzTime_link_%02u", uComp);
165 sMsSzTitle = Form("Size of MS vs time for DPB of link %02u; Time[s] ; Ms Size [bytes]", uComp);
166 fvhMsSzTimePerLink[uComp] =
167 new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 100 * fuHistoryHistoSize, 0., fuHistoryHistoSize);
168
169 sMsSzName = Form("MsMess_link_%02u", uComp);
170 sMsSzTitle = Form("Messages Number of MS from link %02u; Mess Nb []", uComp);
171 fvhMsMessPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 5000, 0., 5000.);
172
173 sMsSzName = Form("MsMessTime_link_%02u", uComp);
174 sMsSzTitle = Form("Messages Number of MS vs time for DPB of link %02u; "
175 "Time[s] ; Mess Nb []",
176 uComp);
177 fvhMsMessTimePerLink[uComp] =
178 new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 100 * fuHistoryHistoSize, 0., fuHistoryHistoSize);
179
180 sMsSzName = Form("MsMeanChData_link_%02u", uComp);
181 sMsSzTitle = Form("Mean data size per channels of MS from link %02u; Mean Ch Data [bytes]", uComp);
182 fvhMsMeanChDataPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 5000, 0., 5000.);
183
184 sMsSzName = Form("MsMeanChDataTime_link_%02u", uComp);
185 sMsSzTitle = Form("Mean data size per channel of MS vs time for DPB of "
186 "link %02u; Time[s] ; Mean Ch Data[bytes]",
187 uComp);
189 new TH1D(sMsSzName.Data(), sMsSzTitle.Data(), fuHistoryHistoSize, 0., fuHistoryHistoSize);
190
192 // delete dBinsLog;
193
194 } // if( fuNbFlimLinks <= uComp )
195
196 LOG(info) << "Added MS size histo for component (link): " << component;
197}
198void CbmMcbm2018MonitorDataRates::SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
199{
200 fuNbCoreMsPerTs = uCoreMsNb;
201 fuNbOverMsPerTs = uOverlapMsNb;
202
203 // UInt_t uNbMsTotal = fuNbCoreMsPerTs + fuNbOverMsPerTs;
204}
205
207{
208 LOG(info) << "create Histos ";
209
210 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
211
213 uint32_t iNbBinsLog = 0;
215 std::vector<double> dBinsLogVector = GenerateLogBinArray(9, 9, 10, iNbBinsLog);
216 double* dBinsLog = dBinsLogVector.data();
217 // double * dBinsLog = GenerateLogBinArray( 9, 9, 10, iNbBinsLog );
218
219 fhDataRateTimeAllLinks = new TH1D("DataRateTime_all", "Data Rate vs time for all DPBs; Time[s] ; DataRate [MB/s]",
221
222 for (UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp) {
225 new TH1D(Form("DataRateTime_link_%02u", uComp),
226 Form("Data Rate vs time for DPB of link %02u; Time[s] ; DataRate [MB/s]", uComp), fuHistoryHistoSize, 0.,
228
230 fvhTsSzPerLink[uComp] = new TH1F(Form("TsSz_link_%02u", uComp),
231 Form("Size of TS from link %02u; Ts Size [bytes]", uComp), iNbBinsLog, dBinsLog);
232
233 fvhTsSzTimePerLink[uComp] =
234 new TProfile(Form("TsSzTime_link_%02u", uComp),
235 Form("Size of TS vs time for DPB of link %02u; Time[s] ; Ts Size [bytes]", uComp),
237
239 TString sMsSzName = Form("MsSz_link_%02u", uComp);
240 TString sMsSzTitle = Form("Size of MS from link %02u; Ms Size [bytes]", uComp);
241 fvhMsSzPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), iNbBinsLog, dBinsLog);
242
243 sMsSzName = Form("MsSzTime_link_%02u", uComp);
244 sMsSzTitle = Form("Size of MS vs time for DPB of link %02u; Time[s] ; Ms Size [bytes]", uComp);
245 fvhMsSzTimePerLink[uComp] =
246 new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 100 * fuHistoryHistoSize, 0., fuHistoryHistoSize);
247
248 sMsSzName = Form("MsMess_link_%02u", uComp);
249 sMsSzTitle = Form("Messages Number of MS from link %02u; Mess Nb []", uComp);
250 fvhMsMessPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 5000, 0., 5000.);
251
252 sMsSzName = Form("MsMessTime_link_%02u", uComp);
253 sMsSzTitle = Form("Messages Number of MS vs time for DPB of link %02u; "
254 "Time[s] ; Mess Nb []",
255 uComp);
256 fvhMsMessTimePerLink[uComp] =
257 new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 100 * fuHistoryHistoSize, 0., fuHistoryHistoSize);
258
259 sMsSzName = Form("MsMeanChData_link_%02u", uComp);
260 sMsSzTitle = Form("Mean data size per channels of MS from link %02u; Mean Ch Data [bytes]", uComp);
261 fvhMsMeanChDataPerLink[uComp] = new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 5000, 0., 5000.);
262
263 sMsSzName = Form("MsMeanChDataTime_link_%02u", uComp);
264 sMsSzTitle = Form("Mean data size per channel of MS vs time for DPB of "
265 "link %02u; Time[s] ; Mean Ch Data[bytes]",
266 uComp);
268 new TH1D(sMsSzName.Data(), sMsSzTitle.Data(), fuHistoryHistoSize, 0., fuHistoryHistoSize);
269
271 // delete dBinsLog;
272 } // for( UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp )
273
275 Double_t w = 10;
276 Double_t h = 10;
277
278 fcDataRateTimeAll = new TCanvas("cDataRateTimeAll", "Data Rate per link", w, h);
279 fcDataRateTimeAll->Divide(4, 4);
280
281 fcTsSizeAll = new TCanvas("cTsSizeAll", "TS size per link", w, h);
282 fcTsSizeAll->Divide(4, 4);
283 fcTsSizeTimeAll = new TCanvas("cTsSizeTimeAll", "Evolution of TS size per link", w, h);
284 fcTsSizeTimeAll->Divide(4, 4);
285
286 fcMsSizeAll = new TCanvas("cMsSizeAll", "MS size per link", w, h);
287 fcMsSizeAll->Divide(4, 4);
288 fcMsSizeTimeAll = new TCanvas("cMsSizeTimeAll", "Evolution of MS size per link", w, h);
289 fcMsSizeTimeAll->Divide(4, 4);
290
291 fcMsMessAll = new TCanvas("cMsMessAll", "MS message number per link", w, h);
292 fcMsMessAll->Divide(4, 4);
293 fcMsMessTimeAll = new TCanvas("cMsMessTimeAll", "Evolution of MS message number per link", w, h);
294 fcMsMessTimeAll->Divide(4, 4);
295
296 fcMsDataChAll = new TCanvas("fcMsDataChAll", "Mean data per channel in each MS, per link", w, h);
297 fcMsDataChAll->Divide(4, 4);
298 fcMsDataChTimeAll = new TCanvas("fcMsDataChTimeAll", "Evolution of Mean data per channel per link", w, h);
299 fcMsDataChTimeAll->Divide(4, 4);
300
301 for (UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp)
302 if (nullptr != fvhMsSzTimePerLink[uComp]) {
303 fcDataRateTimeAll->cd(1 + uComp);
304 gPad->SetGridx();
305 gPad->SetGridy();
306 gPad->SetLogy();
307 fvhDataRateTimePerLink[uComp]->Draw("hist");
308
309 fcTsSizeAll->cd(1 + uComp);
310 gPad->SetGridx();
311 gPad->SetGridy();
312 gPad->SetLogy();
313 fvhTsSzPerLink[uComp]->Draw("hist");
314
315 fcTsSizeTimeAll->cd(1 + uComp);
316 gPad->SetGridx();
317 gPad->SetGridy();
318 gPad->SetLogy();
319 fvhTsSzTimePerLink[uComp]->Draw("hist");
320
321 fcMsSizeAll->cd(1 + uComp);
322 gPad->SetGridx();
323 gPad->SetGridy();
324 gPad->SetLogy();
325 fvhMsSzPerLink[uComp]->Draw("hist");
326
327 fcMsSizeTimeAll->cd(1 + uComp);
328 gPad->SetGridx();
329 gPad->SetGridy();
330 gPad->SetLogy();
331 fvhMsSzTimePerLink[uComp]->Draw("hist");
332
333 fcMsMessAll->cd(1 + uComp);
334 gPad->SetGridx();
335 gPad->SetGridy();
336 gPad->SetLogy();
337 fvhMsMessPerLink[uComp]->Draw("hist");
338
339 fcMsMessTimeAll->cd(1 + uComp);
340 gPad->SetGridx();
341 gPad->SetGridy();
342 gPad->SetLogy();
343 fvhMsMessTimePerLink[uComp]->Draw("hist");
344
345 fcMsDataChAll->cd(1 + uComp);
346 gPad->SetGridx();
347 gPad->SetGridy();
348 gPad->SetLogy();
349 fvhMsMeanChDataPerLink[uComp]->Draw("hist");
350
351 fcMsDataChTimeAll->cd(1 + uComp);
352 gPad->SetGridx();
353 gPad->SetGridy();
354 gPad->SetLogy();
355 fvhMsMeanChDataTimePerLink[uComp]->Draw("hist");
356 } // if( nullptr != fvhMsSzTimePerLink[ uComp ] )
357
358 LOG(info) << "Created MS size canvas";
359
360 if (server) {
361 server->Register("/FlibRaw", fhDataRateTimeAllLinks);
362 for (UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp) {
363 server->Register("/FlibRaw", fvhDataRateTimePerLink[uComp]);
364 server->Register("/FlibRaw", fvhTsSzPerLink[uComp]);
365 server->Register("/FlibRaw", fvhTsSzTimePerLink[uComp]);
366 server->Register("/FlibRaw", fvhMsSzPerLink[uComp]);
367 server->Register("/FlibRaw", fvhMsSzTimePerLink[uComp]);
368 server->Register("/FlibRaw", fvhMsMessPerLink[uComp]);
369 server->Register("/FlibRaw", fvhMsMessTimePerLink[uComp]);
370 server->Register("/FlibRaw", fvhMsMeanChDataPerLink[uComp]);
371 server->Register("/FlibRaw", fvhMsMeanChDataTimePerLink[uComp]);
372 } // for( UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp )
373
374 server->Register("/canvases", fcDataRateTimeAll);
375 server->Register("/canvases", fcTsSizeAll);
376 server->Register("/canvases", fcTsSizeTimeAll);
377 server->Register("/canvases", fcMsSizeAll);
378 server->Register("/canvases", fcMsSizeTimeAll);
379 server->Register("/canvases", fcMsMessAll);
380 server->Register("/canvases", fcMsMessTimeAll);
381 server->Register("/canvases", fcMsDataChAll);
382 server->Register("/canvases", fcMsDataChTimeAll);
383
384 server->RegisterCommand("/Reset_All_Hist", "bMcbmMoniDataRateResetHistos=kTRUE");
385 server->RegisterCommand("/Save_All_Hist", "bMcbmMoniDataRateSaveHistos=kTRUE");
386
387 server->Restrict("/Reset_All_Hist", "allow=admin");
388 server->Restrict("/Save_All_Hist", "allow=admin");
389 } // if( server )
390
391 LOG(info) << "Leaving CreateHistograms";
392}
393
394Bool_t CbmMcbm2018MonitorDataRates::DoUnpack(const fles::Timeslice& ts, size_t /*component*/)
395{
397 LOG(info) << "Reset eTOF STAR histos ";
400 } // if( bMcbmMoniDataRateResetHistos )
402 LOG(info) << "Start saving Data Rates Moni histos ";
403 SaveAllHistos("data/Histos_Shift_DataRates.root");
405 } // if( bSaveStsHistos )
406
408 if (0 == ts.index()) return kTRUE;
409
411 UInt_t uNbMsLoop = fuNbCoreMsPerTs;
412 if (kFALSE == fbIgnoreOverlapMs) uNbMsLoop += fuNbOverMsPerTs;
413
414 // Int_t messageType = -111;
415 // Double_t dTsStartTime = -1;
416
418 for (UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp)
419 fvuTsSzLink[uComp] = 0;
420
422 for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
423 if (fuMsAcceptsPercent < uMsIdx) continue;
424
425 fuCurrentMs = uMsIdx;
426
427 if (0 == fulCurrentTsIndex && 0 == uMsIdx) {
428 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
429 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
430 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
431 /*
432 LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
433 LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
434 static_cast<unsigned int>(msDescriptor.hdr_id),
435 static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
436 static_cast<unsigned int>(msDescriptor.sys_id),
437 static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
438 msDescriptor.size, msDescriptor.offset );
439*/
440 LOG(info) << FormatMsHeaderPrintout(msDescriptor);
441 } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
442 } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
443
445 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
446 // constexpr uint32_t kuBytesPerMessage = 8;
447
448 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
449 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
450 UInt_t uSysId = msDescriptor.sys_id;
451 fiEquipmentId = msDescriptor.eq_id;
452 fdMsIndex = static_cast<double>(msDescriptor.idx) * (1e-9);
453 fuCurrentMsSysId = static_cast<unsigned int>(msDescriptor.sys_id);
454 // const uint8_t* msContent = reinterpret_cast<const uint8_t*>( ts.content( uMsComp, uMsIdx ) );
455
456 uint32_t size = msDescriptor.size;
457 Double_t dSizeMb = size;
458 dSizeMb = dSizeMb / 1024 / 1024;
459 fvuTsSzLink[uMsComp] += size;
460
461 // if( 0 == uMsIdx && 0 == uMsCompIdx )
462 // dTsStartTime = fdMsIndex;
463
465 fvhMsSzPerLink[uMsComp]->Fill(size);
467 // Reset the evolution Histogram and the start time when we reach the end of the range
468 fvhMsSzTimePerLink[uMsComp]->Reset();
469 fvhMsMessTimePerLink[uMsComp]->Reset();
470 fvhMsMeanChDataTimePerLink[uMsComp]->Reset();
472 } // if( fuHistoryHistoSize < fdMsIndex - fdStartTimeMsSz )
474 fvhDataRateTimePerLink[uMsComp]->Fill(fdMsIndex - fdStartTimeMsSz, dSizeMb);
476
477 // Compute the number of complete messages in the input microslice buffer, depending on sysid
478 uint32_t uNbMessages = 0;
479 switch (uSysId) {
480 case kuSysIdSts: uNbMessages = (size - (size % kuBytesPerMessageSts)) / kuBytesPerMessageSts; break;
481 case kuSysIdRich: uNbMessages = (size - (size % kuBytesPerMessageRich)) / kuBytesPerMessageRich; break;
482 case kuSysIdMuch: uNbMessages = (size - (size % kuBytesPerMessageMuch)) / kuBytesPerMessageMuch; break;
483 case kuSysIdTof: uNbMessages = (size - (size % kuBytesPerMessageTof)) / kuBytesPerMessageTof; break;
484 case kuSysIdBmon: uNbMessages = (size - (size % kuBytesPerMessageBmon)) / kuBytesPerMessageBmon; break;
485 default: uNbMessages = (size - (size % 4)) / 4;
486 } // switch( uSysId )
487 fvhMsMessPerLink[uMsComp]->Fill(uNbMessages);
488 fvhMsMessTimePerLink[uMsComp]->Fill(fdMsIndex - fdStartTimeMsSz, uNbMessages);
489
492 Double_t dMeanDataPerChan = size;
493 dMeanDataPerChan /= fmChannelsPerEqId[fiEquipmentId];
494 fvhMsMeanChDataPerLink[uMsComp]->Fill(dMeanDataPerChan);
495 fvhMsMeanChDataTimePerLink[uMsComp]->Fill(fdMsIndex - fdStartTimeMsSz, dMeanDataPerChan);
496 } // if( fDpbIdIndexMap.end() != fmChannelsPerEqId.find( fiEquipmentId ) )
497 } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
498 } // for( UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx ++ )
499
501 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
502 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
503 fvhTsSzPerLink[uMsComp]->Fill(fvuTsSzLink[uMsComp]);
504 fvhTsSzTimePerLink[uMsComp]->Fill(fdMsIndex - fdStartTimeMsSz, fvuTsSzLink[uMsComp]);
505 } // for( UInt_t uComp = 0; uComp < fuNbFlimLinks; ++uComp )
506
508
509 return kTRUE;
510}
511
513
515
517{
519 TFile* oldFile = gFile;
520 TDirectory* oldDir = gDirectory;
521
522 TFile* histoFile = NULL;
523 if ("" != sFileName) {
524 // open separate histo file in recreate mode
525 histoFile = new TFile(sFileName, "RECREATE");
526 histoFile->cd();
527 } // if( "" != sFileName )
528
529 gDirectory->mkdir("Flib_Raw");
530 gDirectory->cd("Flib_Raw");
531 fhDataRateTimeAllLinks->Write();
532 for (UInt_t uLinks = 0; uLinks < fuNbFlimLinks; uLinks++)
533 if (nullptr != fvhMsSzTimePerLink[uLinks]) {
534 fvhDataRateTimePerLink[uLinks]->Write();
535 fvhTsSzPerLink[uLinks]->Write();
536 fvhTsSzTimePerLink[uLinks]->Write();
537 fvhMsSzPerLink[uLinks]->Write();
538 fvhMsSzTimePerLink[uLinks]->Write();
539 fvhMsMessPerLink[uLinks]->Write();
540 fvhMsMessTimePerLink[uLinks]->Write();
541 fvhMsMeanChDataPerLink[uLinks]->Write();
542 fvhMsMeanChDataTimePerLink[uLinks]->Write();
543 } // if( nullptr != fvhMsSzTimePerLink[ uComp ] )
544 fcMsSizeAll->Write();
545 fcMsSizeTimeAll->Write();
546 fcMsMessAll->Write();
547 fcMsMessTimeAll->Write();
548 fcMsDataChAll->Write();
549 fcMsDataChTimeAll->Write();
550
551 TH1* pMissedTsH1 = dynamic_cast<TH1*>(gROOT->FindObjectAny("Missed_TS"));
552 if (NULL != pMissedTsH1) pMissedTsH1->Write();
553
554 TProfile* pMissedTsEvoP = dynamic_cast<TProfile*>(gROOT->FindObjectAny("Missed_TS_Evo"));
555 if (NULL != pMissedTsEvoP) pMissedTsEvoP->Write();
556
557 gDirectory->cd("..");
558
559
560 if ("" != sFileName) {
561 // Restore original directory position
562 histoFile->Close();
563 } // if( "" != sFileName )
564
566 gFile = oldFile;
567 gDirectory = oldDir;
568}
569
571{
572 LOG(info) << "Reseting all histograms.";
573
574 fhDataRateTimeAllLinks->Reset();
575 for (UInt_t uLinks = 0; uLinks < fuNbFlimLinks; uLinks++)
576 if (nullptr != fvhMsSzTimePerLink[uLinks]) {
577 fvhDataRateTimePerLink[uLinks]->Reset();
578 fvhTsSzPerLink[uLinks]->Reset();
579 fvhTsSzTimePerLink[uLinks]->Reset();
580 fvhMsSzPerLink[uLinks]->Reset();
581 fvhMsSzTimePerLink[uLinks]->Reset();
582 fvhMsMessPerLink[uLinks]->Reset();
583 fvhMsMessTimePerLink[uLinks]->Reset();
584 fvhMsMeanChDataPerLink[uLinks]->Reset();
585 fvhMsMeanChDataTimePerLink[uLinks]->Reset();
586 } // if( nullptr != fvhMsSzTimePerLink[ uComp ] )
587
588 fdStartTimeMsSz = -1;
589}
ClassImp(CbmConverterManager)
std::vector< double > GenerateLogBinArray(uint32_t uNbDecadesLog, uint32_t uNbStepsDecade, uint32_t uNbSubStepsInStep, uint32_t &uNbBinsLog, int32_t iStartExp, bool bAddZeroStart)
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
Bool_t bMcbmMoniDataRateResetHistos
Bool_t bMcbmMoniDataRateSaveHistos
static constexpr size_t size()
Definition KfSimdPseudo.h:2
bool Bool_t
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
std::map< UInt_t, UInt_t > fmChannelsPerEqId
Parameters.
static const UInt_t kuSysIdSts
Constants.
std::vector< TProfile * > fvhTsSzTimePerLink
std::vector< size_t > fvMsComponentsList
FLES containers.
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
std::vector< TProfile * > fvhMsMessTimePerLink
Double_t fdStartTimeMsSz
Histograms and histogram control variables.
std::vector< TProfile * > fvhMsSzTimePerLink
size_t fuMsAcceptsPercent
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Data class with information on a STS local track.