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

#include <CbmTrdUnpackFaspAlgo.h>

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

Classes

class  CbmTrdFaspMessage
 Data structure for unpacking the FASP word. More...
 
class  CbmTrdFaspMessage24
 

Public Types

enum class  eMessageLength : int {
  kMessCh = 4 , kMessType = 1 , kMessTlab = 7 , kMessData = 14 ,
  kMessFasp = 6 , kMessEpoch = 21
}
 Bytes per FASP frame stored in the microslices (32 bits words) More...
 
enum  eMessageType { kData = 0 , kEpoch = 1 , kNone }
 
enum class  eMessageVersion : int { kMessLegacy = 2 , kMess24 = 3 , kMessNoDef }
 

Public Member Functions

 CbmTrdUnpackFaspAlgo ()
 Create the Cbm Trd Unpack AlgoBase object.
 
virtual ~CbmTrdUnpackFaspAlgo ()
 Destroy the Cbm Trd Unpack Task object.
 
 CbmTrdUnpackFaspAlgo (const CbmTrdUnpackFaspAlgo &)=delete
 Copy constructor - not implemented.
 
CbmTrdUnpackFaspAlgooperator= (const CbmTrdUnpackFaspAlgo &)=delete
 Assignment operator - not implemented.
 
virtual const CbmTrdParSetAsicGetAsicPar () const
 
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest (std::string geoTag, std::uint32_t runId)
 Get the requested parameter containers. Return the required parameter containers together with the paths to the ascii files to.
 
void SetMonitor (std::shared_ptr< CbmTrdUnpackFaspMonitor > monitor)
 Set a predefined monitor.
 
uint32_t ResetTimeslice ()
 Check and assure there are no data left-overs.
 

Protected Member Functions

eMessageType mess_type (uint32_t wd)
 Get message type from the FASP word.
 
bool pushDigis (std::vector< CbmTrdUnpackFaspAlgo::CbmTrdFaspMessage > messages, const uint16_t mod_id)
 
void finish ()
 Finish function for this algorithm base clase.
 
virtual Bool_t init ()
 Additional initialisation function for all BaseR derived algorithms.
 
Bool_t initParSet (FairParGenericSet *parset)
 Handles the distribution of the hidden derived classes to their explicit functions.
 
bool unpack (const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
 Unpack a given microslice.
 
void FinalizeComponent ()
 Finalize component (e.g. copy from temp buffers)
 

Protected Attributes

ULong64_t fTime = 0
 Time offset for digi wrt the TS start, expressed in 80 MHz clks. It contains:
 

Static Protected Attributes

static const std::uint8_t fBytesPerWord = 4
 Bytes per FASP frame stored in the microslices (32 bits words)
 

Private Attributes

std::map< uint16_t, std::pair< uint16_t, uint16_t > > * fCompMap = nullptr
 
std::array< std::vector< CbmTrdDigi >, NFASPMOD *NFASPCHfDigiBuffer
 
std::shared_ptr< CbmTrdUnpackFaspMonitorfMonitor = nullptr
 Potential (online) monitor for the unpacking process.
 
std::vector< uint16_t > fModuleId = {}
 
CbmTrdParSetAsic fAsicSet
 
CbmTrdParSetDigifDigiSet = nullptr
 
CbmTrdFaspMessagefMess = nullptr
 

Detailed Description

Definition at line 45 of file CbmTrdUnpackFaspAlgo.h.

Member Enumeration Documentation

◆ eMessageLength

enum class CbmTrdUnpackFaspAlgo::eMessageLength : int
strong

Bytes per FASP frame stored in the microslices (32 bits words)

  • DATA WORD - for legacy version ffff.ffdd dddd.dddd dddd.tttt ttta.cccc f - FASP id d - ADC signal t - time label inside epoch a - word type (1) c - channel id
  • EPOCH WORD - ffff.fftt tttt.tttt tttt.tttt ttta.cccc f - FASP id t - epoch index a - word type (0)

c - channel id

  • DATA WORD - for 06.2024 version afff.fffc ccct.tttt ttdd.dddd dddd.dddd f - FASP id d - ADC signal t - time label inside epoch a - word type (1) c - channel id
  • EPOCH WORD - afff.fffc ccct.tttt tttt tttt tttt.tttt a - word type (0) f - FASP id t - epoch index c - channel id
Enumerator
kMessCh 
kMessType 
kMessTlab 
kMessData 
kMessFasp 
kMessEpoch 

Definition at line 76 of file CbmTrdUnpackFaspAlgo.h.

◆ eMessageType

Enumerator
kData 
kEpoch 
kNone 

Definition at line 85 of file CbmTrdUnpackFaspAlgo.h.

◆ eMessageVersion

enum class CbmTrdUnpackFaspAlgo::eMessageVersion : int
strong
Enumerator
kMessLegacy 
kMess24 

unpacker version for 2-board FASPRO+GETS HW

kMessNoDef 

unpacker version for 1-board FASPRO HW first used 18.06.24 (mCBM)

default unpacker version

Definition at line 91 of file CbmTrdUnpackFaspAlgo.h.

Constructor & Destructor Documentation

◆ CbmTrdUnpackFaspAlgo() [1/2]

CbmTrdUnpackFaspAlgo::CbmTrdUnpackFaspAlgo ( )

Create the Cbm Trd Unpack AlgoBase object.

Definition at line 37 of file CbmTrdUnpackFaspAlgo.cxx.

◆ ~CbmTrdUnpackFaspAlgo()

CbmTrdUnpackFaspAlgo::~CbmTrdUnpackFaspAlgo ( )
virtual

Destroy the Cbm Trd Unpack Task object.

Definition at line 40 of file CbmTrdUnpackFaspAlgo.cxx.

◆ CbmTrdUnpackFaspAlgo() [2/2]

CbmTrdUnpackFaspAlgo::CbmTrdUnpackFaspAlgo ( const CbmTrdUnpackFaspAlgo & )
delete

Copy constructor - not implemented.

Member Function Documentation

◆ FinalizeComponent()

void CbmTrdUnpackFaspAlgo::FinalizeComponent ( )
protected

Finalize component (e.g. copy from temp buffers)

Definition at line 239 of file CbmTrdUnpackFaspAlgo.cxx.

References fDigiBuffer, fMess, fMonitor, kMessLegacy, NFASPCH, NFASPMOD, size(), and CbmTrdUnpackFaspAlgo::CbmTrdFaspMessage::version.

◆ finish()

void CbmTrdUnpackFaspAlgo::finish ( )
inlineprotected

Finish function for this algorithm base clase.

Definition at line 174 of file CbmTrdUnpackFaspAlgo.h.

References fMonitor.

◆ GetAsicPar()

virtual const CbmTrdParSetAsic * CbmTrdUnpackFaspAlgo::GetAsicPar ( ) const
inlinevirtual

Access the asic parameter list, read-only

Definition at line 143 of file CbmTrdUnpackFaspAlgo.h.

References fAsicSet.

◆ GetParContainerRequest()

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

Get the requested parameter containers. Return the required parameter containers together with the paths to the ascii files to.

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

Definition at line 90 of file CbmTrdUnpackFaspAlgo.cxx.

◆ init()

virtual Bool_t CbmTrdUnpackFaspAlgo::init ( )
inlineprotectedvirtual

Additional initialisation function for all BaseR derived algorithms.

Returns
Bool_t initOk

Definition at line 184 of file CbmTrdUnpackFaspAlgo.h.

◆ initParSet()

Bool_t CbmTrdUnpackFaspAlgo::initParSet ( FairParGenericSet * parset)
protected

Handles the distribution of the hidden derived classes to their explicit functions.

Parameters
parset
Returns
Bool_t initOk

Definition at line 43 of file CbmTrdUnpackFaspAlgo.cxx.

References CbmTrdParSet::addParam(), fAsicSet, fDigiSet, fModuleId, fMonitor, CbmTrdParSet::GetModuleMap(), CbmTrdParSet::GetModulePar(), CbmTrdParSet::GetNrOfModules(), and CbmTrdDigi::kFASP.

◆ mess_type()

eMessageType CbmTrdUnpackFaspAlgo::mess_type ( uint32_t wd)
protected

Get message type from the FASP word.

◆ operator=()

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

Assignment operator - not implemented.

◆ pushDigis()

◆ ResetTimeslice()

uint32_t CbmTrdUnpackFaspAlgo::ResetTimeslice ( )

Check and assure there are no data left-overs.

PAL 03/08/2022: clear internal buffer at latest between two timeslices (TS are self contained!) D.Smith: As of 27.4.2023 only loops over pads of a single component.

Definition at line 221 of file CbmTrdUnpackFaspAlgo.cxx.

References fDigiBuffer, NFASPCH, NFASPMOD, and size().

◆ SetMonitor()

void CbmTrdUnpackFaspAlgo::SetMonitor ( std::shared_ptr< CbmTrdUnpackFaspMonitor > monitor)
inline

Set a predefined monitor.

Parameters
monitorpredefined unpacking monitor

Definition at line 157 of file CbmTrdUnpackFaspAlgo.h.

References fMonitor.

◆ unpack()

bool CbmTrdUnpackFaspAlgo::unpack ( const fles::Timeslice * ts,
std::uint16_t icomp,
UInt_t imslice )
protected

Member Data Documentation

◆ fAsicSet

CbmTrdParSetAsic CbmTrdUnpackFaspAlgo::fAsicSet
private

‍list of modules for which there is are calibration parameters

Definition at line 224 of file CbmTrdUnpackFaspAlgo.h.

Referenced by GetAsicPar(), initParSet(), pushDigis(), and unpack().

◆ fBytesPerWord

const std::uint8_t CbmTrdUnpackFaspAlgo::fBytesPerWord = 4
staticprotected

Bytes per FASP frame stored in the microslices (32 bits words)

Definition at line 215 of file CbmTrdUnpackFaspAlgo.h.

◆ fCompMap

std::map<uint16_t, std::pair<uint16_t, uint16_t> >* CbmTrdUnpackFaspAlgo::fCompMap = nullptr
private

Definition at line 218 of file CbmTrdUnpackFaspAlgo.h.

◆ fDigiBuffer

std::array<std::vector<CbmTrdDigi>, NFASPMOD* NFASPCH> CbmTrdUnpackFaspAlgo::fDigiBuffer
private
Initial value:
= {
{}}

‍Map eq_id -> (mod_id, crob_id)

Definition at line 219 of file CbmTrdUnpackFaspAlgo.h.

Referenced by FinalizeComponent(), pushDigis(), and ResetTimeslice().

◆ fDigiSet

CbmTrdParSetDigi* CbmTrdUnpackFaspAlgo::fDigiSet = nullptr
private

Definition at line 225 of file CbmTrdUnpackFaspAlgo.h.

Referenced by initParSet(), and pushDigis().

◆ fMess

CbmTrdFaspMessage* CbmTrdUnpackFaspAlgo::fMess = nullptr
private

Definition at line 226 of file CbmTrdUnpackFaspAlgo.h.

Referenced by FinalizeComponent(), pushDigis(), and unpack().

◆ fModuleId

std::vector<uint16_t> CbmTrdUnpackFaspAlgo::fModuleId = {}
private

Definition at line 223 of file CbmTrdUnpackFaspAlgo.h.

Referenced by initParSet().

◆ fMonitor

std::shared_ptr<CbmTrdUnpackFaspMonitor> CbmTrdUnpackFaspAlgo::fMonitor = nullptr
private

Potential (online) monitor for the unpacking process.

‍Buffered digi for each pad in CROB component

Definition at line 222 of file CbmTrdUnpackFaspAlgo.h.

Referenced by FinalizeComponent(), finish(), initParSet(), and SetMonitor().

◆ fTime

ULong64_t CbmTrdUnpackFaspAlgo::fTime = 0
protected

Time offset for digi wrt the TS start, expressed in 80 MHz clks. It contains:

  • relative offset of the MS wrt the TS
  • FASP epoch offset for current CROB
  • TRD2D system offset wrt to experiment time (e.g. Bmon)

Definition at line 171 of file CbmTrdUnpackFaspAlgo.h.

Referenced by pushDigis(), and unpack().


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