CbmRoot
|
Timeslice unpacker algorithm for Spadic v.2.2 . More...
#include <CbmMcbm2018UnpackerAlgoTrdR.h>
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. | |
CbmMcbm2018UnpackerAlgoTrdR & | operator= (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< CbmTrdRawMessageSpadic > | GetRawMessageVector () |
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< CbmTrdDigi > | fDigiVect |
Vector of pointers to canvases + optional folder name. | |
std::vector< CbmErrorMessage > | fErrVect |
std::map< std::string, std::string > | fParameterMap |
For any algo. | |
Private Member Functions | |
std::shared_ptr< CbmTrdDigi > | MakeDigi (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. | |
CbmTrdParSetAsic * | fAsicPar |
CbmTrdParameter container. | |
CbmTrdParSetDigi * | fDigiPar |
CbmTrdParameter container. | |
CbmTrdParSetGas * | fGasPar |
CbmTrdParameter container. | |
CbmTrdParSetGain * | fGainPar |
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. | |
Timeslice unpacker algorithm for Spadic v.2.2 .
Definition at line 34 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Definition at line 71 of file CbmMcbm2018UnpackerAlgoTrdR.h.
CbmMcbm2018UnpackerAlgoTrdR::CbmMcbm2018UnpackerAlgoTrdR | ( | ) |
Default Constructor
Definition at line 23 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
CbmMcbm2018UnpackerAlgoTrdR::~CbmMcbm2018UnpackerAlgoTrdR | ( | ) |
Default Destructor
Definition at line 64 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fAsicPar, fDigiPar, fGainPar, fGasPar, CbmStar2019Algo< CbmTrdDigi >::fParCList, fParContList, and fTrdRawMessageVector.
|
delete |
Copy constructor - not implemented.
|
inlineinherited |
Definition at line 88 of file CbmStar2019Algo.h.
|
inlineinherited |
For monitor algos.
Definition at line 83 of file CbmStar2019Algo.h.
Referenced by CreateHistogram().
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().
|
inlineprotectedinherited |
Map of parameter name and type.
Definition at line 140 of file CbmStar2019Algo.h.
|
inlineinherited |
Definition at line 97 of file CbmStar2019Algo.h.
|
inlineinherited |
For unpacker algos.
Definition at line 95 of file CbmStar2019Algo.h.
Bool_t CbmMcbm2018UnpackerAlgoTrdR::CreateHistogram | ( | ECbmTrdUnpackerHistograms | iHisto | ) |
create the histogram correlated to iHisto
Definition at line 386 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References CbmStar2019Algo< CbmTrdDigi >::AddHistoToVector(), fDigiPar, CbmStar2019Algo< CbmTrdDigi >::fdMsSizeInNs, fHistoArray, fLastDigiTimeVec, CbmTrdParMod::GetModuleId(), CbmTrdParSet::GetModuleMap(), CbmTrdParSet::GetModulePar(), CbmTrdParModDigi::GetNofColumns(), CbmTrdParModDigi::GetNofRows(), kBeginDigiHistos, kDigiChargeSpectrum, kDigiChargeSpectrumNt, kDigiChargeSpectrumSt, kDigiDeltaT, kDigiDistributionMap, kDigiDistributionMapNt, kDigiDistributionMapSt, kDigiHitFrequency, kDigiMeanHitFrequency, kDigiPulserDeltaT, kDigiRelativeTimeMicroslice, kDigiTriggerType, kEndDefinedHistos, Spadic::kGlobal, CbmTrdDigi::kNTrg, kRawDistributionMapModule5, kRawHitType, kRawMessage_Signalshape_all, kRawMessage_Signalshape_filtered, kRawMessage_Signalshape_Nt, kRawMessage_Signalshape_St, kRawPulserDeltaT, Spadic::kSandN, and kSpadic_Info_Types.
Referenced by 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().
|
private |
Extract Metadata
Definition at line 875 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References ExtractSample(), fdMsSizeInCC, fSpadicEpoch, GetMessageType(), and Spadic::kSOM.
Referenced by ProcessMs().
|
private |
Extract a Sample from a given SOM or RDA word.
word | the 64bit Message Word |
sample | Which sample to extract [0,31] |
multihit | Set to true if current word belongs to a multihit message. |
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().
Bool_t CbmMcbm2018UnpackerAlgoTrdR::FillHistograms | ( | ) |
Definition at line 562 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
Referenced by ProcessMs().
Bool_t CbmMcbm2018UnpackerAlgoTrdR::FillHistograms | ( | CbmTrdDigi const & | digi | ) |
Definition at line 565 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fDigiPar, fdMsSizeInCC, CbmStar2019Algo< CbmTrdDigi >::fdTsFullSizeInNs, fHistoArray, fIsActiveHistoVec, fLastDigiTimeVec, fNbTimeslices, fSpadicEpoch, CbmTrdDigi::GetAddressChannel(), CbmTrdDigi::GetAddressModule(), CbmTrdDigi::GetCharge(), CbmTrdParSet::GetModulePar(), CbmTrdParModDigi::GetNofColumns(), CbmTrdParModDigi::GetNofRows(), CbmTrdParModDigi::GetOrientation(), CbmTrdParModDigi::GetPadColumn(), CbmTrdParModDigi::GetPadRow(), CbmTrdDigi::GetTime(), CbmTrdDigi::GetTriggerType(), kDigiChargeSpectrum, kDigiChargeSpectrumNt, kDigiChargeSpectrumSt, kDigiDeltaT, kDigiDistributionMap, kDigiDistributionMapNt, kDigiDistributionMapSt, kDigiHitFrequency, kDigiMeanHitFrequency, kDigiPulserDeltaT, kDigiRelativeTimeMicroslice, kDigiTriggerType, kEndDefinedHistos, CbmTrdDigi::kNeighbor, and CbmTrdDigi::kSelf.
Bool_t CbmMcbm2018UnpackerAlgoTrdR::FillHistograms | ( | CbmTrdRawMessageSpadic const & | raw | ) |
Definition at line 668 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fHistoArray, fIsActiveHistoVec, fLastFulltime, CbmTrdRawMessageSpadic::GetChannelId(), CbmTrdRawMessageSpadic::GetElinkId(), CbmTrdRawMessageSpadic::GetFullTime(), CbmTrdRawMessageSpadic::GetHitType(), CbmTrdRawMessageSpadic::GetMultiHit(), CbmTrdRawMessageSpadic::GetSamples(), Spadic::kNeigh, kRawDistributionMapModule5, kRawHitType, kRawMessage_Signalshape_all, kRawMessage_Signalshape_filtered, kRawMessage_Signalshape_Nt, kRawMessage_Signalshape_St, kRawPulserDeltaT, Spadic::kSandN, Spadic::kSelf, and size().
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 93 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fNbSpadicEpochMsg, fNbSpadicErrorMsg, fNbSpadicRawMsg, fNbTimeslices, fNbUnkownWord, and fNbWildRda.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Finish().
|
inlineinherited |
Definition at line 92 of file CbmStar2019Algo.h.
|
inlineinherited |
Definition at line 98 of file CbmStar2019Algo.h.
|
inlineinherited |
Definition at line 87 of file CbmStar2019Algo.h.
|
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().
|
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().
|
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().
|
inlinevirtualinherited |
Definition at line 80 of file CbmStar2019Algo.h.
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 141 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fAsicPar, fDigiPar, fGainPar, fGasPar, and fParContList.
Referenced by CbmDeviceMcbmUnpack::InitContainers(), and CbmMcbm2018UnpackerTaskTrdR::SetParContainers().
|
inline |
Definition at line 109 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fTrdRawMessageVector.
|
inline |
Definition at line 110 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fRefGeoTag.
|
inlineinherited |
Definition at line 96 of file CbmStar2019Algo.h.
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 76 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References CbmStar2019Algo< CbmTrdDigi >::fbIgnoreOverlapMs, fdMsSizeInCC, and CbmStar2019Algo< CbmTrdDigi >::fdMsSizeInNs.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 102 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References ReInitContainers().
Referenced by CbmDeviceMcbmUnpack::InitContainers(), and CbmMcbm2018UnpackerTaskTrdR::InitContainers().
Bool_t CbmMcbm2018UnpackerAlgoTrdR::InitParameters | ( | ) |
Definition at line 163 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References CbmTrdHardwareSetupR::CreateAsicChannelMap(), CbmTrdHardwareSetupR::CreateHwToSwAsicAddressTranslatorMap(), fAsicChannelMap, and fSpadicMap.
Referenced by ReInitContainers().
|
private |
Definition at line 765 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fAsicChannelMap, fdTimeOffsetNs, fIsFirstChannelsElinkEven, fSpadicMap, fvecTimeshiftsPar, CbmTrdRawMessageSpadic::GetChannelId(), CbmTrdRawMessageSpadic::GetCriId(), CbmTrdRawMessageSpadic::GetCrobId(), CbmTrdRawMessageSpadic::GetElinkId(), CbmTrdRawMessageSpadic::GetHitType(), CbmTrdRawMessageSpadic::GetMaxAdc(), CbmTrdRawMessageSpadic::GetTime(), CbmTrdParAsic::kCriIdPosition, CbmTrdParAsic::kCrobIdPosition, CbmTrdDigi::kNeighbor, CbmTrdDigi::kNTrg, CbmTrdDigi::kSelf, NSPADICCH, and CbmTrdRawMessageSpadic::SetTime().
Referenced by ProcessMs().
|
delete |
Copy assignment operator - not implemented.
|
virtual |
Unpacks one Microslice.
ts | Timeslice that contains the Microslice |
uMsCompIdx | Component ID. The contributing input channel. |
uMsIdx | Index of the Microslice inside the Timeslice |
< 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().
|
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().
|
inlinevirtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 57 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References ProcessTs().
Referenced by ProcessTs().
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 112 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fAsicPar, fDigiPar, fGainPar, fGasPar, fParContList, and InitParameters().
Referenced by InitContainers(), and CbmMcbm2018UnpackerTaskTrdR::ReInitContainers().
|
virtual |
Implements CbmStar2019Algo< CbmTrdDigi >.
Definition at line 87 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References CbmTrdParSetGain::clear(), fTrdDigiVector, and fTrdRawMessageVector.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Reset().
Bool_t CbmMcbm2018UnpackerAlgoTrdR::ResetHistograms | ( | ) |
Definition at line 721 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fHistoArray.
|
inline |
Definition at line 99 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fIsActiveHistoVec.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
inline |
Call this when Spadic Average-Baseline feature is enabled.
Definition at line 129 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbBaselineAvg.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
inline |
Definition at line 113 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbDebugMonitorMode.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
inline |
Definition at line 116 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbDebugSortOutput.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
inline |
Definition at line 115 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbDebugWriteOutput.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
Bool_t CbmMcbm2018UnpackerAlgoTrdR::SetDigiOutputPointer | ( | std::vector< CbmTrdDigi > *const | pVector | ) |
Set fTrdDigiVector to the address of pVector.
pVector | Pointer to the Digi output vector of the Unpacker task. |
Definition at line 736 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fTrdDigiVector.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Init(), and CbmDeviceMcbmUnpack::InitContainers().
|
inline |
Definition at line 147 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fIsFirstChannelsElinkEven.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().
|
inlineinherited |
Control flags.
Definition at line 101 of file CbmStar2019Algo.h.
|
inline |
Definition at line 112 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbMonitorMode.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
inline |
Definition at line 148 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References CbmStar2019Algo< CbmTrdDigi >::fdMsSizeInNs.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().
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().
|
inlinevirtualinherited |
Definition at line 79 of file CbmStar2019Algo.h.
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.
pVector | Pointer to the RawMessage output vector of the Unpacker task. |
Definition at line 747 of file CbmMcbm2018UnpackerAlgoTrdR.cxx.
References fSpadicInfoMsgVector, and fTrdRawMessageVector.
Referenced by CbmMcbm2018UnpackerTaskTrdR::Init().
|
inline |
Definition at line 146 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fRefGeoTag.
|
inline |
Definition at line 117 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fdTimeOffsetNs.
Referenced by CbmDeviceMcbmUnpack::InitContainers(), and CbmMcbm2018UnpackerTaskTrdR::SetTimeOffsetNs().
|
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().
|
inline |
Definition at line 114 of file CbmMcbm2018UnpackerAlgoTrdR.h.
References fbWriteOutput.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers().
|
private |
Map to retrieve module channelId from asicAddress and asicChannel.
Definition at line 237 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by InitParameters(), and MakeDigi().
|
private |
CbmTrdParameter container.
Definition at line 229 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().
|
private |
Set to true if Baseline Averaging is activated in Spadic.
Definition at line 179 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by ExtractSample(), and SetBaselineAvg().
|
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().
|
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().
|
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().
|
protectedinherited |
Definition at line 112 of file CbmStar2019Algo.h.
Referenced by Init(), and ProcessTs().
|
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().
|
private |
If ON the output Vector of digis is written to disk.
Definition at line 176 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by SetWriteOutput().
|
private |
Index of current Timeslice.
Definition at line 210 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by ProcessTs().
|
private |
CbmTrdParameter container.
Definition at line 230 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by CreateHistogram(), FillHistograms(), GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().
|
protectedinherited |
Vector of pointers to canvases + optional folder name.
For unpacker algos
Definition at line 134 of file CbmStar2019Algo.h.
|
private |
Definition at line 151 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by CreateRawMessage(), FillHistograms(), and Init().
|
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().
|
private |
User settings: Data correction parameters.
Definition at line 182 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by MakeDigi(), and SetTimeOffsetNs().
|
protectedinherited |
Size of a single MS, [nanoseconds].
Definition at line 114 of file CbmStar2019Algo.h.
Referenced by ProcessTs().
|
protectedinherited |
Total size of the core MS in a TS, [nanoseconds].
Definition at line 115 of file CbmStar2019Algo.h.
Referenced by FillHistograms(), and ProcessTs().
|
protectedinherited |
Definition at line 135 of file CbmStar2019Algo.h.
|
private |
CbmTrdParameter container.
Definition at line 232 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().
|
private |
CbmTrdParameter container.
Definition at line 231 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by GetParList(), ReInitContainers(), and ~CbmMcbm2018UnpackerAlgoTrdR().
|
private |
Definition at line 197 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by CreateHistogram(), CreateHistograms(), FillHistograms(), FillHistograms(), ProcessMs(), and ResetHistograms().
|
private |
Stores all Histograms.
Definition at line 196 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by CreateHistograms(), FillHistograms(), FillHistograms(), ProcessMs(), and SetActiveHistograms().
|
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().
|
private |
Definition at line 198 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by CreateHistogram(), and FillHistograms().
|
private |
Definition at line 217 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by FillHistograms(), and ProcessMs().
|
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().
|
private |
Index of current MS within the TS.
Definition at line 211 of file CbmMcbm2018UnpackerAlgoTrdR.h.
|
private |
Start Time in ns of current MS from its index field in header.
Definition at line 214 of file CbmMcbm2018UnpackerAlgoTrdR.h.
|
private |
Number of Spadic Epoch Messages.
Definition at line 224 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by Finish(), and ProcessMs().
|
private |
Number of Spadic error Messages.
Definition at line 222 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by Finish(), and ProcessMs().
|
private |
Counters.
Number of Spadic Raw Messages.
Definition at line 220 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by Finish(), and ProcessMs().
|
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().
|
private |
Number of unknown data words in the Microslice stream.
Definition at line 223 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by Finish(), and ProcessMs().
|
private |
Number of RDA Words outside of a Message.
Definition at line 221 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by Finish(), and ProcessMs().
|
protectedinherited |
For any algo.
Definition at line 138 of file CbmStar2019Algo.h.
|
protectedinherited |
Parameter management.
Definition at line 105 of file CbmStar2019Algo.h.
Referenced by ~CbmMcbm2018UnpackerAlgoTrdR().
|
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().
|
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().
|
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().
|
private |
vector< pair< fulltime, word > >
Definition at line 191 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by ProcessMs(), and SetRawOutputPointer().
|
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().
|
private |
Output Digi vector.
Definition at line 185 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by ProcessMs(), ProcessTs(), Reset(), and SetDigiOutputPointer().
|
private |
Output Spadic raw messages for debugging.
Definition at line 188 of file CbmMcbm2018UnpackerAlgoTrdR.h.
Referenced by GetRawMessageVector(), ProcessMs(), ProcessTs(), Reset(), SetRawOutputPointer(), and ~CbmMcbm2018UnpackerAlgoTrdR().
|
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().
|
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.
|
protectedinherited |
Definition at line 109 of file CbmStar2019Algo.h.
Referenced by ProcessTs(), and SetNbMsInTs().
|
protectedinherited |
Definition at line 111 of file CbmStar2019Algo.h.
Referenced by ProcessTs().
|
protectedinherited |
Definition at line 110 of file CbmStar2019Algo.h.
Referenced by ProcessTs(), and SetNbMsInTs().
|
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().
|
protectedinherited |
Parameters related to FLES containers.
Definition at line 108 of file CbmStar2019Algo.h.
Referenced by AddMsComponentToList(), and ProcessTs().
|
protectedinherited |
Vector of pointers to histograms + optional folder name.
Definition at line 131 of file CbmStar2019Algo.h.
|
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.
|
staticprivate |