5#ifndef CBMTASKTRIGGERDIGI_H
6#define CBMTASKTRIGGERDIGI_H 1
14#include <TStopwatch.h>
16#include <boost/any.hpp>
52 virtual void Exec(Option_t* opt);
80 virtual InitStatus
Init();
90 const vector<TDigi>* digiVec = boost::any_cast<const vector<TDigi>*>(digiBranch->
GetBranchContainer());
95 std::vector<double> digiTimes(digiVec->size());
96 std::transform(digiVec->begin(), digiVec->end(), digiTimes.begin(),
97 [](
const TDigi& digi) { return digi.GetTime(); });
116 std::unique_ptr<cbm::algo::evbuild::TimeClusterTrigger>
fAlgo =
nullptr;
117 std::unique_ptr<cbm::algo::evbuild::DigiTriggerConfig>
fConfig =
nullptr;
Abstract base class for CBM digi branches.
virtual boost::any GetBranchContainer() const
Get branch pointer.
Collection of digis from all detector systems within one timeslice.
Task class for minimum-bias event trigger from time-distribution of digi data.
ClassDef(CbmTaskTriggerDigi, 1)
CbmDigiManager * fDigiMan
Input data (from unpacking)
std::vector< ECbmModuleId > fSystems
Input data (from simulation)
void AddSystem(ECbmModuleId system)
Add a detector system to the trigger algorithm.
CbmTaskTriggerDigi(const CbmTaskTriggerDigi &)=delete
Copy constructor (disabled)
std::vector< double > * fTriggers
void SetConfig(const cbm::algo::evbuild::DigiTriggerConfig &config)
Configure the trigger algorithm.
std::unique_ptr< cbm::algo::evbuild::TimeClusterTrigger > fAlgo
Output data.
virtual void Exec(Option_t *opt)
Task execution.
virtual void Finish()
Finish timeslice.
CbmTaskTriggerDigi & operator=(const CbmTaskTriggerDigi &)=delete
Assignment operator (disabled)
virtual ~CbmTaskTriggerDigi()
Destructor.
double fTriggerWindow
Configuration / parameters.
const CbmDigiTimeslice * fTimeslice
std::unique_ptr< cbm::algo::evbuild::DigiTriggerConfig > fConfig
Algorithm.
CbmTaskTriggerDigi()
Constructor.
std::vector< double > GetDigiTimes(const CbmDigiBranchBase *digiBranch)
Extract digi times from digi branch.
virtual InitStatus Init()
Task initialisation.
Configuration of the digi trigger class (TimeClusterTrigger)