CbmRoot
Loading...
Searching...
No Matches
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.
 
CbmMcbm2018UnpackerAlgoTrdRoperator= (const CbmMcbm2018UnpackerAlgoTrdR &)=delete
 Copy assignment operator - not implemented.
 
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.
 
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.
 
Bool_t CreateHistogram (ECbmTrdUnpackerHistograms iHisto)
 create the histogram correlated to iHisto
 
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 SetTimeshiftsMap (std::map< size_t, std::vector< Int_t > > *setvalue)
 In the mCbm 2020 beamtime timeshifts changing during the run of the correlation time to the Bmon have been observed. This is part of their correction.
 
void SetBaselineAvg (Bool_t bFlagIn=kTRUE)
 Call this when Spadic Average-Baseline feature is enabled.
 
Bool_t SetDigiOutputPointer (std::vector< CbmTrdDigi > *const pVector)
 Set fTrdDigiVector to the address of pVector.
 
Bool_t SetRawOutputPointer (std::vector< CbmTrdRawMessageSpadic > *const pVector, std::vector< std::pair< size_t, size_t > > *const qVector=nullptr)
 Set fTrdRawMessageVector to the address of pVector.
 
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.
 
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.
 
std::vector< CbmTrdDigi > & GetVector ()
 
void ClearErrorVector ()
 
std::vector< CbmErrorMessage > & GetErrorVector ()
 
void SetIgnoreOverlapMs (Bool_t bFlagIn=kTRUE)
 Control flags.
 

Protected Member Functions

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

Protected Attributes

TList * fParCList
 Parameter management.
 
std::vector< size_t > fvMsComponentsList
 Parameters related to FLES containers.
 
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 **‍/
 
Double_t fdTsCoreSizeInNs
 Size of a single MS, [nanoseconds].
 
Double_t fdTsFullSizeInNs
 Total size of the core MS in a TS, [nanoseconds].
 
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
 Total size of the core MS in a TS, [nanoseconds].
 
std::vector< std::pair< TCanvas *, std::string > > fvpAllCanvasPointers
 Vector of pointers to histograms + optional folder name.
 
std::vector< CbmTrdDigifDigiVect
 Vector of pointers to canvases + optional folder name.
 
std::vector< CbmErrorMessagefErrVect
 
std::map< std::string, std::string > fParameterMap
 For any algo.
 

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.
 

Private Attributes

UInt_t fdMsSizeInCC
 
Bool_t fbMonitorMode
 Switch ON the filling of a minimal set of histograms.
 
Bool_t fbDebugMonitorMode
 Switch ON the filling of a additional set of histograms.
 
Bool_t fbWriteOutput
 If ON the output Vector of digis is written to disk.
 
Bool_t fbDebugWriteOutput
 If ON the raw messages output vector is filled and written to disk.
 
Bool_t fbDebugSortOutput = kTRUE
 If ON the raw messages output vector is sorted within time.
 
Bool_t fbBaselineAvg
 Set to true if Baseline Averaging is activated in Spadic.
 
Double_t fdTimeOffsetNs = 0.0
 User settings: Data correction parameters.
 
std::vector< CbmTrdDigi > * fTrdDigiVector
 Output Digi vector.
 
std::vector< CbmTrdRawMessageSpadic > * fTrdRawMessageVector
 Output Spadic raw messages for debugging.
 
std::vector< std::pair< size_t, size_t > > * fSpadicInfoMsgVector
 vector< pair< fulltime, word > >
 
std::vector< bool > fIsActiveHistoVec
 Stores all Histograms.
 
TObjArray fHistoArray
 
std::vector< size_t > fLastDigiTimeVec
 
ULong64_t fNbTimeslices
 Instance of RawToDigi class.
 
ULong64_t fCurrTsIdx
 Index of current Timeslice.
 
UInt_t fMsIndex
 Index of current MS within the TS.
 
Double_t fTsStartTime
 Time in ns of current TS from the index of the first MS first componen.
 
Double_t fTsStopTimeCore
 End Time in ns of current TS Core from the index of the first MS first componen.
 
Double_t fMsTime
 Start Time in ns of current MS from its index field in header.
 
ULong64_t fSpadicEpoch
 Epoch counter (30 bits). Counts overflow of Spadic timestamp (11 bits).
 
ULong64_t fLastFulltime
 
ULong64_t fNbSpadicRawMsg
 Counters.
 
ULong64_t fNbWildRda
 Number of RDA Words outside of a Message.
 
ULong64_t fNbSpadicErrorMsg
 Number of Spadic error Messages.
 
ULong64_t fNbUnkownWord
 Number of unknown data words in the Microslice stream.
 
ULong64_t fNbSpadicEpochMsg
 Number of Spadic Epoch Messages.
 
TList * fParContList
 Parameters and Address mapping.
 
TString fRefGeoTag
 Naming tag for the reference geometry, parameters are loaded according to this tag.
 
CbmTrdParSetAsicfAsicPar
 CbmTrdParameter container.
 
CbmTrdParSetDigifDigiPar
 CbmTrdParameter container.
 
CbmTrdParSetGasfGasPar
 CbmTrdParameter container.
 
CbmTrdParSetGainfGainPar
 CbmTrdParameter container.
 
std::map< size_t, Int_t > fSpadicMap
 Map to retrieve asic address from CriId/CrobId/ElinkId (see CbmTrdHardwareSetupR)
 
std::map< Int_t, std::vector< Int_t > > fAsicChannelMap
 Map to retrieve module channelId from asicAddress and asicChannel.
 
std::map< size_t, std::vector< Int_t > > fmapTimeshifts = {}
 Map containing the timeshift parameters for the correction of the µSlice timeshifts. The keys are the tsIdx, if no key is found, the shifts of the previous tsIdx are still valid.
 
std::vector< Int_t > * fvecTimeshiftsPar = nullptr
 Vector containing the timeshift parameters for the correction of the µSlice timeshifts for a given tsIdx.
 
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
 

Static Private Attributes

static const UInt_t kBytesPerWord = 8
 Constants.
 

Detailed Description

Timeslice unpacker algorithm for Spadic v.2.2 .

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 71 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Constructor & Destructor Documentation

◆ CbmMcbm2018UnpackerAlgoTrdR() [1/2]

CbmMcbm2018UnpackerAlgoTrdR::CbmMcbm2018UnpackerAlgoTrdR ( )

Default Constructor

Definition at line 23 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 88 of file CbmStar2019Algo.h.

◆ AddHistoToVector()

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

For monitor algos.

Definition at line 83 of file CbmStar2019Algo.h.

Referenced by CreateHistogram().

◆ 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 348 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CbmStar2019Algo< CbmTrdDigi >::fvMsComponentsList.

Referenced by CbmMcbm2018UnpackerTaskTrdR::AddMsComponentToList(), and CbmDeviceMcbmUnpack::DoUnpack().

◆ CheckParameterValidity()

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

Map of parameter name and type.

Definition at line 140 of file CbmStar2019Algo.h.

◆ ClearErrorVector()

void CbmStar2019Algo< CbmTrdDigi >::ClearErrorVector ( )
inlineinherited

Definition at line 97 of file CbmStar2019Algo.h.

◆ ClearVector()

void CbmStar2019Algo< CbmTrdDigi >::ClearVector ( )
inlineinherited

For unpacker algos.

Definition at line 95 of file CbmStar2019Algo.h.

◆ CreateHistogram()

◆ CreateHistograms()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::CreateHistograms ( )

Goes through fIsActiveHistoVec and creates the activated histograms.

Definition at line 369 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

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

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

◆ CreateRawMessage()

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

Extract Metadata

Definition at line 875 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References ExtractSample(), fdMsSizeInCC, fSpadicEpoch, GetMessageType(), 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 945 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 562 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 92 of file CbmStar2019Algo.h.

◆ GetErrorVector()

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

Definition at line 98 of file CbmStar2019Algo.h.

◆ GetHistoVector()

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

Definition at line 87 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 845 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 817 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 930 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

Referenced by ProcessMs().

◆ GetParameter()

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

Definition at line 80 of file CbmStar2019Algo.h.

◆ GetParList()

TList * CbmMcbm2018UnpackerAlgoTrdR::GetParList ( )
virtual

◆ GetRawMessageVector()

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

Definition at line 109 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fTrdRawMessageVector.

◆ GetRefGeoTag()

TString CbmMcbm2018UnpackerAlgoTrdR::GetRefGeoTag ( )
inline

Definition at line 110 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fRefGeoTag.

◆ GetVector()

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

Definition at line 96 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 237 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References CreateRawMessage(), ExtractSample(), fbDebugMonitorMode, fbDebugWriteOutput, fbMonitorMode, fHistoArray, 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 179 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

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

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

◆ ProcessTs() [2/2]

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

Implements CbmStar2019Algo< CbmTrdDigi >.

Definition at line 57 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References ProcessTs().

Referenced by ProcessTs().

◆ ReInitContainers()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ReInitContainers ( )
virtual

◆ Reset()

void CbmMcbm2018UnpackerAlgoTrdR::Reset ( )
virtual

◆ ResetHistograms()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::ResetHistograms ( )

Definition at line 721 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 129 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 736 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fTrdDigiVector.

Referenced by CbmMcbm2018UnpackerTaskTrdR::Init(), and CbmDeviceMcbmUnpack::InitContainers().

◆ SetFirstChannelsElinkEven()

void CbmMcbm2018UnpackerAlgoTrdR::SetFirstChannelsElinkEven ( bool isEven)
inline

◆ SetIgnoreOverlapMs()

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

Control flags.

Definition at line 101 of file CbmStar2019Algo.h.

◆ SetMonitorMode()

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

Definition at line 112 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 361 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 79 of file CbmStar2019Algo.h.

◆ SetRawOutputPointer()

Bool_t CbmMcbm2018UnpackerAlgoTrdR::SetRawOutputPointer ( std::vector< CbmTrdRawMessageSpadic > *const pVector,
std::vector< std::pair< size_t, size_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 747 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.

References fSpadicInfoMsgVector, and fTrdRawMessageVector.

Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().

◆ SetRefGeoTag()

void CbmMcbm2018UnpackerAlgoTrdR::SetRefGeoTag ( TString geoTag)
inline

Definition at line 146 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fRefGeoTag.

◆ SetTimeOffsetNs()

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

◆ SetTimeshiftsMap()

void CbmMcbm2018UnpackerAlgoTrdR::SetTimeshiftsMap ( std::map< size_t, std::vector< Int_t > > * setvalue)
inline

In the mCbm 2020 beamtime timeshifts changing during the run of the correlation time to the Bmon have been observed. This is part of their correction.

Definition at line 119 of file CbmMcbm2018UnpackerAlgoTrdR.h.

References fmapTimeshifts.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().

◆ SetWriteOutput()

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

Definition at line 114 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 237 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by InitParameters(), and MakeDigi().

◆ fAsicPar

CbmTrdParSetAsic* CbmMcbm2018UnpackerAlgoTrdR::fAsicPar
private

CbmTrdParameter container.

Definition at line 229 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 179 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 175 of file CbmMcbm2018UnpackerAlgoTrdR.h.

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

◆ fbDebugSortOutput

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbDebugSortOutput = kTRUE
private

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

Definition at line 178 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs(), and SetDebugSortOutput().

◆ fbDebugWriteOutput

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbDebugWriteOutput
private

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

Definition at line 177 of file CbmMcbm2018UnpackerAlgoTrdR.h.

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

◆ fbIgnoreOverlapMs

Bool_t CbmStar2019Algo< CbmTrdDigi >::fbIgnoreOverlapMs
protectedinherited

Definition at line 112 of file CbmStar2019Algo.h.

Referenced by Init(), and ProcessTs().

◆ fbMonitorMode

Bool_t CbmMcbm2018UnpackerAlgoTrdR::fbMonitorMode
private

Switch ON the filling of a minimal set of histograms.

Definition at line 174 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 176 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by SetWriteOutput().

◆ fCurrTsIdx

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fCurrTsIdx
private

Index of current Timeslice.

Definition at line 210 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs().

◆ fDigiPar

CbmTrdParSetDigi* CbmMcbm2018UnpackerAlgoTrdR::fDigiPar
private

CbmTrdParameter container.

Definition at line 230 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 134 of file CbmStar2019Algo.h.

◆ fdMsSizeInCC

UInt_t CbmMcbm2018UnpackerAlgoTrdR::fdMsSizeInCC
private

Definition at line 151 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 113 of file CbmStar2019Algo.h.

Referenced by CreateHistogram(), Init(), ProcessTs(), and SetMsSizeInNs().

◆ fdTimeOffsetNs

Double_t CbmMcbm2018UnpackerAlgoTrdR::fdTimeOffsetNs = 0.0
private

User settings: Data correction parameters.

Definition at line 182 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 114 of file CbmStar2019Algo.h.

Referenced by ProcessTs().

◆ fdTsFullSizeInNs

Double_t CbmStar2019Algo< CbmTrdDigi >::fdTsFullSizeInNs
protectedinherited

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

Definition at line 115 of file CbmStar2019Algo.h.

Referenced by FillHistograms(), and ProcessTs().

◆ fErrVect

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

Definition at line 135 of file CbmStar2019Algo.h.

◆ fGainPar

CbmTrdParSetGain* CbmMcbm2018UnpackerAlgoTrdR::fGainPar
private

CbmTrdParameter container.

Definition at line 232 of file CbmMcbm2018UnpackerAlgoTrdR.h.

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

◆ fGasPar

CbmTrdParSetGas* CbmMcbm2018UnpackerAlgoTrdR::fGasPar
private

CbmTrdParameter container.

Definition at line 231 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 196 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistograms(), FillHistograms(), 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 247 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by MakeDigi(), and SetFirstChannelsElinkEven().

◆ fLastDigiTimeVec

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

Definition at line 198 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by CreateHistogram(), and FillHistograms().

◆ fLastFulltime

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fLastFulltime
private

Definition at line 217 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by FillHistograms(), and ProcessMs().

◆ fmapTimeshifts

std::map<size_t, std::vector<Int_t> > CbmMcbm2018UnpackerAlgoTrdR::fmapTimeshifts = {}
private

Map containing the timeshift parameters for the correction of the µSlice timeshifts. The keys are the tsIdx, if no key is found, the shifts of the previous tsIdx are still valid.

Definition at line 240 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessTs(), and SetTimeshiftsMap().

◆ fMsIndex

UInt_t CbmMcbm2018UnpackerAlgoTrdR::fMsIndex
private

Index of current MS within the TS.

Definition at line 211 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 214 of file CbmMcbm2018UnpackerAlgoTrdR.h.

◆ fNbSpadicEpochMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicEpochMsg
private

Number of Spadic Epoch Messages.

Definition at line 224 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbSpadicErrorMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicErrorMsg
private

Number of Spadic error Messages.

Definition at line 222 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by Finish(), and ProcessMs().

◆ fNbSpadicRawMsg

ULong64_t CbmMcbm2018UnpackerAlgoTrdR::fNbSpadicRawMsg
private

Counters.

Number of Spadic Raw Messages.

Definition at line 220 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 209 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 223 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 221 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 138 of file CbmStar2019Algo.h.

◆ fParCList

TList* CbmStar2019Algo< CbmTrdDigi >::fParCList
protectedinherited

Parameter management.

Definition at line 105 of file CbmStar2019Algo.h.

Referenced by ~CbmMcbm2018UnpackerAlgoTrdR().

◆ fParContList

TList* CbmMcbm2018UnpackerAlgoTrdR::fParContList
private

Parameters and Address mapping.

List containing the required trd parameter containers

Definition at line 227 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 228 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 215 of file CbmMcbm2018UnpackerAlgoTrdR.h.

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

◆ fSpadicInfoMsgVector

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

vector< pair< fulltime, word > >

Definition at line 191 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs(), and SetRawOutputPointer().

◆ fSpadicMap

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

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

Definition at line 234 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by InitParameters(), and MakeDigi().

◆ fTrdDigiVector

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

Output Digi vector.

Definition at line 185 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 188 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 212 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 213 of file CbmMcbm2018UnpackerAlgoTrdR.h.

◆ fuNbCoreMsPerTs

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbCoreMsPerTs
protectedinherited

Definition at line 109 of file CbmStar2019Algo.h.

Referenced by ProcessTs(), and SetNbMsInTs().

◆ fuNbMsLoop

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbMsLoop
protectedinherited

Definition at line 111 of file CbmStar2019Algo.h.

Referenced by ProcessTs().

◆ fuNbOverMsPerTs

size_t CbmStar2019Algo< CbmTrdDigi >::fuNbOverMsPerTs
protectedinherited

Definition at line 110 of file CbmStar2019Algo.h.

Referenced by ProcessTs(), and SetNbMsInTs().

◆ fvecTimeshiftsPar

std::vector<Int_t>* CbmMcbm2018UnpackerAlgoTrdR::fvecTimeshiftsPar = nullptr
private

Vector containing the timeshift parameters for the correction of the µSlice timeshifts for a given tsIdx.

Definition at line 243 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by MakeDigi(), and ProcessTs().

◆ fvMsComponentsList

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

Parameters related to FLES containers.

Definition at line 108 of file CbmStar2019Algo.h.

Referenced by AddMsComponentToList(), and ProcessTs().

◆ fvpAllCanvasPointers

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

Vector of pointers to histograms + optional folder name.

Definition at line 131 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 129 of file CbmStar2019Algo.h.

◆ kBytesPerWord

const UInt_t CbmMcbm2018UnpackerAlgoTrdR::kBytesPerWord = 8
staticprivate

Constants.

Definition at line 250 of file CbmMcbm2018UnpackerAlgoTrdR.h.

Referenced by ProcessMs().


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