@@ -71,26 +71,28 @@ void EntropyDecoderSpec<N>::run(ProcessingContext& pc)
7171 auto buff = pc.inputs ().get <gsl::span<o2::ctf::BufferType>>(getBinding (nm + " CTF" , iLayer));
7272 // since the buff is const, we cannot use EncodedBlocks::relocate directly, instead we wrap its data to another flat object
7373 // const auto ctfImage = o2::itsmft::CTF::getImage(buff.data());
74- const auto & ctf = o2::itsmft::CTF::getImage (buff.data ());
75- if (ctf.getHeader ().maxStreams != nLayers) {
76- LOGP (fatal, " Number of streams {} in the CTF header is not equal to NLayers {} from AlpideParam in {}staggered mode" ,
77- ctf.getHeader ().maxStreams , nLayers, mDoStaggering ? " " : " non-" );
74+ if (buff.size ()) {
75+ const auto & ctf = o2::itsmft::CTF::getImage (buff.data ());
76+ if (ctf.getHeader ().maxStreams != nLayers) {
77+ LOGP (fatal, " Number of streams {} in the CTF header is not equal to NLayers {} from AlpideParam in {}staggered mode" ,
78+ ctf.getHeader ().maxStreams , nLayers, mDoStaggering ? " " : " non-" );
79+ }
7880 }
7981 // this produces weird memory problems in unrelated devices, to be understood
8082 // auto& trigs = pc.outputs().make<std::vector<o2::itsmft::PhysTrigger>>(OutputRef{"phystrig"}); // dummy output
8183 auto & rofs = pc.outputs ().make <std::vector<o2::itsmft::ROFRecord>>(OutputRef{nm + " ROframes" , iLayer});
8284 if (mGetDigits ) {
8385 auto & digits = pc.outputs ().make <std::vector<o2::itsmft::Digit>>(OutputRef{nm + " Digits" , iLayer});
8486 if (buff.size ()) {
85- iosize += mCTFCoder .decode (ctf , rofs, digits, mNoiseMap , mPattIdConverter );
87+ iosize += mCTFCoder .decode (o2::itsmft::CTF::getImage (buff. data ()) , rofs, digits, mNoiseMap , mPattIdConverter );
8688 }
8789 ndigcl += digits.size ();
8890 nrofs += rofs.size ();
8991 } else {
9092 auto & compcl = pc.outputs ().make <std::vector<o2::itsmft::CompClusterExt>>(OutputRef{nm + " compClusters" , iLayer});
9193 auto & patterns = pc.outputs ().make <std::vector<unsigned char >>(OutputRef{nm + " patterns" , iLayer});
9294 if (buff.size ()) {
93- iosize += mCTFCoder .decode (ctf , rofs, compcl, patterns, mNoiseMap , mPattIdConverter );
95+ iosize += mCTFCoder .decode (o2::itsmft::CTF::getImage (buff. data ()) , rofs, compcl, patterns, mNoiseMap , mPattIdConverter );
9496 }
9597 ndigcl += compcl.size ();
9698 }
0 commit comments