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

#include <TGC_RawDataProviderToolMT.h>

Inheritance diagram for Muon::TGC_RawDataProviderToolMT:
Collaboration diagram for Muon::TGC_RawDataProviderToolMT:

Public Member Functions

 TGC_RawDataProviderToolMT (const std::string &t, const std::string &n, const IInterface *p)
 Default constructor. More...
 
virtual ~TGC_RawDataProviderToolMT ()=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...
 

Private Attributes

SG::UpdateHandleKey< TgcRdo_Cachem_rdoContainerCacheKey
 

Detailed Description

A tool to decode TGC ROB fragments into TGC RDO. This version is for athenaMT.

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 25 of file TGC_RawDataProviderToolMT.h.

Constructor & Destructor Documentation

◆ TGC_RawDataProviderToolMT()

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

Default constructor.

Definition at line 11 of file TGC_RawDataProviderToolMT.cxx.

14  :
15  base_class(t, n, p)
16 {
17  declareProperty("TgcContainerCacheKey", m_rdoContainerCacheKey, "Optional external cache for the TGC container");
18 }

◆ ~TGC_RawDataProviderToolMT()

virtual Muon::TGC_RawDataProviderToolMT::~TGC_RawDataProviderToolMT ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ convert() [1/10]

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

New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool.

Definition at line 79 of file TGC_RawDataProviderToolMT.cxx.

79  {
80  return this->convert( Gaudi::Hive::currentContext() );
81 }

◆ convert() [2/10]

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

Definition at line 83 of file TGC_RawDataProviderToolMT.cxx.

84 {
85  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecOfRobf;
86  const std::vector<uint32_t>& robIds = m_hid2re.allRobIds();
87 
88  m_robDataProvider->getROBData(ctx, robIds, vecOfRobf);
89 
90  return convert(vecOfRobf, ctx);
91 }

◆ convert() [3/10]

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

EventContext ones.

Definition at line 40 of file TGC_RawDataProviderToolMT.cxx.

41 {
42 
43  SG::WriteHandle<TgcRdoContainer> rdoContainerHandle(m_rdoContainerKey, ctx);
44 
45  // Split the methods to have one where we use the cache and one where we just setup the container
46  const bool externalCacheRDO = !m_rdoContainerCacheKey.key().empty();
47  if(!externalCacheRDO){
48  ATH_CHECK( rdoContainerHandle.record( std::make_unique<TgcRdoContainer> (m_maxhashtoUse) ) );
49  ATH_MSG_DEBUG( "Created TGC container" );
50  }
51  else{
53  ATH_CHECK(update.isValid());
54  ATH_CHECK(rdoContainerHandle.record (std::make_unique<TgcRdoContainer>( update.ptr() )));
55  ATH_MSG_DEBUG("Created container using cache for " << m_rdoContainerCacheKey.key());
56  }
57 
58  TgcRdoContainer* rdoContainer = rdoContainerHandle.ptr();
59 
60  // this should never happen, but since we dereference the pointer, we should check
61  if(!rdoContainer) {
62  ATH_MSG_ERROR("TGC RDO Container is null, cannot decode TGC data");
63  return StatusCode::FAILURE;
64  }
65 
66  return convertIntoContainer(vecRobs, *rdoContainer);
67 }

◆ convert() [4/10]

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

Definition at line 74 of file TGC_RawDataProviderToolMT.cxx.

75 {
76  return convert(vecRobs, ctx);
77 }

◆ convert() [5/10]

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

Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool.

Definition at line 36 of file TGC_RawDataProviderToolMT.cxx.

36  {
37  return this->convert( vecRobs, Gaudi::Hive::currentContext() );
38 }

◆ convert() [6/10]

StatusCode Muon::TGC_RawDataProviderToolMT::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 69 of file TGC_RawDataProviderToolMT.cxx.

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

◆ convert() [7/10]

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

Definition at line 97 of file TGC_RawDataProviderToolMT.cxx.

98 {
99  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vecOfRobf = getROBData(rdoIdhVect, ctx);
100 
101  return convert(vecOfRobf, rdoIdhVect, ctx);
102 }

◆ convert() [8/10]

StatusCode Muon::TGC_RawDataProviderToolMT::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 93 of file TGC_RawDataProviderToolMT.cxx.

93  {
94  return this->convert( rdoIdhVect, Gaudi::Hive::currentContext() );
95 }

◆ convert() [9/10]

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

convert from vector of ROB IDs is not available

Definition at line 58 of file TGC_RawDataProviderToolMT.h.

58 {return StatusCode::FAILURE;}

◆ convert() [10/10]

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

EventContext ones.

Definition at line 60 of file TGC_RawDataProviderToolMT.h.

60 {return StatusCode::FAILURE;}

◆ initialize()

StatusCode Muon::TGC_RawDataProviderToolMT::initialize ( )
overridevirtual

Standard AlgTool method.

Definition at line 22 of file TGC_RawDataProviderToolMT.cxx.

23 {
24  // call base class initialise
26 
27  // Initialise the container cache if available
28  ATH_CHECK( m_rdoContainerCacheKey.initialize( !m_rdoContainerCacheKey.key().empty() ) );
29 
30  ATH_MSG_INFO( "initialize() successful in " << name() );
31  return StatusCode::SUCCESS;
32 }

Member Data Documentation

◆ m_rdoContainerCacheKey

SG::UpdateHandleKey<TgcRdo_Cache> Muon::TGC_RawDataProviderToolMT::m_rdoContainerCacheKey
private

Definition at line 55 of file TGC_RawDataProviderToolMT.h.


The documentation for this class was generated from the following files:
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Muon::TGC_RawDataProviderToolMT::m_rdoContainerCacheKey
SG::UpdateHandleKey< TgcRdo_Cache > m_rdoContainerCacheKey
Definition: TGC_RawDataProviderToolMT.h:55
Muon::TGC_RawDataProviderToolMT::convert
virtual StatusCode convert() const override
New decoding methods which do not use IROBDataProviderSvc in TgcRdoToPrepDataTool.
Definition: TGC_RawDataProviderToolMT.cxx:79
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::UpdateHandle
Definition: UpdateHandle.h:94
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67