11 #include "eformat/SourceIdentifier.h"
12 using eformat::helper::SourceIdentifier;
18 declareInterface<IMuonRawDataProviderTool>(
this);
27 for (
uint32_t detID : {eformat::MUON_STGC_ENDCAP_A_SIDE, eformat::MUON_STGC_ENDCAP_C_SIDE}) {
28 for (
uint8_t sectorID(0); sectorID < 16; ++sectorID) {
33 uint16_t moduleID = (0x0 << 8) | sectorID;
34 SourceIdentifier sid(
static_cast<eformat::SubDetector
>(detID), moduleID);
35 m_allRobIds.push_back(sid.simple_code());
37 moduleID = (0x1 << 8) | sectorID;
38 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
39 m_allRobIds.push_back(sid.simple_code());
41 moduleID = (0x2 << 8) | sectorID;
42 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
43 m_allRobIds.push_back(sid.simple_code());
45 moduleID = (0x3 << 8) | sectorID;
46 sid = SourceIdentifier(
static_cast<eformat::SubDetector
>(detID), moduleID);
47 m_allRobIds.push_back(sid.simple_code());
51 ATH_CHECK(m_rdoContainerCacheKey.initialize(!m_rdoContainerCacheKey.key().empty()));
53 return StatusCode::SUCCESS;
63 const bool externalCacheRDO = !m_rdoContainerCacheKey.key().empty();
64 if(!externalCacheRDO){
65 ATH_CHECK(rdoContainerHandle.
record(std::make_unique<STGC_RawDataContainer>(m_maxhashtoUse)));
71 ATH_MSG_DEBUG(
"Created STGC RDO container using cache for " << m_rdoContainerCacheKey.key());
75 if (!(rdoContainer = rdoContainerHandle.
ptr())) {
76 ATH_MSG_ERROR(
"The STGC RDO container is null, cannot decode STGC data");
77 return StatusCode::FAILURE;
80 return StatusCode::SUCCESS;
91 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
93 if (rdoIdhVect.empty() || m_skipDecoding)
return StatusCode::SUCCESS;
95 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
96 m_robDataProvider->getROBData(ctx, m_allRobIds, vecRobf);
98 return convertIntoContainer(ctx, vecRobf, rdoIdhVect, *rdoContainer);
108 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
109 if(m_skipDecoding)
return StatusCode::SUCCESS;
111 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
112 m_robDataProvider->getROBData(ctx, m_allRobIds, vecRobf);
115 const std::vector<IdentifierHash> rdoIdhVect;
117 return convertIntoContainer(ctx, vecRobf, rdoIdhVect, *rdoContainer);
123 ATH_CHECK(initRdoContainer(ctx, rdoContainer));
125 if (robIds.empty() || m_skipDecoding)
return StatusCode::SUCCESS;
127 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecRobf;
129 m_robDataProvider->getROBData(ctx, robIds, vecRobf);
132 const std::vector<IdentifierHash> hashIDList;
134 return convertIntoContainer(ctx, vecRobf, hashIDList, *rdoContainer);
141 ATH_MSG_ERROR(
"STGC_RawDataProviderToolMT::convert() Not implemented.");
142 return StatusCode::FAILURE;
147 ATH_MSG_ERROR(
"STGC_RawDataProviderToolMT::convert(const ROBFragmentList& vecRobs) Not implemented.");
148 return StatusCode::FAILURE;
153 ATH_MSG_ERROR(
"STGC_RawDataProviderToolMT::convert(const std::vector<IdentifierHash>& rdoIdhVect) Not implemented.");
154 return StatusCode::FAILURE;
159 ATH_MSG_ERROR(
"STGC_RawDataProviderToolMT::convert(const ROBFragmentList& vecRobs, const std::vector<IdentifierHash>&) Not implemented.");
160 return StatusCode::FAILURE;