CbmRoot
Loading...
Searching...
No Matches
CbmBmonUnpackAlgo Class Reference

#include <CbmBmonUnpackAlgo.h>

Inheritance diagram for CbmBmonUnpackAlgo:
[legend]
Collaboration diagram for CbmBmonUnpackAlgo:
[legend]

Public Member Functions

 CbmBmonUnpackAlgo ()
 Create the Cbm Trd Unpack AlgoBase object.
 
virtual ~CbmBmonUnpackAlgo ()
 Destroy the Cbm Trd Unpack Task object.
 
 CbmBmonUnpackAlgo (const CbmBmonUnpackAlgo &)=delete
 Copy constructor - not implemented.
 
CbmBmonUnpackAlgooperator= (const CbmBmonUnpackAlgo &)=delete
 Assignment operator - not implemented.
 
Bool_t Init ()
 Initialisation at begin of run. Forwards to TOF unpacker algo instance.
 
std::vector< CbmBmonDigiUnpack (const fles::Timeslice *ts, std::uint16_t icomp)
 Unpack a given timeslice component. Overload to forward inner calls to TOF unpacker algo instance.
 
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 parameter containers together with the paths to the ascii files to. Forwards to TOF unpacker algo instance.
 
std::vector< CbmErrorMessage > * GetOptOutAVec ()
 Get a given output vector connected to the tree, if called after calling InitUnpacker(). Forwards to TOF unpacker algo instance.
 
std::vector< std::nullptr_t > * GetOptOutBVec ()
 Get a given output vector connected to the tree, if called after calling InitUnpacker(). Forwards to TOF unpacker algo instance.
 
int32_t GetSystemTimeOffset ()
 Get the global system time offset Forwards to TOF unpacker algo instance.
 
void SetDoIgnoreOverlappMs (bool value=false)
 Set the Do Ignore Overlapp µslices flag.
 
void SetOptOutAVec (std::vector< CbmErrorMessage > *vec)
 Set the optional output A vector.
 
void SetOptOutBVec (std::vector< std::nullptr_t > *vec)
 Set the optional output B vector.
 
void SetParFilesBasePath (std::string value)
 Set the base path to the parameter containers.
 
void SetSystemTimeOffset (int32_t value)
 Set the global system time offset.
 
void SetTsStartTime (size_t value)
 Set the start time of the current TS.
 
void SetFlagEpochCountHack2021 (bool bFlagin=true)
 Sets the flag enabling the epoch offset hack for the July 2021 data. Default is enable. Forwards to TOF unpacker algo instance.
 
void SetFlagBmonParMode (bool bFlagin=true)
 Sets the flag switching to a request of CbmMcbm2018BmonPar. Default is enable. Forwards 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.
 
void SetMonitor (std::shared_ptr< CbmTofUnpackMonitor > monitor)
 Set a predefined monitor.
 

Static Public Member Functions

static size_t GetOutputObjSize ()
 Get the Output Obj Size.
 

Protected Member Functions

void finish ()
 Finish function for this algorithm base clase. Forwards to TOF unpacker algo instance.
 
void finishDerived ()
 Function that allows special calls during Finish in the derived algos. Forwards to TOF unpacker algo instance.
 
Bool_t init ()
 Initialisation at begin of run. Forwards to TOF unpacker algo instance.
 
Bool_t initParSet (FairParGenericSet *parset)
 Handles the distribution of the hidden derived classes to their explicit functions. Forwards to TOF unpacker algo instance.
 
Bool_t initParSet (CbmMcbm2018TofPar *parset)
 Handles the distribution of the hidden derived classes to their explicit functions. Forwards to TOF unpacker algo instance.
 
bool setDerivedTsParameters (size_t)
 Set the Derived Ts Parameters.
 
virtual void FinalizeComponent ()
 Copy the buffer from the internal (TOF) algo to the new Digi Type storage.
 
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(timeslice, component)" is overloaded, but necessary to avoir pure virtual class.
 

Private Attributes

CbmTofUnpackAlgo fTofAlgo
 Actual unpacker algo.
 

Detailed Description

Definition at line 27 of file CbmBmonUnpackAlgo.h.

Constructor & Destructor Documentation

◆ CbmBmonUnpackAlgo() [1/2]

CbmBmonUnpackAlgo::CbmBmonUnpackAlgo ( )

Create the Cbm Trd Unpack AlgoBase object.

Definition at line 7 of file CbmBmonUnpackAlgo.cxx.

◆ ~CbmBmonUnpackAlgo()

CbmBmonUnpackAlgo::~CbmBmonUnpackAlgo ( )
virtual

Destroy the Cbm Trd Unpack Task object.

Definition at line 9 of file CbmBmonUnpackAlgo.cxx.

◆ CbmBmonUnpackAlgo() [2/2]

CbmBmonUnpackAlgo::CbmBmonUnpackAlgo ( const CbmBmonUnpackAlgo & )
delete

Copy constructor - not implemented.

Member Function Documentation

◆ FinalizeComponent()

virtual void CbmBmonUnpackAlgo::FinalizeComponent ( )
inlineprotectedvirtual

Copy the buffer from the internal (TOF) algo to the new Digi Type storage.

Definition at line 266 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::GetOutputVec().

Referenced by Unpack().

◆ finish()

void CbmBmonUnpackAlgo::finish ( )
inlineprotected

Finish function for this algorithm base clase. Forwards to TOF unpacker algo instance.

Definition at line 219 of file CbmBmonUnpackAlgo.h.

References CbmTofUnpackAlgo::finish(), and fTofAlgo.

◆ finishDerived()

void CbmBmonUnpackAlgo::finishDerived ( )
inlineprotected

Function that allows special calls during Finish in the derived algos. Forwards to TOF unpacker algo instance.

Definition at line 224 of file CbmBmonUnpackAlgo.h.

References CbmTofUnpackAlgo::finishDerived(), and fTofAlgo.

◆ GetOptOutAVec()

std::vector< CbmErrorMessage > * CbmBmonUnpackAlgo::GetOptOutAVec ( )
inline

Get a given output vector connected to the tree, if called after calling InitUnpacker(). Forwards to TOF unpacker algo instance.

Returns
std::vector<CbmErrorMessage>*

Definition at line 133 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ GetOptOutBVec()

std::vector< std::nullptr_t > * CbmBmonUnpackAlgo::GetOptOutBVec ( )
inline

Get a given output vector connected to the tree, if called after calling InitUnpacker(). Forwards to TOF unpacker algo instance.

Returns
std::vector<std::nullptr_t>*

Definition at line 141 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ GetOutputObjSize()

static size_t CbmBmonUnpackAlgo::GetOutputObjSize ( )
inlinestatic

Get the Output Obj Size.

Returns
size_t

Definition at line 148 of file CbmBmonUnpackAlgo.h.

Referenced by Unpack().

◆ GetParContainerRequest()

virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * CbmBmonUnpackAlgo::GetParContainerRequest ( std::string geoTag,
std::uint32_t runId )
inlinevirtual

Get the requested parameter containers. To be defined in the derived classes! Return the required parameter containers together with the paths to the ascii files to. Forwards to TOF unpacker algo instance.

Parameters
[in]std::stringgeoTag as used in CbmSetup
[in]std::uint32_trunId for runwise defined parameters
Returns
fParContVec

Definition at line 122 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::GetParContainerRequest().

◆ GetSystemTimeOffset()

int32_t CbmBmonUnpackAlgo::GetSystemTimeOffset ( )
inline

Get the global system time offset Forwards to TOF unpacker algo instance.

Remarks
in princible this should go to parameters

Definition at line 155 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ Init()

Bool_t CbmBmonUnpackAlgo::Init ( )
inline

Initialisation at begin of run. Forwards to TOF unpacker algo instance.

Return values
Bool_tinitOk If not kTRUE, task will be set inactive.

Definition at line 46 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ init()

Bool_t CbmBmonUnpackAlgo::init ( )
inlineprotected

Initialisation at begin of run. Forwards to TOF unpacker algo instance.

Return values
Bool_tinitOk

Definition at line 231 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::init().

◆ initParSet() [1/2]

Bool_t CbmBmonUnpackAlgo::initParSet ( CbmMcbm2018TofPar * parset)
inlineprotected

Handles the distribution of the hidden derived classes to their explicit functions. Forwards to TOF unpacker algo instance.

Parameters
parset
Returns
Bool_t initOk

Definition at line 249 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::initParSet().

◆ initParSet() [2/2]

Bool_t CbmBmonUnpackAlgo::initParSet ( FairParGenericSet * parset)
inlineprotected

Handles the distribution of the hidden derived classes to their explicit functions. Forwards to TOF unpacker algo instance.

Parameters
parset
Returns
Bool_t initOk

Definition at line 240 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::initParSet().

◆ operator=()

CbmBmonUnpackAlgo & CbmBmonUnpackAlgo::operator= ( const CbmBmonUnpackAlgo & )
delete

Assignment operator - not implemented.

◆ setDerivedTsParameters()

bool CbmBmonUnpackAlgo::setDerivedTsParameters ( size_t )
inlineprotected

Set the Derived Ts Parameters.

In this function parameters required by the explicit algo connected to the timeslice can be set.

Parameters
itimeslice
Returns
true
false

Definition at line 261 of file CbmBmonUnpackAlgo.h.

Referenced by Unpack().

◆ SetDoIgnoreOverlappMs()

void CbmBmonUnpackAlgo::SetDoIgnoreOverlappMs ( bool value = false)
inline

Set the Do Ignore Overlapp µslices flag.

Parameters
value

Definition at line 163 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ SetFlagBmonParMode()

void CbmBmonUnpackAlgo::SetFlagBmonParMode ( bool bFlagin = true)
inline

Sets the flag switching to a request of CbmMcbm2018BmonPar. Default is enable. Forwards to TOF unpacker algo instance.

Parameters
[in]Optionalboolean flag value, default is true

Definition at line 202 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::SetFlagBmonParMode().

◆ SetFlagEpochCountHack2021()

void CbmBmonUnpackAlgo::SetFlagEpochCountHack2021 ( bool bFlagin = true)
inline

Sets the flag enabling the epoch offset hack for the July 2021 data. Default is enable. Forwards to TOF unpacker algo instance.

Parameters
[in]Optionalboolean flag value, default is true

Definition at line 194 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::SetFlagEpochCountHack2021().

◆ SetMonitor()

void CbmBmonUnpackAlgo::SetMonitor ( std::shared_ptr< CbmTofUnpackMonitor > monitor)
inline

Set a predefined monitor.

Parameters
monitorpredefined unpacking monitor Forwards to TOF unpacker algo instance.

Definition at line 215 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::SetMonitor().

◆ SetOptOutAVec()

void CbmBmonUnpackAlgo::SetOptOutAVec ( std::vector< CbmErrorMessage > * vec)
inline

Set the optional output A vector.

Parameters
vec

Definition at line 170 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ SetOptOutBVec()

void CbmBmonUnpackAlgo::SetOptOutBVec ( std::vector< std::nullptr_t > * vec)
inline

Set the optional output B vector.

Parameters
vec

Definition at line 173 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ SetParFileName()

void CbmBmonUnpackAlgo::SetParFileName ( std::string sNewName)
inline

Sets the name of the parameter file to be used. Forwards to TOF unpacker algo instance.

Parameters
[in]std:string,pathshould not be included as set in the Config class

Definition at line 210 of file CbmBmonUnpackAlgo.h.

References fTofAlgo, and CbmTofUnpackAlgo::SetParFileName().

◆ SetParFilesBasePath()

void CbmBmonUnpackAlgo::SetParFilesBasePath ( std::string value)
inline

Set the base path to the parameter containers.

Parameters
value

Definition at line 180 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ SetSystemTimeOffset()

void CbmBmonUnpackAlgo::SetSystemTimeOffset ( int32_t value)
inline

Set the global system time offset.

Remarks
in princible this should go to parameters

Definition at line 183 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ SetTsStartTime()

void CbmBmonUnpackAlgo::SetTsStartTime ( size_t value)
inline

Set the start time of the current TS.

Definition at line 186 of file CbmBmonUnpackAlgo.h.

References fTofAlgo.

◆ Unpack()

std::vector< CbmBmonDigi > CbmBmonUnpackAlgo::Unpack ( const fles::Timeslice * ts,
std::uint16_t icomp )
inline

Unpack a given timeslice component. Overload to forward inner calls to TOF unpacker algo instance.

Parameters
tstimeslice pointer
icompindex to the component to be unpacked
Returns
true
false
Remarks
The content of the component can only be accessed via the timeslice. Hence, we need to pass the pointer to the full timeslice

On first TS, extract the TS parameters from header (by definition stable over time).

Loop over choosen microslices (all or core only)

Todo
add potential counter for corrupted microslices

Give opportunity to finalize component (e.g. copy from temp buffers) if necessary

Definition at line 63 of file CbmBmonUnpackAlgo.h.

References FinalizeComponent(), fTofAlgo, GetOutputObjSize(), CbmTofUnpackAlgo::GetOutputVec(), setDerivedTsParameters(), and CbmTofUnpackAlgo::unpack().

◆ unpack()

virtual bool CbmBmonUnpackAlgo::unpack ( const fles::Timeslice * ,
std::uint16_t ,
UInt_t  )
inlineprotectedvirtual

Unpack a given microslice. To be implemented in the derived unpacker algos. Unused as "Unpack(timeslice, component)" is overloaded, but necessary to avoir pure virtual class.

Parameters
tstimeslice pointer
icompindex to the component to be unpacked
imsliceindex of the microslice to be unpacked
Returns
true
false
Remarks
The content of the µslice can only be accessed via the timeslice. Hence, we need to pass the pointer to the full timeslice

Definition at line 287 of file CbmBmonUnpackAlgo.h.

Member Data Documentation

◆ fTofAlgo


The documentation for this class was generated from the following files: