CbmRoot
Loading...
Searching...
No Matches
RecoGeneralQa.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: P.-A. Loizeau [committer] */
4
5#ifndef ALGO_QA_RECOGENERALQA_H
6#define ALGO_QA_RECOGENERALQA_H 1
7
8#include "CbmDefs.h"
10#include "algo/qa/QaData.h"
11
12#include <StorableTimeslice.hpp>
13
14namespace cbm::algo::qa
15{
17 double total_time_ms = 0.0; // Total Processing time in ms
18 double unpack_time_ms = 0.0; // Total unpacking time in ms
19 double sts_reco_time_ms = 0.0; // Total STS reco time in ms
20 double tof_reco_time_ms = 0.0; // Total TOF reco time in ms
21 double trd_reco_time_ms = 0.0; // Total TRD reco time in ms
22 double ca_time_ms = 0.0; // Total CA tracking time in ms
23 double digimultrig_time_ms = 0.0; // Total time used for the digi multiplicity trigger in ms
24 double hitmultrig_time_ms = 0.0; // Total time used for the hit multiplicity trigger in ms
25 double v0trig_time_ms = 0.0; // Total time used for the V0 trigger in ms
26 double evtbuild_time_ms = 0.0; // Total time used for the event building in ms
27
28 std::map<std::string, size_t> digis_nb = {}; // total size of timeslice contents for each detector
29
30 void Reset()
31 {
32 total_time_ms = 0.0; // Total Processing time in ms
33 unpack_time_ms = 0.0; // Total unpacking time in ms
34 sts_reco_time_ms = 0.0; // Total STS reco time in ms
35 tof_reco_time_ms = 0.0; // Total TOF reco time in ms
36 trd_reco_time_ms = 0.0; // Total TRD reco time in ms
37 ca_time_ms = 0.0; // Total CA tracking time in ms
38 digimultrig_time_ms = 0.0; // Total time used for the digi multiplicity trigger in ms
39 hitmultrig_time_ms = 0.0; // Total time used for the hit multiplicity trigger in ms
40 v0trig_time_ms = 0.0; // Total time used for the V0 trigger in ms
41 evtbuild_time_ms = 0.0; // Total time used for the event building in ms
42
43 digis_nb.clear(); // total size of timeslice contents for each detector
44 }
45 };
46
53 public:
55 RecoGeneralQa(const uint64_t& runStartTimeNs, std::shared_ptr<HistogramSender> pSender);
56
58 RecoGeneralQa() = delete;
59
61 RecoGeneralQa(const RecoGeneralQa&) = delete;
62
65
68
71
76 void operator()(const fles::Timeslice& ts, const GeneralQaData& qaData);
77
78 private: // methods
79 private: // members
81 std::shared_ptr<HistogramSender> fpSender = nullptr;
82 qa::Data fQaData{"Reco"};
83 bool fInitNotDone = true;
84
85 // Constants
86 static const int32_t kNbTsPerBinCount = 100; // 100 TS duration per bin for raw counts
87 static const int32_t kNbTsPerBinFrac = 1000; // 1000 TS duration per bin for fractions
88 static const int32_t kNbTsPerBinTime = 8; // 8 TS duration per bin for processing time evo
89 static const int32_t kNbMsPerBinTime = 20; // 10 ms per bin for processing time total
90
91 // ---- Histograms
95
101
106
107 // FIXME: replace with standard CBM enumerator? but maybe then too many plots from deprecated detectors
108 std::vector<std::string> fDetsList = {"BMON", "MVD", "STS", "RICH", "MUCH", "TRD", "TRD2D", "TOF", "FSD"};
109 std::map<std::string, qa::H1D*> fphDigisNbPerDet = {};
110 };
111} // namespace cbm::algo::qa
112
113#endif /* ALGO_QA_RECOGENERALQA_H */
A unified data-structure to handle QA objects for the online reconstruction.
Class to handle QA-objects in the online reconstruction.
Definition QaData.h:27
1D-histogram
Definition Histogram.h:442
2D-histogram
Definition Histogram.h:511
RecoGeneralQa()=delete
Default constructor.
RecoGeneralQa(const RecoGeneralQa &)=delete
Copy constructor.
qa::H1D * fphTimeslicesFractionEvo
hist: fraction of all ts vs time in run in s, binned for 1000 TS
void operator()(const fles::Timeslice &ts, const GeneralQaData &qaData)
Execution: fill histograms and emit them (FIXME: control emission frequency)
qa::Prof1D * fphCaProcTimeFractEvo
hist: fraction of time for CA vs time in run in s
std::shared_ptr< HistogramSender > fpSender
Histogram sender.
std::map< std::string, qa::H1D * > fphDigisNbPerDet
qa::Prof1D * fphUnpProcTimeFractEvo
hist: fraction of time for unpack vs time in run in s
static const int32_t kNbMsPerBinTime
qa::Prof1D * fphEvtBuildProcTimeFractEvo
hist: time fract. for unpack vs time in run in s
qa::H1D * fphTimeslicesCountEvo
hist: timeslices vs time in run in s, binned for 100 TS
static const int32_t kNbTsPerBinFrac
qa::Prof1D * fphDigiMulTrigProcTimeFractEvo
hist: time fract. for Digi mul trig. vs time in run in s
qa::H2D * fphTotalProcessingTimeEvo
hist: toal proc time vs time in run in s, binned for 8 TS
qa::Data fQaData
QA data, with folder named Reco as hist destination.
qa::Prof1D * fphTrdProcTimeFractEvo
hist: fraction of time for trd reco vs time in run in s
RecoGeneralQa & operator=(RecoGeneralQa &&)=delete
Move assignment operator.
qa::Prof1D * fphTofProcTimeFractEvo
hist: fraction of time for tof reco vs time in run in s
RecoGeneralQa(const uint64_t &runStartTimeNs, std::shared_ptr< HistogramSender > pSender)
Constructor.
RecoGeneralQa(RecoGeneralQa &&)=delete
Move constructor.
static const int32_t kNbTsPerBinTime
qa::Prof1D * fphHitMulTrigProcTimeFractEvo
hist: time fract. for Hit mul trig. vs time in run in s
qa::Prof1D * fphStsProcTimeFractEvo
hist: fraction of time for sts reco vs time in run in s
RecoGeneralQa & operator=(const RecoGeneralQa &)=delete
Copy assignment operator.
static const int32_t kNbTsPerBinCount
qa::Prof1D * fphV0TrigProcTimeFractEvo
hist: time fract. for V0 trigger vs time in run in s
std::vector< std::string > fDetsList
std::map< std::string, size_t > digis_nb