diff --git a/reco/detectors/rich/unpack/CbmRichUnpackAlgo2022.cxx b/reco/detectors/rich/unpack/CbmRichUnpackAlgo2022.cxx index 177f14b730be28d684ed412dd887f95646d46931..ca4e14309242598b5b330d8456df323895695a0c 100644 --- a/reco/detectors/rich/unpack/CbmRichUnpackAlgo2022.cxx +++ b/reco/detectors/rich/unpack/CbmRichUnpackAlgo2022.cxx @@ -25,6 +25,12 @@ bool CbmRichUnpackAlgo2022::unpack(const fles::Timeslice* ts, std::uint16_t icom const fles::MicrosliceView mv = ts->get_microslice(icomp, imslice); const fles::MicrosliceDescriptor& msDesc = mv.desc(); + // Check the version number of the MS to identify wrong unpacker for data + if (msDesc.sys_ver != 0x3) { + LOG(fatal) << "CbmRichUnpackAlgo2022: System Version of the microslice is not compatible with this unpacker!"; + return false; + } + // Clear CbmTime of MS. Used to get time offset of subtriggers to MS start fCbmTimeMS = 0;