5#ifndef CBM_ALGO_EVENTBUILDER_H
6#define CBM_ALGO_EVENTBUILDER_H 1
92 std::optional<DigiEventSelector> selector)
const;
126 template<
typename Vector>
127 static Vector
CopyRange(
const Vector& source,
double tMin,
double tMax)
129 using Data =
typename Vector::value_type;
130 auto comp1 = [](
const Data& obj,
double value) {
return obj.GetTime() < value; };
131 auto comp2 = [](
double value,
const Data& obj) {
return value < obj.GetTime(); };
132 auto lower = std::lower_bound(source.begin(), source.end(), tMin, comp1);
133 auto upper = std::upper_bound(lower, source.end(), tMax, comp2);
134 return Vector(lower, upper);
Configuration of the EventBuilder class.
Constructs CbmDigiEvents out of CbmDigiTimeslices.
DigiEvent BuildEvent(const DigiData &ts, EventBuilderMonitorData &monitor, double trigger) const
Build a single event from a trigger time.
virtual ~EventBuilder()
Destructor.
std::pair< std::vector< DigiEvent >, EventBuilderMonitorData > resultType
EventBuilderConfig fConfig
Configuration / parameters.
resultType operator()(const DigiData &ts, const std::vector< double > triggers, std::optional< DigiEventSelector > selector) const
Execution.
static Vector CopyRange(const Vector &source, double tMin, double tMax)
Copy data objects in a given time interval from the source to the target vector.
EventBuilder(const EventBuilderConfig &config)
Constructor.
std::string ToString() const
Info to string.
Collection of digis from all detector systems.
Event data with event number and trigger time.
Monitoring data for event building for one detector.
size_t nDigisInEvents
Number of digis collected into events.
size_t nDigis
Full number of digis in input source.
Monitoring data for event building.
size_t numTriggers
Number of input triggers.
EventBuilderDetectorMonitorData much
Monitoring data for MUCH.
EventBuilderDetectorMonitorData rich
Monitoring data for RICH.
size_t numEvents
Number of built and selected events.
EventBuilderDetectorMonitorData sts
Monitoring data for STS.
EventBuilderDetectorMonitorData tof
Monitoring data for TOF.
EventBuilderDetectorMonitorData bmon
Monitoring data for Bmon.
EventBuilderDetectorMonitorData trd2d
Monitoring data for TRD2D.
xpu::timings time
Time for event building.
EventBuilderDetectorMonitorData fsd
Monitoring data for FSD.
EventBuilderDetectorMonitorData trd
Monitoring data for TRD.
EventBuilderDetectorMonitorData psd
Monitoring data for PSD.