11 #include "eformat/SourceIdentifier.h"
12 using eformat::helper::SourceIdentifier;
18 declareInterface<IMuonRawDataProviderTool>(
this);
28 for (
uint32_t detID : {eformat::MUON_MMEGA_ENDCAP_A_SIDE, eformat::MUON_MMEGA_ENDCAP_C_SIDE}) {
29 for (
uint8_t sectorID(0); sectorID < 16; ++sectorID) {
34 uint16_t moduleID = (0x0 << 8) | sectorID;
35 SourceIdentifier sid(
static_cast<eformat::SubDetector
>(detID), moduleID);
36 m_allRobIds.push_back(sid.simple_code());
38 moduleID = (0x1 << 8) | sectorID;
39 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
40 m_allRobIds.push_back(sid.simple_code());
42 moduleID = (0x2 << 8) | sectorID;
43 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
44 m_allRobIds.push_back(sid.simple_code());
49 ATH_CHECK(m_rdoContainerCacheKey.initialize(!m_rdoContainerCacheKey.key().empty()));
51 return StatusCode::SUCCESS;
62 const bool externalCacheRDO = !m_rdoContainerCacheKey.key().empty();
63 if(!externalCacheRDO){
64 ATH_CHECK(rdoContainerHandle.
record(std::make_unique<MM_RawDataContainer>(m_maxhashtoUse)));
70 ATH_MSG_DEBUG(
"Created MM container using cache for " << m_rdoContainerCacheKey.key());
74 if (!(rdoContainer = rdoContainerHandle.
ptr())) {
75 ATH_MSG_ERROR(
"the MM RDO container is null, cannot decode MM data");
76 return StatusCode::FAILURE;
79 return StatusCode::SUCCESS;
86 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
88 if (robIds.empty() || m_skipDecoding)
return StatusCode::SUCCESS;
90 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
92 m_robDataProvider->getROBData(ctx, robIds, vecRobf);
95 const std::vector<IdentifierHash> hashIDList;
96 return convertIntoContainer(ctx, vecRobf, hashIDList, *rdoContainer);
106 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
108 if (rdoIdhVect.empty() || m_skipDecoding)
return StatusCode::SUCCESS;
110 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
111 m_robDataProvider->getROBData(ctx, m_allRobIds, vecRobf);
113 return convertIntoContainer(ctx, vecRobf, rdoIdhVect, *rdoContainer);
123 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
124 if(m_skipDecoding)
return StatusCode::SUCCESS;
126 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
127 m_robDataProvider->getROBData(ctx, m_allRobIds, vecRobf);
130 const std::vector<IdentifierHash> rdoIdhVect;
132 return convertIntoContainer(ctx, vecRobf, rdoIdhVect, *rdoContainer);
139 ATH_MSG_ERROR(
"MM_RawDataProviderToolMT::convert() Not implemented.");
140 return StatusCode::FAILURE;
145 ATH_MSG_ERROR(
"MM_RawDataProviderToolMT::convert(const ROBFragmentList&) not implemented.");
146 return StatusCode::FAILURE;
151 ATH_MSG_ERROR(
"MM_RawDataProviderToolMT::convert(const std::vector<IdentifierHash>&) not implemented.");
152 return StatusCode::FAILURE;
157 ATH_MSG_ERROR(
"MM_RawDataProviderToolMT::convert(const ROBFragmentList&) not implemented.");
158 return StatusCode::FAILURE;