5#ifndef CbmBmonUnpackAlgo_H
6#define CbmBmonUnpackAlgo_H
11#include "CbmRecoUnpackAlgo.tmpl"
15#include "Timeslice.hpp"
20#include <RtypesCore.h>
48 LOG(info) << fName <<
"::Init()";
63 std::vector<CbmBmonDigi>
Unpack(
const fles::Timeslice* ts, std::uint16_t icomp)
73 if (fIsFirstTs) getTimesliceParams(ts);
76 fTsIndex = ts->index();
79 size_t itimeslice = fTsIndex / fNrCoreMsPerTs;
84 auto nrMsToLoop = fDoIgnoreOverlappMs ? fNrCoreMsPerTs : fNrMsPerTs;
85 LOG(debug) << fName <<
"::Unpack: nb MS used is " << nrMsToLoop;
88 for (UInt_t imslice = 0; imslice < nrMsToLoop; imslice++) {
99 auto ndigis = fOutputVec.size();
100 fNrCreatedDigis += ndigis;
103 fSumInDataSize += ts->size_component(icomp) / 1.0e6;
121 virtual std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>*
165 fDoIgnoreOverlappMs = value;
166 fTofAlgo.SetDoIgnoreOverlappMs(value);
287 virtual bool unpack(
const fles::Timeslice* , std::uint16_t , UInt_t ) {
return true; }
Baseclass for the TrdR unpacker algorithms.
Data class for a signal in the t-zero detector.
std::vector< CbmErrorMessage > * GetOptOutAVec()
Get a given output vector connected to the tree, if called after calling InitUnpacker()....
bool setDerivedTsParameters(size_t)
Set the Derived Ts Parameters.
Bool_t init()
Initialisation at begin of run. Forwards to TOF unpacker algo instance.
int32_t GetSystemTimeOffset()
Get the global system time offset Forwards to TOF unpacker algo instance.
void SetTsStartTime(size_t value)
Set the start time of the current TS.
std::vector< CbmBmonDigi > Unpack(const fles::Timeslice *ts, std::uint16_t icomp)
Unpack a given timeslice component. Overload to forward inner calls to TOF unpacker algo instance.
void SetParFileName(std::string sNewName)
Sets the name of the parameter file to be used. Forwards to TOF unpacker algo instance.
CbmBmonUnpackAlgo()
Create the Cbm Trd Unpack AlgoBase object.
void SetDoIgnoreOverlappMs(bool value=false)
Set the Do Ignore Overlapp µslices flag.
Bool_t initParSet(CbmMcbm2018TofPar *parset)
Handles the distribution of the hidden derived classes to their explicit functions....
CbmBmonUnpackAlgo(const CbmBmonUnpackAlgo &)=delete
Copy constructor - not implemented.
CbmBmonUnpackAlgo & operator=(const CbmBmonUnpackAlgo &)=delete
Assignment operator - not implemented.
void finishDerived()
Function that allows special calls during Finish in the derived algos. Forwards to TOF unpacker algo ...
Bool_t Init()
Initialisation at begin of run. Forwards to TOF unpacker algo instance.
virtual bool unpack(const fles::Timeslice *, std::uint16_t, UInt_t)
Unpack a given microslice. To be implemented in the derived unpacker algos. Unused as "Unpack(timesli...
void SetFlagBmonParMode(bool bFlagin=true)
Sets the flag switching to a request of CbmMcbm2018BmonPar. Default is enable. Forwards to TOF unpack...
void SetSystemTimeOffset(int32_t value)
Set the global system time offset.
static size_t GetOutputObjSize()
Get the Output Obj Size.
void finish()
Finish function for this algorithm base clase. Forwards to TOF unpacker algo instance.
void SetOptOutAVec(std::vector< CbmErrorMessage > *vec)
Set the optional output A vector.
CbmTofUnpackAlgo fTofAlgo
Actual unpacker algo.
void SetOptOutBVec(std::vector< std::nullptr_t > *vec)
Set the optional output B vector.
virtual ~CbmBmonUnpackAlgo()
Destroy the Cbm Trd Unpack Task object.
std::vector< std::nullptr_t > * GetOptOutBVec()
Get a given output vector connected to the tree, if called after calling InitUnpacker()....
void SetMonitor(std::shared_ptr< CbmTofUnpackMonitor > monitor)
Set a predefined monitor.
Bool_t initParSet(FairParGenericSet *parset)
Handles the distribution of the hidden derived classes to their explicit functions....
virtual void FinalizeComponent()
Copy the buffer from the internal (TOF) algo to the new Digi Type storage.
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, std::uint32_t runId)
Get the requested parameter containers. To be defined in the derived classes! Return the required par...
void SetParFilesBasePath(std::string value)
Set the base path to the parameter containers.
void SetFlagEpochCountHack2021(bool bFlagin=true)
Sets the flag enabling the epoch offset hack for the July 2021 data. Default is enable....
Data class for expanded digital TOF information.
void SetMonitor(std::shared_ptr< CbmTofUnpackMonitor > monitor)
Set a predefined monitor.
void SetFlagEpochCountHack2021(bool bFlagin=true)
Sets the flag enabling the epoch offset hack for the July 2021 data. Default is enable.
Bool_t initParSet(FairParGenericSet *parset)
Handles the distribution of the hidden derived classes to their explicit functions.
std::vector< CbmTofDigi > & GetOutputVec()
Get a reference to the output vector. Used by BMON encapsulating algo to access output.
void SetParFileName(std::string sNewName)
Sets the name of the parameter file to be used.
void finishDerived()
Function that allows special calls during Finish in the derived algos.
void SetFlagBmonParMode(bool bFlagin=true)
Sets the flag switching to a request of CbmMcbm2018BmonPar. Default is enable.
void finish()
Raise permissions for access to these protected methods to allow access in encapsulating BMON algo.
Bool_t init()
Initialisation at begin of run. Special inits of the derived algos.
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, std::uint32_t runId)
Get the requested parameter containers. To be defined in the derived classes! Return the required par...
bool unpack(const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
Unpack a given microslice. To be implemented in the derived unpacker algos.