diff --git a/DataFormats/Detectors/MUON/MID/include/DataFormatsMID/ROFRecord.h b/DataFormats/Detectors/MUON/MID/include/DataFormatsMID/ROFRecord.h index e3d3d143659ec..6f3d0396339b7 100644 --- a/DataFormats/Detectors/MUON/MID/include/DataFormatsMID/ROFRecord.h +++ b/DataFormats/Detectors/MUON/MID/include/DataFormatsMID/ROFRecord.h @@ -26,9 +26,10 @@ namespace mid enum class EventType { Standard = 0, - Noise = 1, - Dead = 2 + Calib = 1, + FET = 2 }; +constexpr uint32_t NEvTypes = 3; /// ROFRecord class encodes the trigger interaction record of given ROF and /// the reference on the 1st object (digit, cluster etc) of this ROF in the data tree @@ -41,6 +42,7 @@ struct ROFRecord { ROFRecord() = default; ROFRecord(const o2::InteractionRecord& intRecord, const EventType& evtType, size_t first, size_t nElements) : interactionRecord(intRecord), eventType(evtType), firstEntry(first), nEntries(nElements) {} ROFRecord(const ROFRecord& other, size_t first, size_t nElements) : interactionRecord(other.interactionRecord), eventType(other.eventType), firstEntry(first), nEntries(nElements) {} + size_t getEndIndex() const { return firstEntry + nEntries; } ClassDefNV(ROFRecord, 1); }; diff --git a/Detectors/CTF/test/test_ctf_io_mid.cxx b/Detectors/CTF/test/test_ctf_io_mid.cxx index e36d06e597224..586a9d57031ed 100644 --- a/Detectors/CTF/test/test_ctf_io_mid.cxx +++ b/Detectors/CTF/test/test_ctf_io_mid.cxx @@ -27,8 +27,9 @@ using namespace o2::mid; BOOST_AUTO_TEST_CASE(CTFTest) { - std::vector rofs; - std::vector cols; + std::array, NEvTypes> colData{}; + std::array, NEvTypes> rofData{}; + CTFHelper::TFData tfData; // RS: don't understand why, but this library is not loaded automatically, although the dependencies are clearly // indicated. What it more weird is that for similar tests of other detectors the library is loaded! // Absence of the library leads to complains about the StreamerInfo and eventually segm.faul when appending the @@ -40,27 +41,37 @@ BOOST_AUTO_TEST_CASE(CTFTest) std::array pattern; for (int irof = 0; irof < 1000; irof++) { ir += 1 + gRandom->Integer(200); - uint8_t nch = 0, evtyp = gRandom->Integer(3); - while (nch == 0) { - nch = gRandom->Poisson(10); - } - auto start = cols.size(); - for (int ich = 0; ich < nch; ich++) { - uint8_t deId = gRandom->Integer(128); - uint8_t columnId = gRandom->Integer(128); - for (int i = 0; i < 5; i++) { - pattern[i] = gRandom->Integer(0x7fff); + for (uint8_t evtyp = 0; evtyp < NEvTypes; evtyp++) { + if (gRandom->Rndm() > 0.8) { + continue; // sometimes skip some event types + } + uint8_t nch = 0; + while (nch == 0) { + nch = gRandom->Poisson(10); } - cols.emplace_back(ColumnData{deId, columnId, pattern}); + auto start = colData[evtyp].size(); + for (int ich = 0; ich < nch; ich++) { + uint8_t deId = gRandom->Integer(128); + uint8_t columnId = gRandom->Integer(128); + for (int i = 0; i < 5; i++) { + pattern[i] = gRandom->Integer(0x7fff); + } + colData[evtyp].emplace_back(ColumnData{deId, columnId, pattern}); + } + rofData[evtyp].emplace_back(ROFRecord{ir, EventType(evtyp), start, colData[evtyp].size() - start}); } - rofs.emplace_back(ROFRecord{ir, EventType(evtyp), start, cols.size() - start}); } + for (uint32_t i = 0; i < NEvTypes; i++) { + tfData.colData[i] = {colData[i].data(), colData[i].size()}; + tfData.rofData[i] = {rofData[i].data(), rofData[i].size()}; + } + tfData.buildReferences(); sw.Start(); std::vector vec; { CTFCoder coder; - coder.encode(vec, rofs, cols); // compress + coder.encode(vec, tfData); // compress } sw.Stop(); LOG(INFO) << "Compressed in " << sw.CpuTime() << " s"; @@ -90,42 +101,49 @@ BOOST_AUTO_TEST_CASE(CTFTest) LOG(INFO) << "Read back from tree in " << sw.CpuTime() << " s"; } - std::vector rofsD; - std::vector colsD; + std::array, NEvTypes> colDataD{}; + std::array, NEvTypes> rofDataD{}; sw.Start(); const auto ctfImage = o2::mid::CTF::getImage(vec.data()); { CTFCoder coder; - coder.decode(ctfImage, rofsD, colsD); // decompress + coder.decode(ctfImage, rofDataD, colDataD); // decompress } sw.Stop(); LOG(INFO) << "Decompressed in " << sw.CpuTime() << " s"; - BOOST_CHECK(rofsD.size() == rofs.size()); - BOOST_CHECK(colsD.size() == cols.size()); - LOG(INFO) << " BOOST_CHECK rofsD.size() " << rofsD.size() << " rofs.size() " << rofs.size() - << " BOOST_CHECK(colsD.size() " << colsD.size() << " cols.size()) " << cols.size(); + for (uint32_t it = 0; it < NEvTypes; it++) { + const auto& rofsD = rofDataD[it]; + const auto& rofs = rofData[it]; + const auto& colsD = colDataD[it]; + const auto& cols = colData[it]; + LOG(INFO) << "Test for event type " << it; + BOOST_CHECK(rofsD.size() == rofs.size()); + BOOST_CHECK(colsD.size() == cols.size()); + LOG(INFO) << " BOOST_CHECK rofsD.size() " << rofsD.size() << " rofs.size() " << rofData[0].size() + << " BOOST_CHECK(colsD.size() " << colsD.size() << " cols.size()) " << colData[0].size(); - for (size_t i = 0; i < rofs.size(); i++) { - const auto& dor = rofs[i]; - const auto& ddc = rofsD[i]; - LOG(DEBUG) << " Orig.ROFRecord " << i << " " << dor.interactionRecord << " " << dor.firstEntry << " " << dor.nEntries; - LOG(DEBUG) << " Deco.ROFRecord " << i << " " << ddc.interactionRecord << " " << ddc.firstEntry << " " << ddc.nEntries; + for (size_t i = 0; i < rofs.size(); i++) { + const auto& dor = rofs[i]; + const auto& ddc = rofsD[i]; + LOG(DEBUG) << " Orig.ROFRecord " << i << " " << dor.interactionRecord << " " << dor.firstEntry << " " << dor.nEntries; + LOG(DEBUG) << " Deco.ROFRecord " << i << " " << ddc.interactionRecord << " " << ddc.firstEntry << " " << ddc.nEntries; - BOOST_CHECK(dor.interactionRecord == ddc.interactionRecord); - BOOST_CHECK(dor.firstEntry == ddc.firstEntry); - BOOST_CHECK(dor.nEntries == dor.nEntries); - } + BOOST_CHECK(dor.interactionRecord == ddc.interactionRecord); + BOOST_CHECK(dor.firstEntry == ddc.firstEntry); + BOOST_CHECK(dor.nEntries == dor.nEntries); + } - for (size_t i = 0; i < cols.size(); i++) { - const auto& cor = cols[i]; - const auto& cdc = colsD[i]; - BOOST_CHECK(cor.deId == cdc.deId); - BOOST_CHECK(cor.columnId == cdc.columnId); - for (int j = 0; j < 5; j++) { - BOOST_CHECK(cor.patterns[j] == cdc.patterns[j]); - LOG(DEBUG) << "col " << i << " pat " << j << " : " << cor.patterns[j] << " : " << cdc.patterns[j]; + for (size_t i = 0; i < cols.size(); i++) { + const auto& cor = cols[i]; + const auto& cdc = colsD[i]; + BOOST_CHECK(cor.deId == cdc.deId); + BOOST_CHECK(cor.columnId == cdc.columnId); + for (int j = 0; j < 5; j++) { + BOOST_CHECK(cor.patterns[j] == cdc.patterns[j]); + LOG(DEBUG) << "col " << i << " pat " << j << " : " << cor.patterns[j] << " : " << cdc.patterns[j]; + } } } } diff --git a/Detectors/MUON/MID/CTF/include/MIDCTF/CTFCoder.h b/Detectors/MUON/MID/CTF/include/MIDCTF/CTFCoder.h index 4080cc7f803ca..8fe4b45184502 100644 --- a/Detectors/MUON/MID/CTF/include/MIDCTF/CTFCoder.h +++ b/Detectors/MUON/MID/CTF/include/MIDCTF/CTFCoder.h @@ -43,22 +43,22 @@ class CTFCoder : public o2::ctf::CTFCoderBase /// entropy-encode data to buffer with CTF template - void encode(VEC& buff, const gsl::span& rofData, const gsl::span& colData); + void encode(VEC& buff, const CTFHelper::TFData& tfData); /// entropy decode data from buffer with CTF template - void decode(const CTF::base& ec, VROF& rofVec, VCOL& colVec); + void decode(const CTF::base& ec, std::array& rofVec, std::array& colVec); void createCoders(const std::string& dictPath, o2::ctf::CTFCoderBase::OpType op); private: void appendToTree(TTree& tree, CTF& ec); - void readFromTree(TTree& tree, int entry, std::vector& rofVec, std::vector& colVec); + void readFromTree(TTree& tree, int entry, std::array, NEvTypes>& rofVec, std::array, NEvTypes>& colVec); }; /// entropy-encode clusters to buffer with CTF template -void CTFCoder::encode(VEC& buff, const gsl::span& rofData, const gsl::span& colData) +void CTFCoder::encode(VEC& buff, const CTFHelper::TFData& tfData) { using MD = o2::ctf::Metadata::OptStore; // what to do which each field: see o2::ctd::Metadata explanation @@ -71,7 +71,7 @@ void CTFCoder::encode(VEC& buff, const gsl::span& rofData, cons MD::EENCODE, // BLC_deId MD::EENCODE // BLC_colId }; - CTFHelper helper(rofData, colData); + CTFHelper helper(tfData); // book output size with some margin auto szIni = sizeof(CTFHeader) + helper.getSize() * 2. / 3; // will be autoexpanded if needed @@ -101,7 +101,7 @@ void CTFCoder::encode(VEC& buff, const gsl::span& rofData, cons /// decode entropy-encoded clusters to standard compact clusters template -void CTFCoder::decode(const CTF::base& ec, VROF& rofVec, VCOL& colVec) +void CTFCoder::decode(const CTF::base& ec, std::array& rofVec, std::array& colVec) { auto header = ec.getHeader(); checkDictVersion(static_cast(header)); @@ -122,10 +122,12 @@ void CTFCoder::decode(const CTF::base& ec, VROF& rofVec, VCOL& colVec) DECODEMID(colId, CTF::BLC_colId); // clang-format on // - rofVec.clear(); - colVec.clear(); - rofVec.reserve(header.nROFs); - colVec.reserve(header.nColumns); + for (uint32_t i = 0; i < NEvTypes; i++) { + rofVec[i].clear(); + colVec[i].clear(); + rofVec[i].reserve(header.nROFs); + colVec[i].reserve(header.nColumns); + } uint32_t firstEntry = 0, rofCount = 0, colCount = 0, pCount = 0; o2::InteractionRecord ir(header.firstBC, header.firstOrbit); @@ -138,14 +140,14 @@ void CTFCoder::decode(const CTF::base& ec, VROF& rofVec, VCOL& colVec) } else { ir.bc += bcInc[irof]; } - - firstEntry = colVec.size(); + auto& cv = colVec[evType[irof]]; + firstEntry = cv.size(); for (uint8_t ic = 0; ic < entries[irof]; ic++) { - colVec.emplace_back(ColumnData{deId[colCount], colId[colCount], std::array{pattern[pCount], pattern[pCount + 1], pattern[pCount + 2], pattern[pCount + 3], pattern[pCount + 4]}}); + cv.emplace_back(ColumnData{deId[colCount], colId[colCount], std::array{pattern[pCount], pattern[pCount + 1], pattern[pCount + 2], pattern[pCount + 3], pattern[pCount + 4]}}); pCount += 5; colCount++; } - rofVec.emplace_back(ROFRecord{ir, EventType(evType[irof]), firstEntry, entries[irof]}); + rofVec[evType[irof]].emplace_back(ROFRecord{ir, EventType(evType[irof]), firstEntry, entries[irof]}); } assert(colCount == header.nColumns); } diff --git a/Detectors/MUON/MID/CTF/include/MIDCTF/CTFHelper.h b/Detectors/MUON/MID/CTF/include/MIDCTF/CTFHelper.h index 6269441ea9cae..22695cc87a5ea 100644 --- a/Detectors/MUON/MID/CTF/include/MIDCTF/CTFHelper.h +++ b/Detectors/MUON/MID/CTF/include/MIDCTF/CTFHelper.h @@ -19,6 +19,7 @@ #include "DataFormatsMID/ROFRecord.h" #include "DataFormatsMID/ColumnData.h" #include "DataFormatsMID/CTF.h" +#include "CommonDataFormat/AbstractRef.h" #include namespace o2 @@ -30,21 +31,32 @@ class CTFHelper { public: - CTFHelper(const gsl::span& rofData, const gsl::span& colData) - : mROFData(rofData), mColData(colData) {} + using OrderRef = o2::dataformats::AbstractRef<29, 2, 1>; // 29 bits for index in event type span, 2 bits for event type, 1 bit flag + struct TFData { + std::vector colDataRefs{}; + std::vector rofDataRefs{}; + std::array, NEvTypes> colData{}; + std::array, NEvTypes> rofData{}; + void buildReferences(); + }; + + CTFHelper(const TFData& data) : mTFData(data) {} + CTFHelper() = delete; CTFHeader createHeader() { CTFHeader h{0, 1, 0, // dummy timestamp, version 1.0 - uint32_t(mROFData.size()), uint32_t(mColData.size()), 0, 0}; - if (mROFData.size()) { - h.firstOrbit = mROFData[0].interactionRecord.orbit; - h.firstBC = mROFData[0].interactionRecord.bc; + uint32_t(mTFData.rofDataRefs.size()), uint32_t(mTFData.colDataRefs.size()), 0, 0}; + if (h.nROFs) { + auto id0 = mTFData.rofDataRefs.front(); + const auto& rof = mTFData.rofData[id0.getSource()][id0.getIndex()]; + h.firstOrbit = rof.interactionRecord.orbit; + h.firstBC = rof.interactionRecord.bc; } return h; } - size_t getSize() const { return mROFData.size() * sizeof(o2::mid::ROFRecord) + mColData.size() * sizeof(o2::mid::ColumnData); } + size_t getSize() const { return mTFData.rofDataRefs.size() * sizeof(o2::mid::ROFRecord) + mTFData.colDataRefs.size() * sizeof(o2::mid::ColumnData); } //>>> =========================== ITERATORS ======================================== @@ -58,7 +70,7 @@ class CTFHelper using reference = const T&; using iterator_category = std::random_access_iterator_tag; - _Iter(const gsl::span& data, bool end = false) : mData(data), mIndex(end ? M * data.size() : 0){}; + _Iter(const std::vector& ord, const std::array, NEvTypes>& data, bool end = false) : mOrder(ord), mData(&data), mIndex(end ? M * ord.size() : 0) {} _Iter() = default; const I& operator++() @@ -89,7 +101,8 @@ class CTFHelper bool operator<(const I& other) const { return mIndex < other.mIndex; } protected: - gsl::span mData{}; + gsl::span mOrder{}; + const std::array, NEvTypes>* mData{}; size_t mIndex = 0; }; @@ -102,11 +115,13 @@ class CTFHelper using _Iter::_Iter; value_type operator*() const { + const auto ir = (*mData)[mOrder[mIndex].getSource()][mOrder[mIndex].getIndex()].interactionRecord; if (mIndex) { - if (mData[mIndex].interactionRecord.orbit == mData[mIndex - 1].interactionRecord.orbit) { - return mData[mIndex].interactionRecord.bc - mData[mIndex - 1].interactionRecord.bc; + const auto irP = (*mData)[mOrder[mIndex - 1].getSource()][mOrder[mIndex - 1].getIndex()].interactionRecord; + if (ir.orbit == irP.orbit) { + return ir.bc - irP.bc; } else { - return mData[mIndex].interactionRecord.bc; + return ir.bc; } } return 0; @@ -119,7 +134,15 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return mIndex ? mData[mIndex].interactionRecord.orbit - mData[mIndex - 1].interactionRecord.orbit : 0; } + value_type operator*() const + { + if (mIndex) { + const auto ir = (*mData)[mOrder[mIndex].getSource()][mOrder[mIndex].getIndex()].interactionRecord; + const auto irP = (*mData)[mOrder[mIndex - 1].getSource()][mOrder[mIndex - 1].getIndex()].interactionRecord; + return ir.orbit - irP.orbit; + } + return 0; + } }; //_______________________________________________ @@ -128,7 +151,7 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return mData[mIndex].nEntries; } + value_type operator*() const { return (*mData)[mOrder[mIndex].getSource()][mOrder[mIndex].getIndex()].nEntries; } }; //_______________________________________________ @@ -137,7 +160,7 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return value_type(mData[mIndex].eventType); } + value_type operator*() const { return value_type((*mData)[mOrder[mIndex].getSource()][mOrder[mIndex].getIndex()].eventType); } }; //_______________________________________________ @@ -145,7 +168,11 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return mData[mIndex / 5].patterns[mIndex % 5]; } + value_type operator*() const + { + auto idx = mOrder[mIndex / 5]; + return (*mData)[idx.getSource()][idx.getIndex()].patterns[mIndex % 5]; + } }; //_______________________________________________ @@ -153,7 +180,11 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return mData[mIndex].deId; } + value_type operator*() const + { + auto idx = mOrder[mIndex]; + return (*mData)[idx.getSource()][idx.getIndex()].deId; + } }; //_______________________________________________ @@ -161,35 +192,38 @@ class CTFHelper { public: using _Iter::_Iter; - value_type operator*() const { return mData[mIndex].columnId; } + value_type operator*() const + { + auto idx = mOrder[mIndex]; + return (*mData)[idx.getSource()][idx.getIndex()].columnId; + } }; //<<< =========================== ITERATORS ======================================== - Iter_bcIncROF begin_bcIncROF() const { return Iter_bcIncROF(mROFData, false); } - Iter_bcIncROF end_bcIncROF() const { return Iter_bcIncROF(mROFData, true); } + Iter_bcIncROF begin_bcIncROF() const { return Iter_bcIncROF(mTFData.rofDataRefs, mTFData.rofData, false); } + Iter_bcIncROF end_bcIncROF() const { return Iter_bcIncROF(mTFData.rofDataRefs, mTFData.rofData, true); } - Iter_orbitIncROF begin_orbitIncROF() const { return Iter_orbitIncROF(mROFData, false); } - Iter_orbitIncROF end_orbitIncROF() const { return Iter_orbitIncROF(mROFData, true); } + Iter_orbitIncROF begin_orbitIncROF() const { return Iter_orbitIncROF(mTFData.rofDataRefs, mTFData.rofData, false); } + Iter_orbitIncROF end_orbitIncROF() const { return Iter_orbitIncROF(mTFData.rofDataRefs, mTFData.rofData, true); } - Iter_entriesROF begin_entriesROF() const { return Iter_entriesROF(mROFData, false); } - Iter_entriesROF end_entriesROF() const { return Iter_entriesROF(mROFData, true); } + Iter_entriesROF begin_entriesROF() const { return Iter_entriesROF(mTFData.rofDataRefs, mTFData.rofData, false); } + Iter_entriesROF end_entriesROF() const { return Iter_entriesROF(mTFData.rofDataRefs, mTFData.rofData, true); } - Iter_evtypeROF begin_evtypeROF() const { return Iter_evtypeROF(mROFData, false); } - Iter_evtypeROF end_evtypeROF() const { return Iter_evtypeROF(mROFData, true); } + Iter_evtypeROF begin_evtypeROF() const { return Iter_evtypeROF(mTFData.rofDataRefs, mTFData.rofData, false); } + Iter_evtypeROF end_evtypeROF() const { return Iter_evtypeROF(mTFData.rofDataRefs, mTFData.rofData, true); } - Iter_pattern begin_pattern() const { return Iter_pattern(mColData, false); } - Iter_pattern end_pattern() const { return Iter_pattern(mColData, true); } + Iter_pattern begin_pattern() const { return Iter_pattern(mTFData.colDataRefs, mTFData.colData, false); } + Iter_pattern end_pattern() const { return Iter_pattern(mTFData.colDataRefs, mTFData.colData, true); } - Iter_deId begin_deId() const { return Iter_deId(mColData, false); } - Iter_deId end_deId() const { return Iter_deId(mColData, true); } + Iter_deId begin_deId() const { return Iter_deId(mTFData.colDataRefs, mTFData.colData, false); } + Iter_deId end_deId() const { return Iter_deId(mTFData.colDataRefs, mTFData.colData, true); } - Iter_colId begin_colId() const { return Iter_colId(mColData, false); } - Iter_colId end_colId() const { return Iter_colId(mColData, true); } + Iter_colId begin_colId() const { return Iter_colId(mTFData.colDataRefs, mTFData.colData, false); } + Iter_colId end_colId() const { return Iter_colId(mTFData.colDataRefs, mTFData.colData, true); } private: - const gsl::span mROFData; - const gsl::span mColData; + const TFData& mTFData; }; } // namespace mid diff --git a/Detectors/MUON/MID/CTF/src/CTFCoder.cxx b/Detectors/MUON/MID/CTF/src/CTFCoder.cxx index fbc2168ed0edd..3ed8c384a4223 100644 --- a/Detectors/MUON/MID/CTF/src/CTFCoder.cxx +++ b/Detectors/MUON/MID/CTF/src/CTFCoder.cxx @@ -28,7 +28,8 @@ void CTFCoder::appendToTree(TTree& tree, CTF& ec) ///___________________________________________________________________________________ // extract and decode data from the tree -void CTFCoder::readFromTree(TTree& tree, int entry, std::vector& rofVec, std::vector& colVec) +void CTFCoder::readFromTree(TTree& tree, int entry, std::array, NEvTypes>& rofVec, + std::array, NEvTypes>& colVec) { assert(entry >= 0 && entry < tree.GetEntries()); CTF ec; @@ -66,7 +67,7 @@ void CTFCoder::createCoders(const std::string& dictPath, o2::ctf::CTFCoderBase:: uint8_t evType = 0, deId = 0, colId = 0; #define MAKECODER(part, slot) createCoder(op, getFreq(slot), getProbBits(slot), int(slot)) // clang-format off - MAKECODER(bcInc, CTF::BLC_bcIncROF); + MAKECODER(bcInc, CTF::BLC_bcIncROF); MAKECODER(orbitInc, CTF::BLC_orbitIncROF); MAKECODER(entries, CTF::BLC_entriesROF); MAKECODER(evType, CTF::BLC_evtypeROF); diff --git a/Detectors/MUON/MID/CTF/src/CTFHelper.cxx b/Detectors/MUON/MID/CTF/src/CTFHelper.cxx index 962de4c766051..83fb7da3368c7 100644 --- a/Detectors/MUON/MID/CTF/src/CTFHelper.cxx +++ b/Detectors/MUON/MID/CTF/src/CTFHelper.cxx @@ -14,3 +14,35 @@ /// \brief Helper for MID CTF creation #include "MIDCTF/CTFHelper.h" + +using namespace o2::mid; + +void CTFHelper::TFData::buildReferences() +{ + uint32_t nDone = 0, idx[NEvTypes] = {}; + uint32_t sizes[NEvTypes] = { + uint32_t(rofData[size_t(EventType::Standard)].size()), + uint32_t(rofData[size_t(EventType::Calib)].size()), + uint32_t(rofData[size_t(EventType::FET)].size())}; + uint64_t rofBC[NEvTypes] = {}; + auto fillNextROFBC = [&nDone, &rofBC, &idx, &sizes, this](int it) { + if (idx[it] < sizes[it]) { + rofBC[it] = this->rofData[it][idx[it]].interactionRecord.toLong(); + } else { + rofBC[it] = -1; + nDone++; + } + }; + for (uint32_t it = 0; it < NEvTypes; it++) { + fillNextROFBC(it); + } + while (nDone < NEvTypes) { // find next ROFRecord with smallest BC, untill all 3 spans are traversed + int selT = rofBC[0] <= rofBC[1] ? (rofBC[0] <= rofBC[2] ? 0 : 2) : (rofBC[1] <= rofBC[2] ? 1 : 2); + rofDataRefs.emplace_back(idx[selT], selT); + for (uint32_t ic = rofData[selT][idx[selT]].firstEntry; ic < rofData[selT][idx[selT]].getEndIndex(); ic++) { + colDataRefs.emplace_back(ic, selT); // register indices of corresponding column data + } + ++idx[selT]; // increment used index + fillNextROFBC(selT); + } +} \ No newline at end of file diff --git a/Detectors/MUON/MID/QC/exe/raw-checker.cxx b/Detectors/MUON/MID/QC/exe/raw-checker.cxx index 116111661ccfe..0a1c1342902fa 100644 --- a/Detectors/MUON/MID/QC/exe/raw-checker.cxx +++ b/Detectors/MUON/MID/QC/exe/raw-checker.cxx @@ -122,7 +122,7 @@ int process(po::variables_map& vm) rofRecords.emplace_back(rof.interactionRecord, rof.eventType, rof.firstEntry + offset, rof.nEntries); } o2::InteractionRecord hb(0, iHB); - hbRecords.emplace_back(hb, o2::mid::EventType::Noise, offset, decoder->getData().size()); + hbRecords.emplace_back(hb, o2::mid::EventType::Calib, offset, decoder->getData().size()); ++iHB; if ((nHBs > 0 && iHB >= nHBs)) { break; diff --git a/Detectors/MUON/MID/Raw/include/MIDRaw/DecodedDataAggregator.h b/Detectors/MUON/MID/Raw/include/MIDRaw/DecodedDataAggregator.h index 3dda82114bac4..b4ca92d0b13c6 100644 --- a/Detectors/MUON/MID/Raw/include/MIDRaw/DecodedDataAggregator.h +++ b/Detectors/MUON/MID/Raw/include/MIDRaw/DecodedDataAggregator.h @@ -20,9 +20,9 @@ #include #include #include "DataFormatsMID/ColumnData.h" +#include "DataFormatsMID/ROBoard.h" #include "DataFormatsMID/ROFRecord.h" #include "MIDRaw/CrateMapper.h" -#include "DataFormatsMID/ROBoard.h" namespace o2 { @@ -34,19 +34,20 @@ class DecodedDataAggregator void process(gsl::span localBoards, gsl::span rofRecords); /// Gets the vector of data - const std::vector& getData() { return mData; } + const std::vector& getData(EventType eventType = EventType::Standard) { return mData[static_cast(eventType)]; } /// Gets the vector of data RO frame records - const std::vector& getROFRecords() { return mROFRecords; } + const std::vector& getROFRecords(EventType eventType = EventType::Standard) { return mROFRecords[static_cast(eventType)]; } private: - void addData(const ROBoard& col, size_t firstEntry); - ColumnData& FindColumnData(uint8_t deId, uint8_t columnId, size_t firstEntry); + void addData(const ROBoard& col, size_t firstEntry, size_t evtTypeIdx); + ColumnData& FindColumnData(uint8_t deId, uint8_t columnId, size_t firstEntry, size_t evtTypeIdx); + + std::array>, 3> mEventIndexes{}; /// Event indexes - std::map> mOrderIndexes; /// Map for time ordering the entries - std::vector mData{}; /// Vector of output column data - std::vector mROFRecords{}; /// Vector of ROF records - CrateMapper mCrateMapper; /// Mapper to convert the RO info to ColumnData + std::array, 3> mData{}; /// Vector of output column data + std::array, 3> mROFRecords{}; /// Vector of ROF records + CrateMapper mCrateMapper; /// Mapper to convert the RO info to ColumnData }; } // namespace mid } // namespace o2 diff --git a/Detectors/MUON/MID/Raw/src/DecodedDataAggregator.cxx b/Detectors/MUON/MID/Raw/src/DecodedDataAggregator.cxx index 1f951c18048c4..398cf0c00e40f 100644 --- a/Detectors/MUON/MID/Raw/src/DecodedDataAggregator.cxx +++ b/Detectors/MUON/MID/Raw/src/DecodedDataAggregator.cxx @@ -17,7 +17,6 @@ #include "MIDRaw/DecodedDataAggregator.h" #include "MIDBase/DetectorParameters.h" - #include "MIDRaw/CrateParameters.h" namespace o2 @@ -25,20 +24,20 @@ namespace o2 namespace mid { -ColumnData& DecodedDataAggregator::FindColumnData(uint8_t deId, uint8_t columnId, size_t firstEntry) +ColumnData& DecodedDataAggregator::FindColumnData(uint8_t deId, uint8_t columnId, size_t firstEntry, size_t evtTypeIdx) { /// Gets the matching column data /// Adds one if not found - for (auto colIt = mData.begin() + firstEntry; colIt != mData.end(); ++colIt) { + for (auto colIt = mData[evtTypeIdx].begin() + firstEntry, end = mData[evtTypeIdx].end(); colIt != end; ++colIt) { if (colIt->deId == deId && colIt->columnId == columnId) { return *colIt; } } - mData.push_back({deId, columnId}); - return mData.back(); + mData[evtTypeIdx].push_back({deId, columnId}); + return mData[evtTypeIdx].back(); } -void DecodedDataAggregator::addData(const ROBoard& loc, size_t firstEntry) +void DecodedDataAggregator::addData(const ROBoard& loc, size_t firstEntry, size_t evtTypeIdx) { /// Converts the local board data to ColumnData uint8_t uniqueLocId = loc.boardId; @@ -53,9 +52,9 @@ void DecodedDataAggregator::addData(const ROBoard& loc, size_t firstEntry) continue; } uint8_t deId = detparams::getDEId(isRightSide, ich, rpcLineId); - auto& col = FindColumnData(deId, columnId, firstEntry); + auto& col = FindColumnData(deId, columnId, firstEntry, evtTypeIdx); col.setBendPattern(loc.patternsBP[ich], lineId); - col.setNonBendPattern(loc.patternsNBP[ich]); + col.setNonBendPattern(col.getNonBendPattern() | loc.patternsNBP[ich]); } } @@ -64,29 +63,34 @@ void DecodedDataAggregator::process(gsl::span localBoards, gsl::s /// Aggregates the decoded raw data // First clear the output - mData.clear(); - mROFRecords.clear(); + for (auto& data : mData) { + data.clear(); + } + for (auto& rof : mROFRecords) { + rof.clear(); + } // Fill the map with ordered events for (auto rofIt = rofRecords.begin(); rofIt != rofRecords.end(); ++rofIt) { - mOrderIndexes[rofIt->interactionRecord.toLong()].emplace_back(rofIt - rofRecords.begin()); + mEventIndexes[static_cast(rofIt->eventType)][rofIt->interactionRecord.toLong()].emplace_back(rofIt - rofRecords.begin()); } const ROFRecord* rof = nullptr; - for (auto& item : mOrderIndexes) { - size_t firstEntry = mData.size(); - for (auto& idx : item.second) { - // In principle all of these ROF records have the same timestamp - rof = &rofRecords[idx]; - for (size_t iloc = rof->firstEntry; iloc < rof->firstEntry + rof->nEntries; ++iloc) { - addData(localBoards[iloc], firstEntry); + for (size_t ievtType = 0; ievtType < mEventIndexes.size(); ++ievtType) { + for (auto& item : mEventIndexes[ievtType]) { + size_t firstEntry = mData[ievtType].size(); + for (auto& idx : item.second) { + // In principle all of these ROF records have the same timestamp + rof = &rofRecords[idx]; + for (size_t iloc = rof->firstEntry; iloc < rof->firstEntry + rof->nEntries; ++iloc) { + addData(localBoards[iloc], firstEntry, ievtType); + } } + mROFRecords[ievtType].emplace_back(rof->interactionRecord, rof->eventType, firstEntry, mData[ievtType].size() - firstEntry); } - mROFRecords.emplace_back(rof->interactionRecord, rof->eventType, firstEntry, mData.size() - firstEntry); - } - - // Clear the inner objects when the computation is done - mOrderIndexes.clear(); + // Clear the inner objects when the computation is done + mEventIndexes[ievtType].clear(); + } // loop on event types } } // namespace mid diff --git a/Detectors/MUON/MID/Raw/src/ELinkDataShaper.cxx b/Detectors/MUON/MID/Raw/src/ELinkDataShaper.cxx index de8eb93a593bd..69d6b1a9dfe1b 100644 --- a/Detectors/MUON/MID/Raw/src/ELinkDataShaper.cxx +++ b/Detectors/MUON/MID/Raw/src/ELinkDataShaper.cxx @@ -70,7 +70,7 @@ EventType ELinkDataShaper::processSelfTriggered(uint16_t localClock, uint16_t& c if (mReceivedCalibration && (localClock == mExpectedFETClock)) { // Reset the calibration flag for this e-link mReceivedCalibration = false; - return EventType::Dead; + return EventType::FET; } return EventType::Standard; } @@ -80,7 +80,7 @@ EventType ELinkDataShaper::processCalibrationTrigger(uint16_t localClock) /// Processes the calibration event mExpectedFETClock = localClock + mElectronicsDelay.calibToFET; mReceivedCalibration = true; - return EventType::Noise; + return EventType::Calib; } void ELinkDataShaper::processOrbitTrigger(uint16_t localClock, uint8_t triggerWord) diff --git a/Detectors/MUON/MID/Raw/src/GBTOutputHandler.cxx b/Detectors/MUON/MID/Raw/src/GBTOutputHandler.cxx index 95ca9d217016b..b130c3248761f 100644 --- a/Detectors/MUON/MID/Raw/src/GBTOutputHandler.cxx +++ b/Detectors/MUON/MID/Raw/src/GBTOutputHandler.cxx @@ -55,7 +55,7 @@ EventType GBTOutputHandler::processSelfTriggered(size_t ilink, uint16_t localClo if ((mReceivedCalibration & linkMask) && (localClock == mExpectedFETClock[ilink])) { // Reset the calibration flag for this e-link mReceivedCalibration &= ~linkMask; - return EventType::Dead; + return EventType::FET; } return EventType::Standard; } @@ -65,7 +65,7 @@ EventType GBTOutputHandler::processCalibrationTrigger(size_t ilink, uint16_t loc /// Processes the calibration event mExpectedFETClock[ilink] = localClock + mElectronicsDelay.calibToFET; mReceivedCalibration |= (1 << ilink); - return EventType::Noise; + return EventType::Calib; } void GBTOutputHandler::processOrbitTrigger(size_t ilink, uint16_t localClock, uint8_t triggerWord) diff --git a/Detectors/MUON/MID/Workflow/CMakeLists.txt b/Detectors/MUON/MID/Workflow/CMakeLists.txt index ca50021afd853..9c8c357beebc3 100644 --- a/Detectors/MUON/MID/Workflow/CMakeLists.txt +++ b/Detectors/MUON/MID/Workflow/CMakeLists.txt @@ -1,23 +1,23 @@ -# Copyright 2019-2020 CERN and copyright holders of ALICE O2. -# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. See +# https://alice-o2.web.cern.ch/copyright for details of the copyright holders. # All rights not expressly granted are reserved. # -# This software is distributed under the terms of the GNU General Public -# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# This software is distributed under the terms of the GNU General Public License +# v3 (GPL Version 3), copied verbatim in the file "COPYING". # # In applying this license CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. +# granted to it by virtue of its status as an Intergovernmental Organization or +# submit itself to any jurisdiction. o2_add_library( MIDWorkflow TARGETVARNAME targetName SOURCES src/ClusterizerMCSpec.cxx src/ClusterizerSpec.cxx + src/DecodedDataAggregatorSpec.cxx src/DigitReaderSpec.cxx src/EntropyDecoderSpec.cxx src/EntropyEncoderSpec.cxx - src/RawAggregatorSpec.cxx src/RawCheckerSpec.cxx src/RawDecoderSpec.cxx src/RawGBTDecoderSpec.cxx diff --git a/Detectors/MUON/MID/Workflow/include/MIDWorkflow/DecodedDataAggregatorSpec.h b/Detectors/MUON/MID/Workflow/include/MIDWorkflow/DecodedDataAggregatorSpec.h new file mode 100644 index 0000000000000..6407b68af3646 --- /dev/null +++ b/Detectors/MUON/MID/Workflow/include/MIDWorkflow/DecodedDataAggregatorSpec.h @@ -0,0 +1,30 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file MIDWorkflow/DecodedDataAggregatorSpec.h +/// \brief Data processor spec for MID decoded data aggregator devices +/// \author Diego Stocco +/// \date 26 February 2020 + +#ifndef O2_MID_DecodedDataAggregatorSpec_H +#define O2_MID_DecodedDataAggregatorSpec_H + +#include "Framework/DataProcessorSpec.h" + +namespace o2 +{ +namespace mid +{ +framework::DataProcessorSpec getDecodedDataAggregatorSpec(); +} // namespace mid +} // namespace o2 + +#endif //O2_MID_DecodedDataAggregatorSpec_H diff --git a/Detectors/MUON/MID/Workflow/src/RawAggregatorSpec.cxx b/Detectors/MUON/MID/Workflow/src/DecodedDataAggregatorSpec.cxx similarity index 69% rename from Detectors/MUON/MID/Workflow/src/RawAggregatorSpec.cxx rename to Detectors/MUON/MID/Workflow/src/DecodedDataAggregatorSpec.cxx index 96dd54308d91e..8323f8bfdcde5 100644 --- a/Detectors/MUON/MID/Workflow/src/RawAggregatorSpec.cxx +++ b/Detectors/MUON/MID/Workflow/src/DecodedDataAggregatorSpec.cxx @@ -9,12 +9,12 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file MID/Workflow/src/RawAggregatorSpec.cxx -/// \brief Data processor spec for MID raw data aggregator device +/// \file MID/Workflow/src/DecodedDataAggregatorSpec.cxx +/// \brief Data processor spec for MID decoded data aggregator device /// \author Diego Stocco /// \date 26 February 2020 -#include "MIDWorkflow/RawAggregatorSpec.h" +#include "MIDWorkflow/DecodedDataAggregatorSpec.h" #include #include "Framework/ConfigParamRegistry.h" @@ -32,7 +32,7 @@ namespace o2 namespace mid { -class RawAggregatorDeviceDPL +class DecodedDataAggregatorDeviceDPL { public: void init(of::InitContext& ic) @@ -59,8 +59,11 @@ class RawAggregatorDeviceDPL mAggregator.process(data, inROFRecords); mTimerAlgo += std::chrono::high_resolution_clock::now() - tAlgoStart; - pc.outputs().snapshot(of::Output{"MID", "DATA", 0, of::Lifetime::Timeframe}, mAggregator.getData()); - pc.outputs().snapshot(of::Output{"MID", "DATAROF", 0, of::Lifetime::Timeframe}, mAggregator.getROFRecords()); + for (o2::header::DataHeader::SubSpecificationType subSpec = 0; subSpec < 3; ++subSpec) { + EventType evtType = static_cast(subSpec); + pc.outputs().snapshot(of::Output{o2::header::gDataOriginMID, "DATA", subSpec, of::Lifetime::Timeframe}, mAggregator.getData(evtType)); + pc.outputs().snapshot(of::Output{o2::header::gDataOriginMID, "DATAROF", subSpec, of::Lifetime::Timeframe}, mAggregator.getROFRecords(evtType)); + } mTimer += std::chrono::high_resolution_clock::now() - tStart; mNROFs += mAggregator.getROFRecords().size(); @@ -73,16 +76,20 @@ class RawAggregatorDeviceDPL unsigned int mNROFs{0}; /// Total number of processed ROFs }; -framework::DataProcessorSpec getRawAggregatorSpec() +framework::DataProcessorSpec getDecodedDataAggregatorSpec() { std::vector inputSpecs{of::InputSpec{"mid_decoded", header::gDataOriginMID, "DECODED"}, of::InputSpec{"mid_decoded_rof", header::gDataOriginMID, "DECODEDROF"}}; - std::vector outputSpecs{of::OutputSpec{header::gDataOriginMID, "DATA"}, of::OutputSpec{header::gDataOriginMID, "DATAROF"}}; + std::vector outputSpecs; + for (o2::header::DataHeader::SubSpecificationType subSpec = 0; subSpec < 3; ++subSpec) { + outputSpecs.emplace_back(of::OutputSpec{header::gDataOriginMID, "DATA", subSpec}); + outputSpecs.emplace_back(of::OutputSpec{header::gDataOriginMID, "DATAROF", subSpec}); + } return of::DataProcessorSpec{ - "MIDRawAggregator", + "MIDDecodedDataAggregator", {inputSpecs}, {outputSpecs}, - of::AlgorithmSpec{of::adaptFromTask()}}; + of::AlgorithmSpec{of::adaptFromTask()}}; } } // namespace mid } // namespace o2 diff --git a/Detectors/MUON/MID/Workflow/src/EntropyDecoderSpec.cxx b/Detectors/MUON/MID/Workflow/src/EntropyDecoderSpec.cxx index 8e518187af75c..216abb481a795 100644 --- a/Detectors/MUON/MID/Workflow/src/EntropyDecoderSpec.cxx +++ b/Detectors/MUON/MID/Workflow/src/EntropyDecoderSpec.cxx @@ -46,16 +46,22 @@ void EntropyDecoderSpec::run(ProcessingContext& pc) mTimer.Start(false); auto buff = pc.inputs().get>("ctf"); - - auto& rofs = pc.outputs().make>(OutputRef{"rofs"}); - auto& cols = pc.outputs().make>(OutputRef{"cols"}); + std::array, NEvTypes> rofs{}; + std::array, NEvTypes> cols{}; // since the buff is const, we cannot use EncodedBlocks::relocate directly, instead we wrap its data to another flat object const auto ctfImage = o2::mid::CTF::getImage(buff.data()); mCTFCoder.decode(ctfImage, rofs, cols); + for (uint32_t it = 0; it < NEvTypes; it++) { + pc.outputs().snapshot(Output{o2::header::gDataOriginMID, "DATA", it, Lifetime::Timeframe}, cols[it]); + pc.outputs().snapshot(Output{o2::header::gDataOriginMID, "DATAROF", it, Lifetime::Timeframe}, rofs[it]); + } + mTimer.Stop(); - LOG(INFO) << "Decoded " << cols.size() << " MID columns in " << rofs.size() << " ROFRecords in " << mTimer.CpuTime() - cput << " s"; + LOG(INFO) << "Decoded {" << cols[0].size() << ',' << cols[1].size() << ',' << cols[2].size() + << "} MID columns for {" << rofs[0].size() << ',' << rofs[1].size() << ',' << rofs[2].size() + << "} ROFRecords in " << mTimer.CpuTime() - cput << " s"; } void EntropyDecoderSpec::endOfStream(EndOfStreamContext& ec) @@ -66,9 +72,11 @@ void EntropyDecoderSpec::endOfStream(EndOfStreamContext& ec) DataProcessorSpec getEntropyDecoderSpec() { - std::vector outputs{ - OutputSpec{{"rofs"}, "MID", "DATAROF", 0, Lifetime::Timeframe}, - OutputSpec{{"cols"}, "MID", "DATA", 0, Lifetime::Timeframe}}; + std::vector outputs; + for (o2::header::DataHeader::SubSpecificationType subSpec = 0; subSpec < NEvTypes; ++subSpec) { + outputs.emplace_back(OutputSpec{header::gDataOriginMID, "DATA", subSpec}); + outputs.emplace_back(OutputSpec{header::gDataOriginMID, "DATAROF", subSpec}); + } return DataProcessorSpec{ "mid-entropy-decoder", diff --git a/Detectors/MUON/MID/Workflow/src/EntropyEncoderSpec.cxx b/Detectors/MUON/MID/Workflow/src/EntropyEncoderSpec.cxx index f3879828cf996..0cb355296304c 100644 --- a/Detectors/MUON/MID/Workflow/src/EntropyEncoderSpec.cxx +++ b/Detectors/MUON/MID/Workflow/src/EntropyEncoderSpec.cxx @@ -16,8 +16,12 @@ #include "MIDWorkflow/EntropyEncoderSpec.h" #include +#include #include "Framework/ControlService.h" #include "Framework/ConfigParamRegistry.h" +#include "Framework/DataRef.h" +#include "Framework/InputRecordWalker.h" +#include "Headers/DataHeader.h" #include "DetectorsBase/CTFCoderBase.h" #include "DetectorsCommonDataFormats/NameConf.h" @@ -46,11 +50,30 @@ void EntropyEncoderSpec::run(ProcessingContext& pc) { auto cput = mTimer.CpuTime(); mTimer.Start(false); - auto rofs = pc.inputs().get>("rofs"); - auto cols = pc.inputs().get>("cols"); - auto& buffer = pc.outputs().make>(Output{"MID", "CTFDATA", 0, Lifetime::Timeframe}); - mCTFCoder.encode(buffer, rofs, cols); + CTFHelper::TFData tfData; + std::vector + filter = { + {"check", ConcreteDataTypeMatcher{header::gDataOriginMID, "DATA"}, Lifetime::Timeframe}, + {"check", ConcreteDataTypeMatcher{header::gDataOriginMID, "DATAROF"}, Lifetime::Timeframe}, + }; + for (auto const& inputRef : InputRecordWalker(pc.inputs(), filter)) { + auto const* dh = framework::DataRefUtils::getHeader(inputRef); + if (dh->subSpecification >= NEvTypes) { + throw std::runtime_error(fmt::format("SubSpecification={} does not match EvenTypes for {}", dh->subSpecification, dh->dataDescription.as())); + } + if (DataRefUtils::match(inputRef, "cols")) { + tfData.colData[dh->subSpecification] = pc.inputs().get>(inputRef); + } + if (DataRefUtils::match(inputRef, "rofs")) { + tfData.rofData[dh->subSpecification] = pc.inputs().get>(inputRef); + } + } + // build references for looping over the data in BC increasing direction + tfData.buildReferences(); + + auto& buffer = pc.outputs().make>(Output{header::gDataOriginMID, "CTFDATA", 0, Lifetime::Timeframe}); + mCTFCoder.encode(buffer, tfData); auto eeb = CTF::get(buffer.data()); // cast to container pointer eeb->compactify(); // eliminate unnecessary padding buffer.resize(eeb->size()); // shrink buffer to strictly necessary size @@ -68,13 +91,13 @@ void EntropyEncoderSpec::endOfStream(EndOfStreamContext& ec) DataProcessorSpec getEntropyEncoderSpec() { std::vector inputs; - inputs.emplace_back("rofs", "MID", "DATAROF", 0, Lifetime::Timeframe); - inputs.emplace_back("cols", "MID", "DATA", 0, Lifetime::Timeframe); + inputs.emplace_back("rofs", ConcreteDataTypeMatcher(header::gDataOriginMID, "DATAROF"), Lifetime::Timeframe); + inputs.emplace_back("cols", ConcreteDataTypeMatcher(header::gDataOriginMID, "DATA"), Lifetime::Timeframe); return DataProcessorSpec{ "mid-entropy-encoder", inputs, - Outputs{{"MID", "CTFDATA", 0, Lifetime::Timeframe}}, + Outputs{{header::gDataOriginMID, "CTFDATA", 0, Lifetime::Timeframe}}, AlgorithmSpec{adaptFromTask()}, Options{{"ctf-dict", VariantType::String, o2::base::NameConf::getCTFDictFileName(), {"File of CTF encoding dictionary"}}}}; } diff --git a/Detectors/MUON/MID/Workflow/src/raw-to-digits-workflow.cxx b/Detectors/MUON/MID/Workflow/src/raw-to-digits-workflow.cxx index 54f70deae9ac1..3a3addb6d8e37 100644 --- a/Detectors/MUON/MID/Workflow/src/raw-to-digits-workflow.cxx +++ b/Detectors/MUON/MID/Workflow/src/raw-to-digits-workflow.cxx @@ -19,7 +19,7 @@ #include "Framework/Variant.h" #include "Framework/ConfigParamSpec.h" #include "MIDWorkflow/RawDecoderSpec.h" -#include "MIDWorkflow/RawAggregatorSpec.h" +#include "MIDWorkflow/DecodedDataAggregatorSpec.h" #include "CommonUtils/ConfigurableParam.h" using namespace o2::framework; @@ -64,7 +64,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) o2::framework::WorkflowSpec specs; specs.emplace_back(o2::mid::getRawDecoderSpec(false, feeIdConfig, crateMasks, electronicsDelay, askDISTSTF)); if (!decodeOnly) { - specs.emplace_back(o2::mid::getRawAggregatorSpec()); + specs.emplace_back(o2::mid::getDecodedDataAggregatorSpec()); } return specs; }