diff --git a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx index 74aa75f76719c61bc36e870a0390cdebf25b7e09..11b64665726db07327ebcf31f1df1fb01996383c 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx +++ b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx @@ -44,6 +44,14 @@ std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>* 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 Bool_t CbmTofUnpackAlgo::init() { return kTRUE; } @@ -264,6 +272,9 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI /// Epoch OK ProcessHit(pMess[uIdx]); } + else { + ++fulBadEpochHitNb; + } break; } // case critof001::MSG_HIT: case critof001::MSG_EPOCH: { @@ -365,6 +376,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe fbLastEpochGood = false; ulEpochNr = ulMsStartInEpoch; fuProcEpochUntilError = 0; + ++fulBadEpochNb; } // if( ulEpochNr != ulMsStartInEpoch ) else { fbLastEpochGood = true; @@ -383,6 +395,7 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe ulEpochNr = (fulCurrentEpoch + 1) % critof001::kulEpochCycleEp; fbLastEpochGood = false; fuProcEpochUntilError = 0; + ++fulBadEpochNb; } // if( ( (fulCurrentEpoch + 1) % critof001::kuEpochCounterSz ) != ulEpochNr ) else { fbLastEpochGood = true; diff --git a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.h b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.h index aa04de6a420afed11e78df82734dcd805cce2764..f4f7cd0ce3d4a7b299bb40d37696dc514fe14de8 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.h +++ b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.h @@ -102,7 +102,7 @@ protected: } /** @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. @@ -204,6 +204,8 @@ private: bool fbBmonParMode = false; std::vector<bool> fvbMaskedComponents = {}; bool fbLastEpochGood = false; + uint64_t fulBadEpochNb = 0; + uint64_t fulBadEpochHitNb = 0; /// Book-keeping members uint32_t fuProcEpochUntilError = 0;