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

#include <CSC_RawDataProviderToolCore.h>

Inheritance diagram for Muon::CSC_RawDataProviderToolCore:
Collaboration diagram for Muon::CSC_RawDataProviderToolCore:

Public Member Functions

 CSC_RawDataProviderToolCore (const std::string &t, const std::string &n, const IInterface *p)
virtual ~CSC_RawDataProviderToolCore ()=default
 default destructor
virtual StatusCode initialize () override
 standard Athena-Algorithm method
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

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
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

ToolHandle< ICSC_ROD_Decoderm_decoder {this, "Decoder", "Muon::CscROD_Decoder/CscROD_Decoder"}
 member variables for algorithm properties:
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
SG::WriteHandleKey< CscRawDataContainerm_containerKey
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoKey", "EventInfo", ""}
CSC_Hid2RESrcID m_hid2re
ServiceHandle< IROBDataProviderSvcm_robDataProvider
ServiceHandle< CSCcablingSvcm_cabling

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 23 of file CSC_RawDataProviderToolCore.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CSC_RawDataProviderToolCore()

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

Definition at line 20 of file CSC_RawDataProviderToolCore.cxx.

20 :
21 AthAlgTool(t, n, p), m_robDataProvider("ROBDataProviderSvc", n), m_cabling("CSCcablingSvc", n) {}
AthAlgTool()
Default constructor:
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
ServiceHandle< CSCcablingSvc > m_cabling

◆ ~CSC_RawDataProviderToolCore()

virtual Muon::CSC_RawDataProviderToolCore::~CSC_RawDataProviderToolCore ( )
virtualdefault

default destructor

Member Function Documentation

◆ convertIntoContainer()

StatusCode Muon::CSC_RawDataProviderToolCore::convertIntoContainer ( const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > & vecRobs,
const EventContext & ctx,
CscRawDataContainer & container ) const
protected

function to decode the passed ROB fragments into the passed container

Definition at line 46 of file CSC_RawDataProviderToolCore.cxx.

48 {
49 std::set<uint32_t> robIdSet;
50 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
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_MSG_DEBUG(x)
virtual size_t numberOfCollections() const override final
return number of collections
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ToolHandle< ICSC_ROD_Decoder > m_decoder
member variables for algorithm properties:
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
setEventNumber uint32_t

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode Muon::CSC_RawDataProviderToolCore::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 25 of file CSC_RawDataProviderToolCore.cxx.

25 {
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::WriteHandleKey< CscRawDataContainer > m_containerKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_cabling

ServiceHandle<CSCcablingSvc> Muon::CSC_RawDataProviderToolCore::m_cabling
protected

Definition at line 49 of file CSC_RawDataProviderToolCore.h.

◆ m_containerKey

SG::WriteHandleKey<CscRawDataContainer> Muon::CSC_RawDataProviderToolCore::m_containerKey
protected
Initial value:
{this, "RdoLocation", "CSCRDO",
"Name of the CSCRDO produced by RawDataProvider"}

Definition at line 43 of file CSC_RawDataProviderToolCore.h.

43 {this, "RdoLocation", "CSCRDO",
44 "Name of the CSCRDO produced by RawDataProvider"};

◆ m_decoder

ToolHandle<ICSC_ROD_Decoder> Muon::CSC_RawDataProviderToolCore::m_decoder {this, "Decoder", "Muon::CscROD_Decoder/CscROD_Decoder"}
protected

member variables for algorithm properties:

Definition at line 39 of file CSC_RawDataProviderToolCore.h.

39{this, "Decoder", "Muon::CscROD_Decoder/CscROD_Decoder"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> Muon::CSC_RawDataProviderToolCore::m_eventInfoKey {this, "EventInfoKey", "EventInfo", ""}
protected

Definition at line 45 of file CSC_RawDataProviderToolCore.h.

45{this, "EventInfoKey", "EventInfo", ""};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hid2re

CSC_Hid2RESrcID Muon::CSC_RawDataProviderToolCore::m_hid2re
protected

Definition at line 46 of file CSC_RawDataProviderToolCore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::CSC_RawDataProviderToolCore::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
protected

Definition at line 41 of file CSC_RawDataProviderToolCore.h.

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

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> Muon::CSC_RawDataProviderToolCore::m_robDataProvider
protected

Definition at line 48 of file CSC_RawDataProviderToolCore.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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