Skip to content
Snippets Groups Projects
Commit b32114c4 authored by Pascal Raisig's avatar Pascal Raisig Committed by Pascal Raisig
Browse files

Update default geo tag and use new raw message time getter

parent 6a857620
No related branches found
No related tags found
1 merge request!90Fix trd geo tag in the mCbm macros
......@@ -48,7 +48,7 @@ CbmMcbm2018UnpackerAlgoTrdR::CbmMcbm2018UnpackerAlgoTrdR()
, fNbUnkownWord(0)
, fNbSpadicEpochMsg(0)
, fParContList(nullptr)
, fRefGeoTag("trd_v18q_mcbm")
, fRefGeoTag("trd_v20a_mcbm")
, fAsicPar(nullptr)
, fDigiPar(nullptr)
, fGasPar(nullptr)
......@@ -211,6 +211,14 @@ Bool_t CbmMcbm2018UnpackerAlgoTrdR::ProcessTs(const fles::Timeslice& ts) {
[](const CbmTrdDigi& a, const CbmTrdDigi& b) -> bool {
return a.GetTime() < b.GetTime();
});
if (fbDebugWriteOutput && fbDebugSortOutput) {
std::sort(fTrdRawMessageVector->begin(),
fTrdRawMessageVector->end(),
[](const CbmTrdRawMessageSpadic& a,
const CbmTrdRawMessageSpadic& b) -> bool {
return a.GetTime() < b.GetTime();
});
}
LOG(error) << "Failed to process ts " << fCurrTsIdx << " MS " << MsIndex
<< " for component " << uMsComp;
......@@ -857,7 +865,7 @@ CbmMcbm2018UnpackerAlgoTrdR::MakeDigi(CbmTrdRawMessageSpadic raw) {
Float_t digiCharge =
(Float_t) raw.GetMaxAdc()
+ 256; // REMARK raw.GetMaxADC returns a the value in the range of -256 til 255. However, the digiCharge is stored as unsigned. // TODO make Settable
ULong64_t digiTime = raw.GetFullTime_ns() - fdTimeOffsetNs;
ULong64_t digiTime = raw.GetTime() - fdTimeOffsetNs;
// Int_t digiTriggerType = raw.GetHitType() ; // Spadic::TriggerType this does not work 03/27/2020 - PR digiTriggerType is not Spadic::TriggerType!
Int_t digiTriggerType = raw.GetHitType();
if (digiTriggerType == 1)
......
......@@ -126,6 +126,9 @@ public:
void SetDebugWriteOutput(Bool_t bFlagIn = kTRUE) {
fbDebugWriteOutput = bFlagIn;
}
void SetDebugSortOutput(Bool_t bFlagIn = kTRUE) {
fbDebugWriteOutput = bFlagIn;
}
inline void SetTimeOffsetNs(Double_t dOffsetIn = 0.0) {
fdTimeOffsetNs = dOffsetIn;
}
......@@ -194,6 +197,8 @@ private:
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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment