9#include <FairRunOnline.h>
13#include <THttpServer.h>
14#include <TStopwatch.h>
51 double lower = entry.second.first -
BORDER;
52 double upper = entry.second.second +
BORDER;
57 assert(
fConfig.fData.count(system) == 0);
89 logOut << setw(15) << left << GetName() <<
" [";
90 logOut << fixed << setw(8) << setprecision(1) << right << timer.RealTime() * 1000. <<
" ms] ";
91 logOut <<
"TS " <<
fNumTs <<
", events " << numEvents;
92 LOG(info) << logOut.str();
104 LOG(info) <<
"=====================================";
105 LOG(info) << GetName() <<
": Run summary";
106 LOG(info) <<
"Timeslices : " <<
fNumTs;
108 LOG(info) <<
"Exec time : " << fixed << setprecision(2) << 1000. *
fExecTime / double(
fNumTs) <<
" ms / TS";
111 TH1D* histo = entry.second;
112 LOG(info) << subsystem <<
" digi times: entries " << histo->GetEntries() <<
", mean " << histo->GetMean()
113 <<
", stddev " << histo->GetStdDev();
116 LOG(info) <<
"=====================================";
125 FairRootManager* ioman = FairRootManager::Instance();
128 LOG(info) <<
"==================================================";
129 LOG(info) << GetName() <<
": Initialising...";
132 fEvents = ioman->InitObjectAs<
const std::vector<CbmDigiEvent>*>(
"DigiEvent");
134 LOG(error) << GetName() <<
": No input branch DigiEvent!";
137 LOG(info) <<
"--- Found branch DigiEvent";
140 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
142 LOG(info) <<
"--- Http server present; registering histograms";
144 server->Register(
"DigiEvent", entry.second);
147 LOG(info) <<
"--- No Http server present";
150 fAlgo = std::make_unique<cbm::algo::evbuild::DigiEventQa>(
fConfig);
151 LOG(info) <<
fAlgo->ToString();
153 LOG(info) <<
"==================================================";
162 bool add = TH1::AddDirectoryStatus();
163 TH1::AddDirectory(
false);
166 TH1::AddDirectory(add);
167 for (uint32_t bin = 0; bin <= source.
GetNbinsX() + 1; bin++) {
ClassImp(CbmConverterManager)
ECbmModuleId
Enumerator for module Identifiers.
QA task class for digi events produced by the event builder.
size_t fNumTs
Input data (events)
CbmTaskDigiEventQa()
Constructor.
std::unique_ptr< cbm::algo::evbuild::DigiEventQa > fAlgo
double fExecTime
Execution time [s].
const std::vector< CbmDigiEvent > * fEvents
std::map< ECbmModuleId, TH1D * > fDigiTimeHistos
cbm::algo::evbuild::DigiEventQaConfig fConfig
TH1D * ToTH1D(const cbm::algo::qa::H1D &source)
Create a ROOT TH1D from a H1D object.
virtual void Exec(Option_t *opt)
Task execution.
virtual ~CbmTaskDigiEventQa()
Destructor.
size_t fNumEvents
Number of analysed events.
virtual InitStatus Init()
Task initialisation.
void Config(const cbm::algo::evbuild::Config &config)
Configuration.
virtual void Finish()
Finish timeslice.
Configuration of digi event building.
EventBuilderConfig fBuilder
Event builder configuration.
std::map< ECbmModuleId, std::pair< double, double > > fWindows
Key: detector; value: [tmin, tmax].
double GetBinContent(uint32_t iBin) const
Gets bin content.
const std::string & GetName() const
Gets name.
double GetMaxX() const
Gets x-axis lower bound.
double GetEntries() const
Gets number of entries.
double GetMinX() const
Gets x-axis lower bound.
uint32_t GetNbinsX() const
Gets number of bins for x axis.
std::string_view ToString(T t)
static std::vector< DigiEvent > FromCbmDigiEvents(const std::vector< CbmDigiEvent > &events)
Configuration data for the QA of CbmDigiEvents.
QA results for CbmDigiEvent objects.
std::unordered_map< ECbmModuleId, qa::H1D * > fDigiTimeHistos
Configuration data for the QA of CbmDigiEvents for a given detector.