ATLAS Offline Software
Public Member Functions | Private Member Functions | List of all members
Muon::TGC_RawDataProviderTool Class Reference

#include <TGC_RawDataProviderTool.h>

Inheritance diagram for Muon::TGC_RawDataProviderTool:
Collaboration diagram for Muon::TGC_RawDataProviderTool:

Public Member Functions

 TGC_RawDataProviderTool (const std::string &t, const std::string &n, const IInterface *p)
 Default constructor. More...
 
virtual ~TGC_RawDataProviderTool ()=default
 Default destructor. More...
 
virtual StatusCode initialize () override
 Standard AlgTool method. More...
 
virtual StatusCode convert (const ROBFragmentList &vecRobs) const override
 Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool. More...
 
virtual StatusCode convert (const ROBFragmentList &vecRobs, const std::vector< IdentifierHash > &rdoIdhVect) const override
 Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool with IdentifierHash vector. More...
 
virtual StatusCode convert () const override
 New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool. More...
 
virtual StatusCode convert (const std::vector< IdentifierHash > &rdoIdhVect) const override
 New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool with ID Hash vector. More...
 
virtual StatusCode convert (const ROBFragmentList &, const EventContext &) const override
 EventContext ones. More...
 
virtual StatusCode convert (const ROBFragmentList &, const std::vector< IdentifierHash > &, const EventContext &) const override
 
virtual StatusCode convert (const EventContext &) const override
 
virtual StatusCode convert (const std::vector< IdentifierHash > &, const EventContext &) const override
 

Private Member Functions

virtual StatusCode convert (const std::vector< uint32_t > &) const override
 convert from vector of ROB IDs is not available More...
 
virtual StatusCode convert (const std::vector< uint32_t > &, const EventContext &) const override
 EventContext ones. More...
 

Detailed Description

A tool to decode TGC ROB fragments into TGC RDO. This version is for legacy run-2 athena and is not thread safe.

Author
Zvi Tarem zvi@c.nosp@m.alip.nosp@m.er.co.nosp@m..il
Mark Owen marko.nosp@m.wen@.nosp@m.cern..nosp@m.ch

Definition at line 26 of file TGC_RawDataProviderTool.h.

Constructor & Destructor Documentation

◆ TGC_RawDataProviderTool()

Muon::TGC_RawDataProviderTool::TGC_RawDataProviderTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Default constructor.

Definition at line 11 of file TGC_RawDataProviderTool.cxx.

14  :
15  base_class(t, n, p)
16 {
17 }

◆ ~TGC_RawDataProviderTool()

virtual Muon::TGC_RawDataProviderTool::~TGC_RawDataProviderTool ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ convert() [1/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( ) const
overridevirtual

New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool.

Definition at line 73 of file TGC_RawDataProviderTool.cxx.

73  {
74  return this->convert( Gaudi::Hive::currentContext() );
75 }

◆ convert() [2/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const EventContext &  ctx) const
overridevirtual

Definition at line 77 of file TGC_RawDataProviderTool.cxx.

78 {
79  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecOfRobf;
80  const std::vector<uint32_t>& robIds = m_hid2re.allRobIds();
81 
82  m_robDataProvider->getROBData(ctx, robIds, vecOfRobf);
83 
84  return convert(vecOfRobf, ctx);
85 }

◆ convert() [3/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const ROBFragmentList &  vecRobs,
const EventContext &  ctx 
) const
overridevirtual

EventContext ones.

Definition at line 36 of file TGC_RawDataProviderTool.cxx.

37 {
38 
39  SG::WriteHandle<TgcRdoContainer> rdoContainerHandle(m_rdoContainerKey, ctx);
40 
41  TgcRdoContainer* rdoContainer = nullptr;
42 
43  // if the container is already in store gate, then we have to retrieve from SG
44  if (rdoContainerHandle.isPresent()) {
45  const TgcRdoContainer* rdoContainer_c = nullptr;
46  ATH_CHECK( evtStore()->retrieve( rdoContainer_c, m_rdoContainerKey.key() ) );
47  rdoContainer = const_cast<TgcRdoContainer*>(rdoContainer_c);
48  } else {
49  ATH_CHECK( rdoContainerHandle.record( std::make_unique<TgcRdoContainer> (m_maxhashtoUse) ) );
50  ATH_MSG_DEBUG( "Created TGC container" );
51  rdoContainer = rdoContainerHandle.ptr();
52  }
53 
54  // this should never happen, but since we dereference the pointer, we should check
55  if(!rdoContainer) {
56  ATH_MSG_ERROR("TGC RDO Container is null, cannot decode TGC data");
57  return StatusCode::FAILURE;
58  }
59 
60  return convertIntoContainer(vecRobs, *rdoContainer);
61 }

◆ convert() [4/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const ROBFragmentList &  vecRobs,
const std::vector< IdentifierHash > &  ,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 68 of file TGC_RawDataProviderTool.cxx.

69 {
70  return convert(vecRobs, ctx);
71 }

◆ convert() [5/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const ROBFragmentList &  vecRobs) const
overridevirtual

Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool.

Definition at line 32 of file TGC_RawDataProviderTool.cxx.

32  {
33  return this->convert( vecRobs, Gaudi::Hive::currentContext() );
34 }

◆ convert() [6/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const ROBFragmentList &  vecRobs,
const std::vector< IdentifierHash > &  rdoIdhVect 
) const
overridevirtual

Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool with IdentifierHash vector.

Definition at line 63 of file TGC_RawDataProviderTool.cxx.

63  {
64  // This function does not use the IdentifierHash so we pass to the EventContext function which also does not use it
65  return this->convert( vecRobs, Gaudi::Hive::currentContext() );
66 }

◆ convert() [7/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const std::vector< IdentifierHash > &  rdoIdhVect,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 92 of file TGC_RawDataProviderTool.cxx.

93 {
94  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecOfRobf = getROBData(rdoIdhVect, ctx);
95 
96  return convert(vecOfRobf, rdoIdhVect, ctx);
97 }

◆ convert() [8/10]

StatusCode Muon::TGC_RawDataProviderTool::convert ( const std::vector< IdentifierHash > &  rdoIdhVect) const
overridevirtual

New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool with ID Hash vector.

Definition at line 87 of file TGC_RawDataProviderTool.cxx.

87  {
88  return this->convert( rdoIdhVect, Gaudi::Hive::currentContext() );
89 }

◆ convert() [9/10]

virtual StatusCode Muon::TGC_RawDataProviderTool::convert ( const std::vector< uint32_t > &  ) const
inlineoverrideprivatevirtual

convert from vector of ROB IDs is not available

Definition at line 57 of file TGC_RawDataProviderTool.h.

57 {return StatusCode::FAILURE;}

◆ convert() [10/10]

virtual StatusCode Muon::TGC_RawDataProviderTool::convert ( const std::vector< uint32_t > &  ,
const EventContext &   
) const
inlineoverrideprivatevirtual

EventContext ones.

Definition at line 59 of file TGC_RawDataProviderTool.h.

59 {return StatusCode::FAILURE;}

◆ initialize()

StatusCode Muon::TGC_RawDataProviderTool::initialize ( )
overridevirtual

Standard AlgTool method.

Definition at line 21 of file TGC_RawDataProviderTool.cxx.

22 {
23  // call base class initialise
25 
26  ATH_MSG_INFO( "initialize() successful in " << name() );
27  return StatusCode::SUCCESS;
28 }

The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TgcRdoContainer
Definition: TgcRdoContainer.h:25
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::TGC_RawDataProviderToolCore::initialize
virtual StatusCode initialize()
Standard AlgTool method.
Definition: TGC_RawDataProviderToolCore.cxx:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Muon::TGC_RawDataProviderTool::convert
virtual StatusCode convert() const override
New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool.
Definition: TGC_RawDataProviderTool.cxx:73