ATLAS Offline Software
Loading...
Searching...
No Matches
CSC_RawDataProviderToolCore.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6
15
17
18//================ Constructor =================================================
19
20Muon::CSC_RawDataProviderToolCore::CSC_RawDataProviderToolCore(const std::string& t, const std::string& n, const IInterface* p) :
21 AthAlgTool(t, n, p), m_robDataProvider("ROBDataProviderSvc", n), m_cabling("CSCcablingSvc", n) {}
22
23//================ Initialisation =================================================
24
26 ATH_CHECK(m_cabling.retrieve());
27 ATH_CHECK(m_robDataProvider.retrieve());
28 ATH_MSG_INFO("Retrieved service " << m_robDataProvider);
29
30 ATH_CHECK(m_idHelperSvc.retrieve());
31 m_hid2re.set(&(*m_cabling), &m_idHelperSvc->cscIdHelper());
32
33 // Retrieve decoder
34 ATH_CHECK(m_decoder.retrieve());
35 ATH_MSG_INFO("Retrieved tool " << m_decoder);
36
37 ATH_CHECK(m_containerKey.initialize());
38 ATH_CHECK(m_eventInfoKey.initialize());
39
40 ATH_MSG_INFO("initialize() successful in " << name());
41 return StatusCode::SUCCESS;
42}
43
44//============================================================================================
45
47 const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, const EventContext& ctx,
49 std::set<uint32_t> robIdSet;
51
52 ATH_MSG_DEBUG("Before processing numColls=" << container.numberOfCollections());
53
54 ATH_MSG_DEBUG("vector of ROB ID to decode: size = " << vecRobs.size());
55
56 for (const ROBFragment* frag : vecRobs) {
57 uint32_t robid = frag->rod_source_id();
58
59 // check if this ROBFragment was already decoded (EF case in ROIs
60 if (!robIdSet.insert(robid).second) {
61 ATH_MSG_DEBUG(" ROB Fragment with ID " << std::hex << robid << std::dec << " already decoded, skip");
62 } else {
63 m_decoder->fillCollection(*eventInfo, *frag, container);
64 }
65 }
66
67 ATH_MSG_DEBUG("After processing numColls=" << container.numberOfCollections());
68
69 return StatusCode::SUCCESS;
70}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Defines the ROB data entity. The ROB data is an abstract entity that is used to decouple the raw even...
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This container provides access to collections of CSC RDOs and a mechanism for recording them.
CSC_RawDataProviderToolCore(const std::string &t, const std::string &n, const IInterface *p)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode convertIntoContainer(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, const EventContext &ctx, CscRawDataContainer &container) const
function to decode the passed ROB fragments into the passed container
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual StatusCode initialize() override
standard Athena-Algorithm method
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
ToolHandle< ICSC_ROD_Decoder > m_decoder
member variables for algorithm properties:
ServiceHandle< CSCcablingSvc > m_cabling
SG::WriteHandleKey< CscRawDataContainer > m_containerKey
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27