Skip to content
Snippets Groups Projects
Commit 959c14d1 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Florian Uhlig
Browse files

In TOF unpacker algo, add count of hit message rejected due to bad epoch + final printout

parent d5af4b0a
No related branches found
No related tags found
1 merge request!891In TOF unpacker algo, add count of hit messages rejected due to bad epoch + final printout
Pipeline #18021 passed
...@@ -44,6 +44,14 @@ std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>* ...@@ -44,6 +44,14 @@ std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>*
return &fParContVec; return &fParContVec;
} }
// ---- finishDerived ----
void CbmTofUnpackAlgo::finishDerived()
{
LOG(info) << fName << std::endl // Block clang format
<< " " << fulBadEpochNb << " bad epochs" << std::endl // Block clang format
<< " " << fulBadEpochHitNb << " hit messages lost due to bad epochs";
}
// ---- init // ---- init
Bool_t CbmTofUnpackAlgo::init() { return kTRUE; } Bool_t CbmTofUnpackAlgo::init() { return kTRUE; }
...@@ -264,6 +272,9 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI ...@@ -264,6 +272,9 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI
/// Epoch OK /// Epoch OK
ProcessHit(pMess[uIdx]); ProcessHit(pMess[uIdx]);
} }
else {
++fulBadEpochHitNb;
}
break; break;
} // case critof001::MSG_HIT: } // case critof001::MSG_HIT:
case critof001::MSG_EPOCH: { case critof001::MSG_EPOCH: {
...@@ -365,6 +376,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe ...@@ -365,6 +376,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe
fbLastEpochGood = false; fbLastEpochGood = false;
ulEpochNr = ulMsStartInEpoch; ulEpochNr = ulMsStartInEpoch;
fuProcEpochUntilError = 0; fuProcEpochUntilError = 0;
++fulBadEpochNb;
} // if( ulEpochNr != ulMsStartInEpoch ) } // if( ulEpochNr != ulMsStartInEpoch )
else { else {
fbLastEpochGood = true; fbLastEpochGood = true;
...@@ -383,6 +395,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe ...@@ -383,6 +395,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe
ulEpochNr = (fulCurrentEpoch + 1) % critof001::kulEpochCycleEp; ulEpochNr = (fulCurrentEpoch + 1) % critof001::kulEpochCycleEp;
fbLastEpochGood = false; fbLastEpochGood = false;
fuProcEpochUntilError = 0; fuProcEpochUntilError = 0;
++fulBadEpochNb;
} // if( ( (fulCurrentEpoch + 1) % critof001::kuEpochCounterSz ) != ulEpochNr ) } // if( ( (fulCurrentEpoch + 1) % critof001::kuEpochCounterSz ) != ulEpochNr )
else { else {
fbLastEpochGood = true; fbLastEpochGood = true;
......
...@@ -102,7 +102,7 @@ protected: ...@@ -102,7 +102,7 @@ protected:
} }
/** @brief Function that allows special calls during Finish in the derived algos */ /** @brief Function that allows special calls during Finish in the derived algos */
virtual void finishDerived() { return; } void finishDerived();
/** /**
* @brief Initialisation at begin of run. Special inits of the derived algos. * @brief Initialisation at begin of run. Special inits of the derived algos.
...@@ -204,6 +204,8 @@ private: ...@@ -204,6 +204,8 @@ private:
bool fbBmonParMode = false; bool fbBmonParMode = false;
std::vector<bool> fvbMaskedComponents = {}; std::vector<bool> fvbMaskedComponents = {};
bool fbLastEpochGood = false; bool fbLastEpochGood = false;
uint64_t fulBadEpochNb = 0;
uint64_t fulBadEpochHitNb = 0;
/// Book-keeping members /// Book-keeping members
uint32_t fuProcEpochUntilError = 0; uint32_t fuProcEpochUntilError = 0;
......
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