8#include "eformat/SourceIdentifier.h"
9using eformat::helper::SourceIdentifier;
26 for (uint32_t detID : {eformat::MUON_STGC_ENDCAP_A_SIDE, eformat::MUON_STGC_ENDCAP_C_SIDE}) {
27 for (uint8_t sectorID(0); sectorID < 16; ++sectorID) {
32 uint16_t moduleID = (0x0 << 8) | sectorID;
33 SourceIdentifier sid(
static_cast<eformat::SubDetector
>(detID), moduleID);
36 moduleID = (0x1 << 8) | sectorID;
37 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
40 moduleID = (0x2 << 8) | sectorID;
41 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
44 moduleID = (0x3 << 8) | sectorID;
45 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
51 return StatusCode::SUCCESS;
57 const ROBFragmentList& vecRobs,
58 const std::vector<IdentifierHash>& rdoIdhVect,
62 std::unordered_map<IdentifierHash, std::unique_ptr<STGC_RawDataCollection>> rdo_map;
71 int nerr_duplicate{0}, nerr_rdo{0};
74 for (
auto& [hash, collection]: rdo_map) {
76 if ((!collection) or collection->empty())
continue;
82 }
else if (!lock.
addOrDelete(std::move(collection)).isSuccess()) {
90 if (nerr_duplicate)
ATH_MSG_WARNING(nerr_duplicate <<
" elinks skipped since the same module hash has been added by a previous ROB fragment");
92 ATH_MSG_ERROR(
"Failed to add "<<nerr_rdo<<
" RDOs into the identifiable container");
93 return StatusCode::FAILURE;
97 return StatusCode::SUCCESS;
108 if(!externalCacheRDO){
114 ATH_CHECK(rdoContainerHandle.
record(std::make_unique<STGC_RawDataContainer>(update.ptr())));
119 if (!(rdoContainer = rdoContainerHandle.
ptr())) {
120 ATH_MSG_ERROR(
"The STGC RDO container is null, cannot decode STGC data");
121 return StatusCode::FAILURE;
124 return StatusCode::SUCCESS;
137 if (rdoIdhVect.empty() ||
m_skipDecoding)
return StatusCode::SUCCESS;
139 ROBFragmentList vecRobf;
154 ROBFragmentList vecRobf;
158 const std::vector<IdentifierHash> rdoIdhVect;
170 ROBFragmentList vecRobf;
175 const std::vector<IdentifierHash> hashIDList;
#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