ATLAS Offline Software
Loading...
Searching...
No Matches
MuonRawDataProvider.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8#include <vector>
9
11
13 ATH_MSG_DEBUG("MuonRawDataProvider::initialize");
15
16 ATH_CHECK(m_rawDataTool.retrieve());
18
19 ATH_CHECK(m_regselTool.retrieve(EnableTool{m_seededDecoding}));
20
21 return StatusCode::SUCCESS;
22}
23
24StatusCode Muon::MuonRawDataProvider::execute(const EventContext& ctx) const {
25 ATH_MSG_VERBOSE("MuonRawDataProvider::execute");
26
27 if (!m_seededDecoding) {
28 const StatusCode sc = m_rawDataTool->convert(ctx);
29 if (sc.isFailure()) {
30 ATH_MSG_ERROR("BS conversion into RDOs failed");
31 return m_failOnConvertError ? StatusCode::FAILURE : StatusCode::SUCCESS;
32 }
33 return StatusCode::SUCCESS;
34 }
35
37 if (!muonRoI.isValid()) {
38 ATH_MSG_WARNING("Cannot retrieve muonRoI " << m_roiCollectionKey.key());
39 return m_ignoreMissingRoIs ? StatusCode::SUCCESS : StatusCode::FAILURE;
40 }
41
42 if (m_useHashIds) {
43 std::vector<IdentifierHash> hashIds;
44 // Collect hash IDs from all RoIs first, then call convert once
45 for (const TrigRoiDescriptor* roi : *muonRoI) {
46 ATH_MSG_DEBUG("Get Hash IDs for RoI " << *roi);
47 m_regselTool->lookup(ctx)->HashIDList(*roi, hashIds);
48 }
49 const StatusCode sc = m_rawDataTool->convert(hashIds, ctx);
50 if (sc.isFailure()) {
51 ATH_MSG_ERROR("RoI seeded BS conversion into RDOs failed");
52 return m_failOnConvertError ? StatusCode::FAILURE : StatusCode::SUCCESS;
53 }
54 return StatusCode::SUCCESS;
55 }
56
57 std::vector<uint32_t> robs;
58 // Collect ROBs from all RoIs first, then call convert once
59 for (const TrigRoiDescriptor* roi : *muonRoI) {
60 ATH_MSG_DEBUG("Get ROBs for RoI " << *roi);
61 m_regselTool->lookup(ctx)->ROBIDList(*roi, robs);
62 }
63 const StatusCode sc = m_rawDataTool->convert(robs, ctx);
64 if (sc.isFailure()) {
65 ATH_MSG_ERROR("RoI seeded BS conversion into RDOs failed");
66 return m_failOnConvertError ? StatusCode::FAILURE : StatusCode::SUCCESS;
67 }
68
69 return StatusCode::SUCCESS;
70}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
Handle class for reading from StoreGate.
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
Gaudi::Property< bool > m_useHashIds
Gaudi::Property< bool > m_ignoreMissingRoIs
StatusCode execute(const EventContext &ctx) const override
StatusCode initialize() override
Gaudi::Property< bool > m_seededDecoding
Gaudi::Property< bool > m_failOnConvertError
ToolHandle< Muon::IMuonRawDataProviderTool > m_rawDataTool
ToolHandle< IRegSelTool > m_regselTool
virtual bool isValid() override final
Can the handle be successfully dereferenced?
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...