CbmRoot
CbmMcbm2018UnpackerAlgoTrdR Class Reference

Timeslice unpacker algorithm for Spadic v.2.2 . More...

#include <CbmMcbm2018UnpackerAlgoTrdR.h>

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

Public Types

enum  ECbmTrdUnpackerHistograms : Int_t {
  kBeginDefinedHistos = 0, kRawMessage_Signalshape_all = 0, kRawMessage_Signalshape_St, kRawMessage_Signalshape_Nt,
  kRawMessage_Signalshape_filtered, kRawDistributionMapModule5, kRawHitType, kRawPulserDeltaT,
  kSpadic_Info_Types, kBeginDigiHistos, kDigiPulserDeltaT = kBeginDigiHistos, kDigiDeltaT,
  kDigiMeanHitFrequency, kDigiHitFrequency, kDigiRelativeTimeMicroslice, kDigiDistributionMap,
  kDigiDistributionMapSt, kDigiDistributionMapNt, kDigiChargeSpectrum, kDigiChargeSpectrumSt,
  kDigiChargeSpectrumNt, kDigiTriggerType, kEndDefinedHistos
}
 

Public Member Functions

 CbmMcbm2018UnpackerAlgoTrdR ()
 
 ~CbmMcbm2018UnpackerAlgoTrdR ()
 
 CbmMcbm2018UnpackerAlgoTrdR (const CbmMcbm2018UnpackerAlgoTrdR &)=delete
 Copy constructor - not implemented. More...
 
CbmMcbm2018UnpackerAlgoTrdRoperator= (const CbmMcbm2018UnpackerAlgoTrdR &)=delete
 Copy assignment operator - not implemented. More...
 
virtual Bool_t Init ()
 
virtual void Reset ()
 
virtual void Finish ()
 
Bool_t InitContainers ()
 
Bool_t ReInitContainers ()
 
TList * GetParList ()
 
Bool_t InitParameters ()
 
Bool_t ProcessTs (const fles::Timeslice &ts)
 
Bool_t ProcessTs (const fles::Timeslice &ts, size_t)
 
Bool_t ProcessMs (const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
 Unpacks one Microslice. More...
 
void AddMsComponentToList (size_t component, UShort_t usDetectorId)
 
void SetNbMsInTs (size_t uCoreMsNb, size_t uOverlapMsNb)
 
void SetActiveHistograms (std::vector< bool > isActiveHistoVec)
 
Bool_t CreateHistograms ()
 Goes through fIsActiveHistoVec and creates the activated histograms. More...
 
Bool_t CreateHistogram (ECbmTrdUnpackerHistograms iHisto)
 create the histogram correlated to iHisto More...
 
Bool_t FillHistograms ()
 
Bool_t FillHistograms (CbmTrdDigi const &digi)
 
Bool_t FillHistograms (CbmTrdRawMessageSpadic const &raw)
 
Bool_t ResetHistograms ()
 
std::vector< CbmTrdRawMessageSpadicGetRawMessageVector ()
 
TString GetRefGeoTag ()
 
void SetMonitorMode (Bool_t bFlagIn=kTRUE)
 
void SetDebugMonitorMode (Bool_t bFlagIn=kTRUE)
 
void SetWriteOutput (Bool_t bFlagIn=kTRUE)
 
void SetDebugWriteOutput (Bool_t bFlagIn=kTRUE)
 
void SetDebugSortOutput (Bool_t bFlagIn=kTRUE)
 
void SetTimeOffsetNs (Double_t dOffsetIn=0.0)
 
void SetBaselineAvg (Bool_t bFlagIn=kTRUE)
 Call this when Spadic Average-Baseline feature is enabled. More...
 
Bool_t SetDigiOutputPointer (std::vector< CbmTrdDigi > *const pVector)
 Set fTrdDigiVector to the address of pVector. More...
 
Bool_t SetRawOutputPointer (std::vector< CbmTrdRawMessageSpadic > *const pVector, std::vector< std::pair< std::uint64_t, std::uint64_t >> *const qVector=nullptr)
 Set fTrdRawMessageVector to the address of pVector. More...
 
void SetRefGeoTag (TString geoTag)
 
void SetFirstChannelsElinkEven (bool isEven)
 
void SetMsSizeInNs (Double_t msSizeInNs)
 
virtual void SetParameter (std::string)
 
virtual std::string GetParameter (std::string)
 
void AddHistoToVector (TNamed *pointer, std::string sFolder="")
 For monitor algos. More...
 
std::vector< std::pair< TNamed *, std::string > > GetHistoVector ()
 
void AddCanvasToVector (TCanvas *pointer, std::string sFolder="")
 
std::vector< std::pair< TCanvas *, std::string > > GetCanvasVector ()
 
void ClearVector ()
 For unpacker algos. More...
 
std::vector< CbmTrdDigi > & GetVector ()
 
void ClearErrorVector ()
 
std::vector< CbmErrorMessage > & GetErrorVector ()
 
void SetIgnoreOverlapMs (Bool_t bFlagIn=kTRUE)
 Control flags. More...
 

Protected Member Functions

Bool_t CheckParameterValidity (std::string, std::string)
 Map of parameter name and type. More...
 

Protected Attributes

TList * fParCList
 Parameter management. More...
 
std::vector< size_t > fvMsComponentsList
 Parameters related to FLES containers. More...
 
size_t fuNbCoreMsPerTs
 
size_t fuNbOverMsPerTs
 
size_t fuNbMsLoop
 
Bool_t fbIgnoreOverlapMs
 
Double_t fdMsSizeInNs
 /‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/ More...
 
Double_t fdTsCoreSizeInNs
 Size of a single MS, [nanoseconds]. More...
 
Double_t fdTsFullSizeInNs
 Total size of the core MS in a TS, [nanoseconds]. More...
 
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
 Total size of the core MS in a TS, [nanoseconds]. More...
 
std::vector< std::pair< TCanvas *, std::string > > fvpAllCanvasPointers
 Vector of pointers to histograms + optional folder name. More...
 
std::vector< CbmTrdDigifDigiVect
 Vector of pointers to canvases + optional folder name. More...
 
std::vector< CbmErrorMessagefErrVect
 
std::map< std::string, std::string > fParameterMap
 For any algo. More...
 

Private Member Functions

std::shared_ptr< CbmTrdDigiMakeDigi (CbmTrdRawMessageSpadic raw)
 
Spadic::MsMessageType GetMessageType (const uint64_t msg)
 
Spadic::MsInfoType GetInfoType (const uint64_t msg)
 
CbmTrdRawMessageSpadic CreateRawMessage (const uint64_t word, fles::MicrosliceDescriptor msDesc)
 
Int_t GetNumRda (Int_t nsamples)
 
int16_t ExtractSample (const uint64_t word, uint8_t sample, Bool_t multihit=kFALSE)
 Extract a Sample from a given SOM or RDA word. More...
 

Private Attributes

UInt_t fdMsSizeInCC
 
Bool_t fbMonitorMode
 Switch ON the filling of a minimal set of histograms. More...
 
Bool_t fbDebugMonitorMode
 Switch ON the filling of a additional set of histograms. More...
 
Bool_t fbWriteOutput
 If ON the output Vector of digis is written to disk. More...
 
Bool_t fbDebugWriteOutput
 If ON the raw messages output vector is filled and written to disk. More...
 
Bool_t fbDebugSortOutput
 If ON the raw messages output vector is sorted within time. More...
 
Bool_t fbBaselineAvg
 Set to true if Baseline Averaging is activated in Spadic. More...
 
Double_t fdTimeOffsetNs = 0.0
 User settings: Data correction parameters. More...
 
std::vector< CbmTrdDigi > * fTrdDigiVector
 Output Digi vector. More...
 
std::vector< CbmTrdRawMessageSpadic > * fTrdRawMessageVector
 Output Spadic raw messages for debugging. More...
 
std::vector< std::pair< std::uint64_t, std::uint64_t > > * fSpadicInfoMsgVector
 vector< pair< fulltime, word > > More...
 
std::vector< bool > fIsActiveHistoVec
 Stores all Histograms. More...
 
TObjArray fHistoArray
 
std::vector< std::uint64_t > fLastDigiTimeVec
 
ULong64_t fNbTimeslices
 Instance of RawToDigi class. More...
 
ULong64_t fCurrTsIdx
 Index of current Timeslice. More...
 
UInt_t fMsIndex
 Index of current MS within the TS. More...
 
Double_t fTsStartTime
 Time in ns of current TS from the index of the first MS first componen. More...
 
Double_t fTsStopTimeCore
 End Time in ns of current TS Core from the index of the first MS first componen. More...
 
Double_t fMsTime
 Start Time in ns of current MS from its index field in header. More...
 
ULong64_t fSpadicEpoch
 Epoch counter (30 bits). Counts overflow of Spadic timestamp (11 bits). More...
 
ULong64_t fLastFulltime
 
ULong64_t fNbSpadicRawMsg
 Counters. More...
 
ULong64_t fNbWildRda
 Number of RDA Words outside of a Message. More...
 
ULong64_t fNbSpadicErrorMsg
 Number of Spadic error Messages. More...
 
ULong64_t fNbUnkownWord
 Number of unknown data words in the Microslice stream. More...
 
ULong64_t fNbSpadicEpochMsg
 Number of Spadic Epoch Messages. More...
 
TList * fParContList
 Parameters and Address mapping. More...
 
TString fRefGeoTag
 Naming tag for the reference geometry, parameters are loaded according to this tag. More...
 
CbmTrdParSetAsicfAsicPar
 CbmTrdParameter container. More...
 
CbmTrdParSetDigifDigiPar
 CbmTrdParameter container. More...
 
CbmTrdParSetGasfGasPar
 CbmTrdParameter container. More...
 
CbmTrdParSetGainfGainPar
 CbmTrdParameter container. More...
 
std::map< std::uint64_t, Int_t > fSpadicMap
 Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR) More...
 
std::map< Int_t, std::vector< Int_t > > fAsicChannelMap
 Map to retrieve module channelId from asicAddress and asicChannel. More...
 
bool fIsFirstChannelsElinkEven
 define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId, default for mCbm2020 is false thus, initialized as false More...
 

Static Private Attributes

static const UInt_t kBytesPerWord = 8
 Constants. More...
 

Detailed Description

Timeslice unpacker algorithm for Spadic v.2.2 .

TODO: include the relevant functions of CbmTrdRawToDigiR into the unpacker-algo. as first step one can copy CbmTrdRawToDigiR.h and CbmTrdRawToDigiR.cxx to the same folder as this file.

Definition at line 34 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Member Enumeration Documentation

◆ ECbmTrdUnpackerHistograms

Enumerator
kBeginDefinedHistos 
kRawMessage_Signalshape_all 
kRawMessage_Signalshape_St 
kRawMessage_Signalshape_Nt 
kRawMessage_Signalshape_filtered 
kRawDistributionMapModule5 
kRawHitType 
kRawPulserDeltaT 
kSpadic_Info_Types 
kBeginDigiHistos 
kDigiPulserDeltaT 
kDigiDeltaT 
kDigiMeanHitFrequency 
kDigiHitFrequency 
kDigiRelativeTimeMicroslice 
kDigiDistributionMap 
kDigiDistributionMapSt 
kDigiDistributionMapNt 
kDigiChargeSpectrum 
kDigiChargeSpectrumSt 
kDigiChargeSpectrumNt 
kDigiTriggerType 
kEndDefinedHistos 

Definition at line 74 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Constructor & Destructor Documentation

◆ CbmMcbm2018UnpackerAlgoTrdR() [1/2]

CbmMcbm2018UnpackerAlgoTrdR::CbmMcbm2018UnpackerAlgoTrdR ( )

Default Constructor

Definition at line 18 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

◆ ~CbmMcbm2018UnpackerAlgoTrdR()

CbmMcbm2018UnpackerAlgoTrdR::~CbmMcbm2018UnpackerAlgoTrdR ( )

◆ CbmMcbm2018UnpackerAlgoTrdR() [2/2]

CbmMcbm2018UnpackerAlgoTrdR::CbmMcbm2018UnpackerAlgoTrdR ( const CbmMcbm2018UnpackerAlgoTrdR )
delete

Copy constructor - not implemented.

Member Function Documentation

◆ AddCanvasToVector()

void CbmStar2019Algo< CbmTrdDigi >::AddCanvasToVector ( TCanvas *  pointer,
std::string  sFolder = "" 
)
inlineinherited

Definition at line 87 of file CbmStar2019Algo.h.

◆ AddHistoToVector()

void CbmStar2019Algo< CbmTrdDigi >::AddHistoToVector ( TNamed *  pointer,
std::string  sFolder = "" 
)
inlineinherited

For monitor algos.

Definition at line 80 of file CbmStar2019Algo.h.

◆ AddMsComponentToList()

void CbmMcbm2018UnpackerAlgoTrdR::AddMsComponentToList ( size_t  component,
UShort_t  usDetectorId 
)

Check for duplicates and ignore if it is the case.

Add to list

Definition at line 366 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CbmStar2019Algo< CbmTrdDigi >::fvMsComponentsList.

Referenced by CbmMcbm2018UnpackerTaskTrdR::AddMsComponentToList().

◆ CheckParameterValidity()

Bool_t CbmStar2019Algo< CbmTrdDigi >::CheckParameterValidity ( std::string  ,
std::string   
)
inlineprotectedinherited

Map of parameter name and type.

Definition at line 147 of file CbmStar2019Algo.h.

◆ ClearErrorVector()

void CbmStar2019Algo< CbmTrdDigi >::ClearErrorVector
inlineinherited

Definition at line 98 of file CbmStar2019Algo.h.

◆ ClearVector()

void CbmStar2019Algo< CbmTrdDigi >::ClearVector
inlineinherited

For unpacker algos.

Definition at line 96 of file CbmStar2019Algo.h.

◆ CreateHistogram()

◆ CreateHistograms()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::CreateHistograms ( )

Goes through fIsActiveHistoVec and creates the activated histograms.

Definition at line 388 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CreateHistogram(), fbDebugMonitorMode, fbMonitorMode, fHistoArray, and fIsActiveHistoVec.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

◆ CreateRawMessage()

CbmTrdRawMessageSpadic CbmMcbm2018UnpackerAlgoTrdR::CreateRawMessage ( const uint64_t  word,
fles::MicrosliceDescriptor  msDesc 
)
private

Extract Metadata

Definition at line 963 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References ExtractSample(), fdMsSizeInCC, fSpadicEpoch, GetMessageType(), i, and Spadic::kSOM.

Referenced by ProcessMs().

◆ ExtractSample()

int16_t CbmMcbm2018UnpackerAlgoTrdR::ExtractSample ( const uint64_t  word,
uint8_t  sample,
Bool_t  multihit = kFALSE 
)
private

Extract a Sample from a given SOM or RDA word.

Parameters
wordthe 64bit Message Word
sampleWhich sample to extract [0,31]
multihitSet to true if current word belongs to a multihit message.
Returns
The ADC value of the given sample, range [-255,255]. -256 if an error occurred.

When the average baseline feature of the spadic22 is activated, the value of samples[0] is always lower than -128, so we know it is 10----— Because of this it is possible to increase the precision by two bits, by cutting the two MSBs off and shifting everything two bits to the left. Here we need to undo this operation by shifting two bits righ and setting the MSB to 1 (negative sign) and the second msb to 0 (value < -128 ).

Definition at line 1044 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fbBaselineAvg, GetMessageType(), Spadic::kRDA, Spadic::kSOM, and x.

Referenced by CreateRawMessage(), and ProcessMs().

◆ FillHistograms() [1/3]

Bool_t CbmMcbm2018UnpackerAlgoTrdR::FillHistograms ( )

Definition at line 625 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

Referenced by ProcessMs().

◆ FillHistograms() [2/3]

◆ FillHistograms() [3/3]

◆ Finish()

void CbmMcbm2018UnpackerAlgoTrdR::Finish ( )
virtual

◆ GetCanvasVector()

std::vector<std::pair<TCanvas*, std::string> > CbmStar2019Algo< CbmTrdDigi >::GetCanvasVector
inlineinherited

Definition at line 91 of file CbmStar2019Algo.h.

◆ GetErrorVector()

std::vector<CbmErrorMessage>& CbmStar2019Algo< CbmTrdDigi >::GetErrorVector
inlineinherited

Definition at line 99 of file CbmStar2019Algo.h.

◆ GetHistoVector()

std::vector<std::pair<TNamed*, std::string> > CbmStar2019Algo< CbmTrdDigi >::GetHistoVector
inlineinherited

Definition at line 84 of file CbmStar2019Algo.h.

◆ GetInfoType()

Spadic::MsInfoType CbmMcbm2018UnpackerAlgoTrdR::GetInfoType ( const uint64_t  msg)
private

Identifies the InfoType of a 64bit InfoMessage word inside a Microslice

Definition at line 935 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References Spadic::kBOM, Spadic::kBUF, Spadic::kMIS, Spadic::kMSB, and Spadic::kUNU.

Referenced by ProcessMs().

◆ GetMessageType()

Spadic::MsMessageType CbmMcbm2018UnpackerAlgoTrdR::GetMessageType ( const uint64_t  msg)
private

Identifies the message type of a 64bit word inside a Microslice

Definition at line 912 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References Spadic::kEPO, Spadic::kINF, Spadic::kNUL, Spadic::kRDA, Spadic::kSOM, and Spadic::kUNK.

Referenced by CreateRawMessage(), ExtractSample(), and ProcessMs().

◆ GetNumRda()

Int_t CbmMcbm2018UnpackerAlgoTrdR::GetNumRda ( Int_t  nsamples)
private

Helper function that returns how many rda words follow the som word, based on the number of samples in the msg.

Definition at line 1029 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

Referenced by ProcessMs().

◆ GetParameter()

virtual std::string CbmStar2019Algo< CbmTrdDigi >::GetParameter ( std::string  )
inlinevirtualinherited

Definition at line 75 of file CbmStar2019Algo.h.

◆ GetParList()

TList * CbmMcbm2018UnpackerAlgoTrdR::GetParList ( )
virtual

◆ GetRawMessageVector()

std::vector<CbmTrdRawMessageSpadic> CbmMcbm2018UnpackerAlgoTrdR::GetRawMessageVector ( )
inline

Definition at line 116 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fTrdRawMessageVector.

◆ GetRefGeoTag()

TString CbmMcbm2018UnpackerAlgoTrdR::GetRefGeoTag ( )
inline

Definition at line 119 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fRefGeoTag.

◆ GetVector()

std::vector<CbmTrdDigi >& CbmStar2019Algo< CbmTrdDigi >::GetVector
inlineinherited

Definition at line 97 of file CbmStar2019Algo.h.

◆ Init()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::Init ( )
virtual

◆ InitContainers()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::InitContainers ( )
virtual

◆ InitParameters()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::InitParameters ( )

◆ MakeDigi()

◆ operator=()

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

Copy assignment operator - not implemented.

◆ ProcessMs()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ProcessMs ( const fles::Timeslice &  ts,
size_t  uMsCompIdx,
size_t  uMsIdx 
)
virtual

Unpacks one Microslice.

Parameters
tsTimeslice that contains the Microslice
uMsCompIdxComponent ID. The contributing input channel.
uMsIdxIndex of the Microslice inside the Timeslice
Returns
kTRUE if successfull. kFALSE if errors occur.

< Content size. This is the size (in bytes) of the microslice data content.

< Number of complete Words in the input MS buffer.

< Spadic Messages are 64bit Words.

Loop over all 64bit-Words in the current Microslice

If the new Message has more than 3 Samples, we need to read in the next words that contain the remaining samples.

Loop over the rda words

Loop over Samples. There are max 7 samples per word.

Message should now be complete. TODO: Generate Digi and save raw message if needed.

Save raw message:

Fill histograms:

Save info message if needed.

Implements CbmStar2019Algo< CbmTrdDigi >.

Definition at line 238 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CreateRawMessage(), ExtractSample(), fbDebugMonitorMode, fbDebugWriteOutput, fbMonitorMode, fHistoArray, PairAnalysisStyler::Fill, FillHistograms(), fIsActiveHistoVec, fLastFulltime, fNbSpadicEpochMsg, fNbSpadicErrorMsg, fNbSpadicRawMsg, fNbUnkownWord, fNbWildRda, fSpadicEpoch, fSpadicInfoMsgVector, fTrdDigiVector, fTrdRawMessageVector, GetInfoType(), GetMessageType(), CbmTrdRawMessageSpadic::GetNrSamples(), GetNumRda(), kBytesPerWord, Spadic::kEPO, Spadic::kINF, Spadic::kNUL, Spadic::kRDA, Spadic::kSOM, kSpadic_Info_Types, Spadic::kUNK, MakeDigi(), and CbmTrdRawMessageSpadic::SetSample().

Referenced by ProcessTs().

◆ ProcessTs() [1/2]

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ProcessTs ( const fles::Timeslice &  ts)
virtual

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

Ignore overlap ms if flag set by user

Loop over core microslices (and overlap ones if chosen)

Loop over registered components

Sort the output vector according to the time => this assumes all digis before failure were OK. If not we should instead clear it!

Sort the output vector according to the time.

Implements CbmStar2019Algo< CbmTrdDigi >.

Definition at line 174 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fbDebugSortOutput, fbDebugWriteOutput, CbmStar2019Algo< CbmTrdDigi >::fbIgnoreOverlapMs, fCurrTsIdx, CbmStar2019Algo< CbmTrdDigi >::fdMsSizeInNs, CbmStar2019Algo< CbmTrdDigi >::fdTsCoreSizeInNs, CbmStar2019Algo< CbmTrdDigi >::fdTsFullSizeInNs, fNbTimeslices, fTrdDigiVector, fTrdRawMessageVector, fTsStartTime, CbmStar2019Algo< CbmTrdDigi >::fuNbCoreMsPerTs, CbmStar2019Algo< CbmTrdDigi >::fuNbMsLoop, CbmStar2019Algo< CbmTrdDigi >::fuNbOverMsPerTs, CbmStar2019Algo< CbmTrdDigi >::fvMsComponentsList, and ProcessMs().

Referenced by CbmMcbm2018UnpackerTaskTrdR::DoUnpack(), and ProcessTs().

◆ ProcessTs() [2/2]

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ProcessTs ( const fles::Timeslice &  ts,
size_t   
)
inlinevirtual

Implements CbmStar2019Algo< CbmTrdDigi >.

Definition at line 58 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References ProcessTs().

◆ ReInitContainers()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ReInitContainers ( )
virtual

◆ Reset()

void CbmMcbm2018UnpackerAlgoTrdR::Reset ( )
virtual

◆ ResetHistograms()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ResetHistograms ( )

Definition at line 815 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fHistoArray.

◆ SetActiveHistograms()

void CbmMcbm2018UnpackerAlgoTrdR::SetActiveHistograms ( std::vector< bool >  isActiveHistoVec)
inline

◆ SetBaselineAvg()

void CbmMcbm2018UnpackerAlgoTrdR::SetBaselineAvg ( Bool_t  bFlagIn = kTRUE)
inline

Call this when Spadic Average-Baseline feature is enabled.

Definition at line 139 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fbBaselineAvg.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

◆ SetDebugMonitorMode()

void CbmMcbm2018UnpackerAlgoTrdR::SetDebugMonitorMode ( Bool_t  bFlagIn = kTRUE)
inline

◆ SetDebugSortOutput()

void CbmMcbm2018UnpackerAlgoTrdR::SetDebugSortOutput ( Bool_t  bFlagIn = kTRUE)
inline

◆ SetDebugWriteOutput()

void CbmMcbm2018UnpackerAlgoTrdR::SetDebugWriteOutput ( Bool_t  bFlagIn = kTRUE)
inline

◆ SetDigiOutputPointer()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::SetDigiOutputPointer ( std::vector< CbmTrdDigi > *const  pVector)

Set fTrdDigiVector to the address of pVector.

Parameters
pVectorPointer to the Digi output vector of the Unpacker task.
Returns
kTRUE if fTrdDigiVector was nullptr before. kFALSE else.

Definition at line 829 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fTrdDigiVector.

Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().

◆ SetFirstChannelsElinkEven()

void CbmMcbm2018UnpackerAlgoTrdR::SetFirstChannelsElinkEven ( bool  isEven)
inline

◆ SetIgnoreOverlapMs()

void CbmStar2019Algo< CbmTrdDigi >::SetIgnoreOverlapMs ( Bool_t  bFlagIn = kTRUE)
inlineinherited

Control flags.

Definition at line 102 of file CbmStar2019Algo.h.

◆ SetMonitorMode()

void CbmMcbm2018UnpackerAlgoTrdR::SetMonitorMode ( Bool_t  bFlagIn = kTRUE)
inline

Definition at line 121 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fbMonitorMode.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

◆ SetMsSizeInNs()

void CbmMcbm2018UnpackerAlgoTrdR::SetMsSizeInNs ( Double_t  msSizeInNs)
inline

◆ SetNbMsInTs()

void CbmMcbm2018UnpackerAlgoTrdR::SetNbMsInTs ( size_t  uCoreMsNb,
size_t  uOverlapMsNb 
)

Set Number of Core Microslices per Timeslice

Set Number of Overlap Microslices per Timeslice

Definition at line 380 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CbmStar2019Algo< CbmTrdDigi >::fuNbCoreMsPerTs, and CbmStar2019Algo< CbmTrdDigi >::fuNbOverMsPerTs.

Referenced by CbmMcbm2018UnpackerTaskTrdR::SetNbMsInTs().

◆ SetParameter()

virtual void CbmStar2019Algo< CbmTrdDigi >::SetParameter ( std::string  )
inlinevirtualinherited

Definition at line 74 of file CbmStar2019Algo.h.

◆ SetRawOutputPointer()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::SetRawOutputPointer ( std::vector< CbmTrdRawMessageSpadic > *const  pVector,
std::vector< std::pair< std::uint64_t, std::uint64_t >> *const  qVector = nullptr 
)

Set fTrdRawMessageVector to the address of pVector.

Parameters
pVectorPointer to the RawMessage output vector of the Unpacker task.
Returns
kTRUE if fTrdRawMessageVector was nullptr before. kFALSE else.

Definition at line 839 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fSpadicInfoMsgVector, and fTrdRawMessageVector.

Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().

◆ SetRefGeoTag()

void CbmMcbm2018UnpackerAlgoTrdR::SetRefGeoTag ( TString  geoTag)
inline

Definition at line 158 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fRefGeoTag.

◆ SetTimeOffsetNs()

void CbmMcbm2018UnpackerAlgoTrdR::SetTimeOffsetNs ( Double_t  dOffsetIn = 0.0)
inline

◆ SetWriteOutput()

void CbmMcbm2018UnpackerAlgoTrdR::SetWriteOutput ( Bool_t  bFlagIn = kTRUE)
inline

Definition at line 125 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fbWriteOutput.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

Member Data Documentation

◆ fAsicChannelMap

std::map<Int_t, std::vector<Int_t> > CbmMcbm2018UnpackerAlgoTrdR::fAsicChannelMap
private

Map to retrieve module channelId from asicAddress and asicChannel.

Definition at line 267 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by InitParameters(), and MakeDigi().

◆ fAsicPar

CbmTrdParSetAsic* CbmMcbm2018UnpackerAlgoTrdR::fAsicPar
private

CbmTrdParameter container.

Definition at line 260 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fbBaselineAvg

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbBaselineAvg
private

Set to true if Baseline Averaging is activated in Spadic.

Definition at line 203 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ExtractSample(), and SetBaselineAvg().

◆ fbDebugMonitorMode

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbDebugMonitorMode
private

Switch ON the filling of a additional set of histograms.

Definition at line 195 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistograms(), ProcessMs(), and SetDebugMonitorMode().

◆ fbDebugSortOutput

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbDebugSortOutput
private
Initial value:
=
kTRUE

If ON the raw messages output vector is sorted within time.

Definition at line 200 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs().

◆ fbDebugWriteOutput

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbDebugWriteOutput
private

If ON the raw messages output vector is filled and written to disk.

Definition at line 199 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs(), ProcessTs(), SetDebugSortOutput(), and SetDebugWriteOutput().

◆ fbIgnoreOverlapMs

Bool_t CbmStar2019Algo< CbmTrdDigi >::fbIgnoreOverlapMs
protectedinherited

Definition at line 116 of file CbmStar2019Algo.h.

◆ fbMonitorMode

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbMonitorMode
private

Switch ON the filling of a minimal set of histograms.

Definition at line 193 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistograms(), ProcessMs(), and SetMonitorMode().

◆ fbWriteOutput

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbWriteOutput
private

If ON the output Vector of digis is written to disk.

Definition at line 197 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by SetWriteOutput().

◆ fCurrTsIdx

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fCurrTsIdx
private

Index of current Timeslice.

Definition at line 234 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs().

◆ fDigiPar

CbmTrdParSetDigi* CbmMcbm2018UnpackerAlgoTrdR::fDigiPar
private

CbmTrdParameter container.

Definition at line 261 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistogram(), FillHistograms(), GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fDigiVect

std::vector<CbmTrdDigi > CbmStar2019Algo< CbmTrdDigi >::fDigiVect
protectedinherited

Vector of pointers to canvases + optional folder name.

For unpacker algos

Definition at line 140 of file CbmStar2019Algo.h.

◆ fdMsSizeInCC

UInt_t CbmMcbm2018UnpackerAlgoTrdR::fdMsSizeInCC
private

Definition at line 167 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateRawMessage(), FillHistograms(), and Init().

◆ fdMsSizeInNs

Double_t CbmStar2019Algo< CbmTrdDigi >::fdMsSizeInNs
protectedinherited

/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/

Definition at line 117 of file CbmStar2019Algo.h.

◆ fdTimeOffsetNs

Double_t CbmMcbm2018UnpackerAlgoTrdR::fdTimeOffsetNs = 0.0
private

User settings: Data correction parameters.

Definition at line 206 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by MakeDigi(), and SetTimeOffsetNs().

◆ fdTsCoreSizeInNs

Double_t CbmStar2019Algo< CbmTrdDigi >::fdTsCoreSizeInNs
protectedinherited

Size of a single MS, [nanoseconds].

Definition at line 119 of file CbmStar2019Algo.h.

◆ fdTsFullSizeInNs

Double_t CbmStar2019Algo< CbmTrdDigi >::fdTsFullSizeInNs
protectedinherited

Total size of the core MS in a TS, [nanoseconds].

Definition at line 121 of file CbmStar2019Algo.h.

◆ fErrVect

std::vector<CbmErrorMessage> CbmStar2019Algo< CbmTrdDigi >::fErrVect
protectedinherited

Definition at line 141 of file CbmStar2019Algo.h.

◆ fGainPar

CbmTrdParSetGain* CbmMcbm2018UnpackerAlgoTrdR::fGainPar
private

CbmTrdParameter container.

Definition at line 263 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fGasPar

CbmTrdParSetGas* CbmMcbm2018UnpackerAlgoTrdR::fGasPar
private

CbmTrdParameter container.

Definition at line 262 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fHistoArray

TObjArray CbmMcbm2018UnpackerAlgoTrdR::fHistoArray
private

◆ fIsActiveHistoVec

std::vector<bool> CbmMcbm2018UnpackerAlgoTrdR::fIsActiveHistoVec
private

Stores all Histograms.

Definition at line 220 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistograms(), FillHistograms(), ProcessMs(), and SetActiveHistograms().

◆ fIsFirstChannelsElinkEven

bool CbmMcbm2018UnpackerAlgoTrdR::fIsFirstChannelsElinkEven
private

define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId, default for mCbm2020 is false thus, initialized as false

Definition at line 269 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by MakeDigi(), and SetFirstChannelsElinkEven().

◆ fLastDigiTimeVec

std::vector<std::uint64_t> CbmMcbm2018UnpackerAlgoTrdR::fLastDigiTimeVec
private

Definition at line 222 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistogram(), and FillHistograms().

◆ fLastFulltime

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fLastFulltime
private

Definition at line 245 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by FillHistograms(), and ProcessMs().

◆ fMsIndex

UInt_t CbmMcbm2018UnpackerAlgoTrdR::fMsIndex
private

Index of current MS within the TS.

Definition at line 235 of file CbmMcbm2018UnpackerAlgoTrdR.h.

◆ fMsTime

Double_t CbmMcbm2018UnpackerAlgoTrdR::fMsTime
private

Start Time in ns of current MS from its index field in header.

Definition at line 241 of file CbmMcbm2018UnpackerAlgoTrdR.h.

◆ fNbSpadicEpochMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicEpochMsg
private

Number of Spadic Epoch Messages.

Definition at line 253 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbSpadicErrorMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicErrorMsg
private

Number of Spadic error Messages.

Definition at line 250 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbSpadicRawMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicRawMsg
private

Counters.

Number of Spadic Raw Messages.

Definition at line 248 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbTimeslices

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbTimeslices
private

Instance of RawToDigi class.

This class provides conversion from raw spadic data to CbmTrdDigis via CbmTrdDigi* MakeDigi(std::vector<Int_t> samples, Int_t channel,Int_t module,Int_t layer,ULong64_t time); Running Indices Counts overall number of Timeslices

Definition at line 233 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by FillHistograms(), Finish(), and ProcessTs().

◆ fNbUnkownWord

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbUnkownWord
private

Number of unknown data words in the Microslice stream.

Definition at line 252 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbWildRda

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbWildRda
private

Number of RDA Words outside of a Message.

Definition at line 249 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fParameterMap

std::map<std::string, std::string> CbmStar2019Algo< CbmTrdDigi >::fParameterMap
protectedinherited

For any algo.

Definition at line 145 of file CbmStar2019Algo.h.

◆ fParCList

TList* CbmStar2019Algo< CbmTrdDigi >::fParCList
protectedinherited

Parameter management.

Definition at line 108 of file CbmStar2019Algo.h.

◆ fParContList

TList* CbmMcbm2018UnpackerAlgoTrdR::fParContList
private

Parameters and Address mapping.

List containing the required trd parameter containers

Definition at line 257 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fRefGeoTag

TString CbmMcbm2018UnpackerAlgoTrdR::fRefGeoTag
private

Naming tag for the reference geometry, parameters are loaded according to this tag.

Definition at line 259 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetRefGeoTag(), and SetRefGeoTag().

◆ fSpadicEpoch

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fSpadicEpoch
private

Epoch counter (30 bits). Counts overflow of Spadic timestamp (11 bits).

Definition at line 243 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateRawMessage(), FillHistograms(), and ProcessMs().

◆ fSpadicInfoMsgVector

std::vector<std::pair<std::uint64_t, std::uint64_t> >* CbmMcbm2018UnpackerAlgoTrdR::fSpadicInfoMsgVector
private

vector< pair< fulltime, word > >

Definition at line 215 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs(), and SetRawOutputPointer().

◆ fSpadicMap

std::map<std::uint64_t, Int_t> CbmMcbm2018UnpackerAlgoTrdR::fSpadicMap
private

Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)

Definition at line 265 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by InitParameters(), and MakeDigi().

◆ fTrdDigiVector

std::vector<CbmTrdDigi>* CbmMcbm2018UnpackerAlgoTrdR::fTrdDigiVector
private

Output Digi vector.

Definition at line 209 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs(), ProcessTs(), Reset(), and SetDigiOutputPointer().

◆ fTrdRawMessageVector

std::vector<CbmTrdRawMessageSpadic>* CbmMcbm2018UnpackerAlgoTrdR::fTrdRawMessageVector
private

Output Spadic raw messages for debugging.

Definition at line 212 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by GetRawMessageVector(), ProcessMs(), ProcessTs(), Reset(), SetRawOutputPointer(), and ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fTsStartTime

Double_t CbmMcbm2018UnpackerAlgoTrdR::fTsStartTime
private

Time in ns of current TS from the index of the first MS first componen.

Definition at line 237 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs().

◆ fTsStopTimeCore

Double_t CbmMcbm2018UnpackerAlgoTrdR::fTsStopTimeCore
private

End Time in ns of current TS Core from the index of the first MS first componen.

Definition at line 239 of file CbmMcbm2018UnpackerAlgoTrdR.h.

◆ fuNbCoreMsPerTs

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbCoreMsPerTs
protectedinherited

Definition at line 112 of file CbmStar2019Algo.h.

◆ fuNbMsLoop

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbMsLoop
protectedinherited

Definition at line 114 of file CbmStar2019Algo.h.

◆ fuNbOverMsPerTs

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbOverMsPerTs
protectedinherited

Definition at line 113 of file CbmStar2019Algo.h.

◆ fvMsComponentsList

std::vector<size_t> CbmStar2019Algo< CbmTrdDigi >::fvMsComponentsList
protectedinherited

Parameters related to FLES containers.

Definition at line 111 of file CbmStar2019Algo.h.

◆ fvpAllCanvasPointers

std::vector<std::pair<TCanvas*, std::string> > CbmStar2019Algo< CbmTrdDigi >::fvpAllCanvasPointers
protectedinherited

Vector of pointers to histograms + optional folder name.

Definition at line 137 of file CbmStar2019Algo.h.

◆ fvpAllHistoPointers

std::vector<std::pair<TNamed*, std::string> > CbmStar2019Algo< CbmTrdDigi >::fvpAllHistoPointers
protectedinherited

Total size of the core MS in a TS, [nanoseconds].

For monitor algos => Pointers should be filled with TH1*, TH2*, TProfile*, ... ==> To check if object N is of type T, use "T ObjectPointer = dynamic_cast<T>( fvpAllHistoPointers[N].first );" and check for nullptr ==> To get back the original class name use "fvpAllHistoPointers[N].first->ClassName()" which returns a const char * (e.g. "TH1I") ===> Usage example with feeding a THttpServer: ===> #include "TH2.h" ===> std::string sClassName = vHistos[ uHisto ].first.ClassName(); ===> if( !strncmp( sClassName, "TH1", 3 ) ) ===> server->Register( vHistos[ uHisto ].second.data(), dynamic_cast< TH1 * >(vHistos[ uHisto ].first) ); ===> else if( !strncmp( sClassName, "TH2", 3 ) ) ===> server->Register( vHistos[ uHisto ].second.data(), dynamic_cast< TH2 * >(vHistos[ uHisto ].first) );

Definition at line 135 of file CbmStar2019Algo.h.

◆ kBytesPerWord

const UInt_t CbmMcbm2018UnpackerAlgoTrdR::kBytesPerWord = 8
staticprivate

Constants.

Definition at line 272 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs().


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