22 , fTriggerDet(config.fDigiTrigger.Detector())
23 , fDigiMultTrigger(config.fDigiTrigger.Window(), config.fDigiTrigger.Threshold(), config.fDigiTrigger.DeadTime())
24 , fHitMultTrigger(config.fHitMultTrigger)
26 , fBuilder(config.fBuilder)
27 , fSelector(config.fSelector)
39 fSender->PrepareAndSendMsg(std::pair<uint32_t, uint32_t>(histsCfg.size(), canvsCfg.size()),
40 zmq::send_flags::sndmore);
45 for (
const auto& cfg : histsCfg) {
46 fSender->PrepareAndSendMsg(cfg, zmq::send_flags::sndmore);
52 for (
const auto& cfg : canvsCfg) {
53 fSender->PrepareAndSendMsg(cfg, zmq::send_flags::sndmore);
73 std::vector<double> triggers;
79 triggers = std::move(v0Triggers);
80 result.second.v0Trigger = std::move(v0TriggerMon);
86 triggers = std::move(hitTriggers);
87 result.second.hitMultTrigger = std::move(digiTriggerMon);
94 triggers = std::move(digiTriggers);
95 result.second.digiMultTrigger = std::move(digiTriggerMon);
100 throw std::runtime_error(
"no trigger is configured");
104 result.first = std::move(events);
105 result.second.evbuild = evbuildMon;
109 L_(info) <<
"Running DigiEventQa";
112 L_(info) <<
"Running DigiEventQa: done";
116 L_(info) <<
"Published histograms, nb: " << nHistograms;
120 L_(info) <<
"Triggers: " << triggers.size() <<
", events " << result.first.size();
130 L_(info) <<
"=== Eventbuilder configuration ===================";
142 L_(info) <<
"======================================================";
150 std::vector<double> result;
153 result.resize(timeslice.
fSts.size());
154 auto it1 = timeslice.
fSts.begin();
155 auto it2 = timeslice.
fSts.end();
156 std::transform(it1, it2, result.begin(), [](
const CbmStsDigi& digi) { return digi.GetTime(); });
160 result.resize(timeslice.
fRich.size());
161 auto it1 = timeslice.
fRich.begin();
162 auto it2 = timeslice.
fRich.end();
163 std::transform(it1, it2, result.begin(), [](
const CbmRichDigi& digi) { return digi.GetTime(); });
167 result.resize(timeslice.
fMuch.size());
168 auto it1 = timeslice.
fMuch.begin();
169 auto it2 = timeslice.
fMuch.end();
170 std::transform(it1, it2, result.begin(), [](
const CbmMuchDigi& digi) { return digi.GetTime(); });
174 result.resize(timeslice.
fTrd.size());
175 auto it1 = timeslice.
fTrd.begin();
176 auto it2 = timeslice.
fTrd.end();
177 std::transform(it1, it2, result.begin(), [](
const CbmTrdDigi& digi) { return digi.GetTime(); });
181 result.resize(timeslice.
fTof.size());
182 auto it1 = timeslice.
fTof.begin();
183 auto it2 = timeslice.
fTof.end();
184 std::transform(it1, it2, result.begin(), [](
const CbmTofDigi& digi) { return digi.GetTime(); });
188 result.resize(timeslice.
fPsd.size());
189 auto it1 = timeslice.
fPsd.begin();
190 auto it2 = timeslice.
fPsd.end();
191 std::transform(it1, it2, result.begin(), [](
const CbmPsdDigi& digi) { return digi.GetTime(); });
195 result.resize(timeslice.
fFsd.size());
196 auto it1 = timeslice.
fFsd.begin();
197 auto it2 = timeslice.
fFsd.end();
198 std::transform(it1, it2, result.begin(), [](
const CbmFsdDigi& digi) { return digi.GetTime(); });
202 result.resize(timeslice.
fBmon.size());
203 auto it1 = timeslice.
fBmon.begin();
204 auto it2 = timeslice.
fBmon.end();
205 std::transform(it1, it2, result.begin(), [](
const CbmTofDigi& digi) { return digi.GetTime(); });
209 L_(error) <<
"EventbuildChain::GetDigiTimes: Unknown system " << system;
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kPsd
Projectile spectator detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
@ kFsd
Forward spectator detector.
@ kRich
Ring-Imaging Cherenkov Detector.
cbm::algo::ca::Vector< cbm::algo::ca::Track > TrackVector
A histogram container for the histogram server (header)
Data class for FSD digital information.
Data class for PSD digital information.
Data class for a single-channel message in the STS.
Data class for expanded digital TOF information.
Configuration of digi event building.
V0TriggerConfig fV0Trigger
V0 trigger configuration.
DigiTriggerConfig fDigiTrigger
Digi trigger configuration.
DigiTriggerConfig fHitMultTrigger
Hit multiplicity trigger configuration.
std::string ToString() const
Info to string.
const DigiEventQaConfig & GetConfig() const
Const access to Qa config.
std::string ToString() const
Info to string.
bool IsSet() const
Check whether config was set.
std::string ToString() const
Info to string.
~EventbuildChain()
Destructor.
DigiEventSelector fSelector
Event selector algorithm.
ResultType Run(const DigiData &, const RecoResults &)
Execution.
ECbmModuleId fTriggerDet
Trigger detector.
std::pair< std::vector< DigiEvent >, EventbuildChainMonitorData > ResultType
void Status() const
Status info to logger.
DigiEventQa fQa
Event QA algorithm.
std::vector< double > GetDigiTimes(const DigiData ×lice, ECbmModuleId system)
Extract digi times from CbmDigiTimeslice.
EventBuilder fBuilder
Event builder algorithm.
EventbuildChain(const Config &config, std::shared_ptr< HistogramSender > sender=nullptr)
Constructor.
std::shared_ptr< HistogramSender > fSender
Histogram sender.
Config fConfig
Global configuration.
TimeClusterTrigger fDigiMultTrigger
Digi multiplicity trigger algorithm.
V0Trigger fV0Trigger
V0 trigger algorithm.
HitMultTrigger fHitMultTrigger
Hit multiplicity trigger algorithm.
std::string ToString() const
Info to string.
std::string ToString() const
Info to string.
bool IsSet() const
Check whether config was set.
std::string ToString() const
Info to string.
std::string_view ToString(T t)
Collection of digis from all detector systems.
PODVector< CbmRichDigi > fRich
Unpacked RICH digis.
PODVector< CbmTrdDigi > fTrd
Unpacked TRD digis.
PODVector< CbmStsDigi > fSts
Unpacked STS digis.
PODVector< CbmFsdDigi > fFsd
Unpacked FSD digis.
PODVector< CbmTofDigi > fTof
Unpacked TOF digis.
PODVector< CbmPsdDigi > fPsd
Unpacked PSD digis.
PODVector< CbmMuchDigi > fMuch
Unpacked MUCH digis.
PODVector< CbmBmonDigi > fBmon
Unpacked Bmon digis.
ca::Vector< ca::Track > tracks
Configuration data for the QA of CbmDigiEvents.
std::vector< std::pair< std::string, std::string > > GetHistosConfigs() const
std::vector< std::pair< std::string, std::string > > GetCanvasConfigs() const
QA results for CbmDigiEvent objects.
qa::HistogramContainer fHistContainer
Structure to keep the histograms for sending them on the histogram server.
std::forward_list< qa::H1D > fvH1
List of 1D-histograms.