59 fmt.options.en_chip_id =
true;
60 fmt.options.en_eos =
true;
61 int container_list_size = 2;
63 auto cont_coll = std::make_unique< PhaseIIPixelRawDataContainerMT>(
m_idHelper->wafer_hash_max(), container_list_size);
70 DecCore<PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback> core(
fmt, cb);
73 std::vector<const eformat::ROBFragment<const uint32_t*>*> ROBs;
92 for (
const auto& ROB : ROBs){
96 const uint32_t* payload = ROB->rod_data();
97 uint32_t
length = ROB->rod_ndata();
101 auto comp = [](
const uint32_t&
a,
const uint32_t& b){
102 uint32_t aLSB =
a & 0x00FFFFFF;
103 uint32_t bLSB = b & 0x00FFFFFF;
104 if (aLSB != bLSB)
return aLSB < bLSB;
108 std::map<uint32_t, std::pair<size_t, uint16_t>,
decltype(comp)> GBTFragments(comp);
112 uint16_t GBTFragmentSize = (payload[idx] & 0xFFFF0000) >> 16;
113 uint32_t detectorResourceID = payload[idx + 1];
115 GBTFragments.insert({detectorResourceID, {idx, GBTFragmentSize}});
116 idx += GBTFragmentSize;
127 uint32_t moduleID = 0xFFFFFFFF;
128 for (
const auto& [detectorResourceID, range] : GBTFragments){
132 if (moduleID != currentModuleID){
133 moduleID = currentModuleID;
143 std::vector<uint64_t> payload64;
144 payload64.resize((range.second - 2) / 2);
145 size_t payloadIdx = 0;
146 for (uint32_t word = range.first + 2; word < range.first + range.second; word += 2){
147 payload64[payloadIdx] = ((uint64_t)(payload[word]) << 32) | payload[word + 1];
153 core.decode(payload64);
167 return StatusCode::SUCCESS;