ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::NSWTP_RawDataProviderTool Class Reference

#include <NSWTP_RawDataProviderTool.h>

Inheritance diagram for Muon::NSWTP_RawDataProviderTool:
Collaboration diagram for Muon::NSWTP_RawDataProviderTool:

Public Member Functions

virtual ~NSWTP_RawDataProviderTool ()=default
StatusCode initialize () override
StatusCode convert (const std::vector< IdentifierHash > &chamberHashes, const EventContext &ctx) const override
StatusCode convert (const std::vector< uint32_t > &robIDS, const EventContext &ctx) const override
StatusCode convert (const EventContext &ctx) const override
virtual StatusCode convert (const ROBFragmentList &) const
virtual StatusCode convert (const ROBFragmentList &, const std::vector< IdentifierHash > &) const
virtual StatusCode convert () const
 the new ones
virtual StatusCode convert (const std::vector< IdentifierHash > &) const
 for a selection of rdo collections
virtual StatusCode convert (const std::vector< uint32_t > &) const
virtual StatusCode convert (const ROBFragmentList &, const EventContext &) const
virtual StatusCode convert (const ROBFragmentList &, const std::vector< IdentifierHash > &, const EventContext &) const

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< INSWTP_ROD_Decoderm_decoder {this, "Decoder", "Muon::NSWTP_ROD_Decoder/NSWTP_ROD_Decoder"}
ServiceHandle< IROBDataProviderSvcm_robDataProvider {this, "RobProviderSvc", "ROBDataProviderSvc"}
SG::WriteHandleKey< xAOD::NSWTPRDOContainerm_rdoContainerKey {this, "RdoLocation", "", "Name of of the RDO container to write to"}

Detailed Description

Definition at line 19 of file NSWTP_RawDataProviderTool.h.

Constructor & Destructor Documentation

◆ ~NSWTP_RawDataProviderTool()

virtual Muon::NSWTP_RawDataProviderTool::~NSWTP_RawDataProviderTool ( )
virtualdefault

Member Function Documentation

◆ convert() [1/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( ) const
inline

the new ones

for the entire event

Definition at line 31 of file IMuonRawDataProviderTool.h.

◆ convert() [2/10]

StatusCode Muon::NSWTP_RawDataProviderTool::convert ( const EventContext & ctx) const
override

Definition at line 23 of file NSWTP_RawDataProviderTool.cxx.

23 {
24 // Get all ROBs!
25 ROBFragmentList fragments;
26 std::vector<uint32_t> robIDs;
27
28 // Generate all possible ROB IDs, aka Source Identifiers
29 // Valid values are: 0x00{6d,6e}002[0..f]
30 for (uint32_t detectorID : {eformat::MUON_STGC_ENDCAP_A_SIDE, eformat::MUON_STGC_ENDCAP_C_SIDE}) { // 0x6D, 0x6E
31 for (uint8_t sector{}; sector < 16; sector++) {
32 uint16_t moduleID = (0x1 << 4) | sector;
33 eformat::helper::SourceIdentifier sourceID{static_cast<eformat::SubDetector>(detectorID), moduleID};
34 robIDs.push_back(sourceID.simple_code());
35 }
36 }
37
38 m_robDataProvider->getROBData(ctx, robIDs, fragments);
39 ATH_MSG_DEBUG(__PRETTY_FUNCTION__ << ": Got " << fragments.size() << " fragments");
40 SG::WriteHandle<xAOD::NSWTPRDOContainer> rdoContainerHandle{m_rdoContainerKey, ctx};
41 xAOD::NSWTPRDOContainer* pContainer{nullptr};
42
43 // Retrieve container, if it exists in the event store; otherwise, create one
44
45 ATH_CHECK(rdoContainerHandle.record(std::make_unique<xAOD::NSWTPRDOContainer>(), std::make_unique<xAOD::NSWTPRDOAuxContainer>()));
46 pContainer = rdoContainerHandle.ptr();
47 for (const auto *const fragment : fragments) {
48 // TODO should an error here be a hard failure?
49 ATH_CHECK(m_decoder->fillCollection(*fragment, *pContainer));
50 }
51 return StatusCode::SUCCESS;
52}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
ToolHandle< INSWTP_ROD_Decoder > m_decoder
SG::WriteHandleKey< xAOD::NSWTPRDOContainer > m_rdoContainerKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
setWord1 uint16_t
NSWTPRDOContainer_v1 NSWTPRDOContainer
Define the version of the NRPC RDO container.

◆ convert() [3/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const ROBFragmentList & ) const
inline

Definition at line 28 of file IMuonRawDataProviderTool.h.

28{ return StatusCode::FAILURE; }

◆ convert() [4/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const ROBFragmentList & ,
const EventContext &  ) const
inline

Definition at line 36 of file IMuonRawDataProviderTool.h.

36{return StatusCode::FAILURE;}

◆ convert() [5/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const ROBFragmentList & ,
const std::vector< IdentifierHash > &  ) const
inline

Definition at line 29 of file IMuonRawDataProviderTool.h.

29{ return StatusCode::FAILURE; }

◆ convert() [6/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const ROBFragmentList & ,
const std::vector< IdentifierHash > & ,
const EventContext &  ) const
inline

Definition at line 37 of file IMuonRawDataProviderTool.h.

37{return StatusCode::FAILURE;}

◆ convert() [7/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const std::vector< IdentifierHash > & ) const
inline

for a selection of rdo collections

Definition at line 32 of file IMuonRawDataProviderTool.h.

◆ convert() [8/10]

StatusCode Muon::NSWTP_RawDataProviderTool::convert ( const std::vector< IdentifierHash > & chamberHashes,
const EventContext & ctx ) const
override

Definition at line 55 of file NSWTP_RawDataProviderTool.cxx.

56 {
57 ATH_MSG_ERROR(__PRETTY_FUNCTION__<<" not implemented");
58 return StatusCode::FAILURE;
59}
#define ATH_MSG_ERROR(x)

◆ convert() [9/10]

virtual StatusCode Muon::IMuonRawDataProviderTool::convert ( const std::vector< uint32_t > & ) const
inline

Definition at line 33 of file IMuonRawDataProviderTool.h.

33{return StatusCode::FAILURE;}

◆ convert() [10/10]

StatusCode Muon::NSWTP_RawDataProviderTool::convert ( const std::vector< uint32_t > & robIDS,
const EventContext & ctx ) const
override

Definition at line 60 of file NSWTP_RawDataProviderTool.cxx.

61 {
62 ATH_MSG_ERROR(__PRETTY_FUNCTION__<<" not implemented");
63 return StatusCode::FAILURE;
64}

◆ initialize()

StatusCode Muon::NSWTP_RawDataProviderTool::initialize ( )
override

Definition at line 10 of file NSWTP_RawDataProviderTool.cxx.

11{
12 ATH_CHECK(m_decoder.retrieve());
13 ATH_CHECK(m_idHelperSvc.retrieve());
14 ATH_CHECK(m_robDataProvider.retrieve());
15 ATH_CHECK(m_rdoContainerKey.initialize());
16
17 return StatusCode::SUCCESS;
18}
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc

Member Data Documentation

◆ m_decoder

ToolHandle<INSWTP_ROD_Decoder> Muon::NSWTP_RawDataProviderTool::m_decoder {this, "Decoder", "Muon::NSWTP_ROD_Decoder/NSWTP_ROD_Decoder"}
private

Definition at line 40 of file NSWTP_RawDataProviderTool.h.

40{this, "Decoder", "Muon::NSWTP_ROD_Decoder/NSWTP_ROD_Decoder"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::NSWTP_RawDataProviderTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 39 of file NSWTP_RawDataProviderTool.h.

39{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_rdoContainerKey

SG::WriteHandleKey<xAOD::NSWTPRDOContainer> Muon::NSWTP_RawDataProviderTool::m_rdoContainerKey {this, "RdoLocation", "", "Name of of the RDO container to write to"}
private

Definition at line 42 of file NSWTP_RawDataProviderTool.h.

42{this, "RdoLocation", "", "Name of of the RDO container to write to"};

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> Muon::NSWTP_RawDataProviderTool::m_robDataProvider {this, "RobProviderSvc", "ROBDataProviderSvc"}
private

Definition at line 41 of file NSWTP_RawDataProviderTool.h.

41{this, "RobProviderSvc", "ROBDataProviderSvc"};

The documentation for this class was generated from the following files: