8#include "eformat/SourceIdentifier.h"
11#include <unordered_map>
14using eformat::helper::SourceIdentifier;
29 for (uint32_t detID : {eformat::MUON_MMEGA_ENDCAP_A_SIDE, eformat::MUON_MMEGA_ENDCAP_C_SIDE}) {
30 for (uint8_t sectorID(0); sectorID < 16; ++sectorID) {
34 uint16_t moduleID = (0x0 << 8) | sectorID;
35 SourceIdentifier sid(
static_cast<eformat::SubDetector
>(detID), moduleID);
38 moduleID = (0x1 << 8) | sectorID;
39 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
42 moduleID = (0x2 << 8) | sectorID;
43 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
50 return StatusCode::SUCCESS;
59 std::unordered_map<IdentifierHash, std::unique_ptr<MM_RawDataCollection>> rdo_map;
66 int nerr_duplicate{0}, nerr_rdo{0};
69 for (
auto& [hash, collection]: rdo_map) {
71 if ((!collection) or collection->empty())
continue;
77 }
else if (!lock.
addOrDelete(std::move(collection)).isSuccess()) {
84 if (nerr_duplicate)
ATH_MSG_WARNING(nerr_duplicate <<
" elinks skipped since the same module hash has been added by a previous ROB fragment");
86 ATH_MSG_ERROR(
"Failed to add "<<nerr_rdo<<
" RDOs into the identifiable container");
87 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
101 if(!externalCacheRDO){
107 ATH_CHECK(rdoContainerHandle.
record(std::make_unique<MM_RawDataContainer>(update.ptr())));
112 if (!(rdoContainer = rdoContainerHandle.
ptr())) {
113 ATH_MSG_ERROR(
"the MM RDO container is null, cannot decode MM data");
114 return StatusCode::FAILURE;
117 return StatusCode::SUCCESS;
128 ROBFragmentList vecRobf;
132 const std::vector<IdentifierHash> hashIDList;
145 if (rdoIdhVect.empty() ||
m_skipDecoding)
return StatusCode::SUCCESS;
147 ROBFragmentList vecRobf;
162 ROBFragmentList vecRobf;
166 const std::vector<IdentifierHash> rdoIdhVect;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
StatusCode addOrDelete(std::unique_ptr< T > ptr)
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
size_t size() const
Duplicate of fullSize for backwards compatability.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
eformat::ROBFragment< PointerType > ROBFragment