ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
MuonCalibStreamAddressProviderSvc Class Reference

#include <MuonCalibStreamAddressProviderSvc.h>

Inheritance diagram for MuonCalibStreamAddressProviderSvc:
Collaboration diagram for MuonCalibStreamAddressProviderSvc:

Public Types

typedef std::list< SG::TransientAddress * > tadList
 
typedef tadList::iterator tadListIterator
 

Public Member Functions

 MuonCalibStreamAddressProviderSvc (const std::string &name, ISvcLocator *svcloc)
 Standard constructor. More...
 
virtual ~MuonCalibStreamAddressProviderSvc ()
 Standard Destructor. More...
 
virtual StatusCode initialize ()
 Initialize the service. More...
 
virtual StatusCode preLoadAddresses (StoreID::type id, tadList &tlist)
 get all addresses from Provider : Called before Begin Event More...
 
virtual StatusCode updateAddress (StoreID::type tp, SG::TransientAddress *tad, const EventContext &)
 update an existing transient Address More...
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (IAddressProvider, 1, 0)
 
virtual StatusCode loadAddresses (StoreID::type, tadList &)
 get all new addresses from Provider for this Event. More...
 

Private Attributes

std::vector< std::string > m_typeNames
 
IMuonCalibStreamDataProviderSvcm_dataSvc
 
std::map< CLID, std::set< std::string > > m_clidKey
 

Friends

class SvcFactory< MuonCalibStreamAddressProviderSvc >
 Allow the factory class access to the constructor. More...
 

Detailed Description

Definition at line 16 of file MuonCalibStreamAddressProviderSvc.h.

Member Typedef Documentation

◆ tadList

typedef std::list<SG::TransientAddress*> IAddressProvider::tadList
inherited

Definition at line 32 of file IAddressProvider.h.

◆ tadListIterator

typedef tadList::iterator IAddressProvider::tadListIterator
inherited

Definition at line 33 of file IAddressProvider.h.

Constructor & Destructor Documentation

◆ MuonCalibStreamAddressProviderSvc()

MuonCalibStreamAddressProviderSvc::MuonCalibStreamAddressProviderSvc ( const std::string &  name,
ISvcLocator *  svcloc 
)

Standard constructor.

Definition at line 12 of file MuonCalibStreamAddressProviderSvc.cxx.

12  :
13  AthService(name, svc), m_dataSvc(nullptr) {
14  m_typeNames.push_back("Muon::MdtPrepDataContainer/MDT_DriftCircles");
15  m_typeNames.push_back("RpcPadContainer/RPCPAD");
16  m_typeNames.push_back("TgcRdoContainer/TGCRDO");
17  //m_typeNames.push_back("CscRawDataContainer/CSCRDO");
18  m_typeNames.push_back("xAOD::EventInfo");
19  declareProperty("TypeNames", m_typeNames);
20 }

◆ ~MuonCalibStreamAddressProviderSvc()

MuonCalibStreamAddressProviderSvc::~MuonCalibStreamAddressProviderSvc ( )
virtual

Standard Destructor.

Definition at line 23 of file MuonCalibStreamAddressProviderSvc.cxx.

23 {}

Member Function Documentation

◆ DeclareInterfaceID()

IAddressProvider::DeclareInterfaceID ( IAddressProvider  ,
,
 
)
inherited

◆ initialize()

StatusCode MuonCalibStreamAddressProviderSvc::initialize ( )
virtual

Initialize the service.

Definition at line 26 of file MuonCalibStreamAddressProviderSvc.cxx.

26  {
27  ATH_CHECK(service("MuonCalibStreamDataProviderSvc", m_dataSvc));
28  ATH_MSG_INFO(" initialized ");
29  return StatusCode::SUCCESS;
30 }

◆ loadAddresses()

virtual StatusCode IAddressProvider::loadAddresses ( StoreID::type  ,
tadList  
)
inlinevirtualinherited

get all new addresses from Provider for this Event.

Reimplemented in LArFlatConditionSvc, Athena::xAODEventSelector, IOVDbSvc, MixingEventSelector, AddressRemappingSvc, AthenaPoolAddressProviderSvc, and CondProxyProvider.

Definition at line 42 of file IAddressProvider.h.

43  {
44  return StatusCode::SUCCESS;
45  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ preLoadAddresses()

StatusCode MuonCalibStreamAddressProviderSvc::preLoadAddresses ( StoreID::type  ,
tadList  
)
virtual

get all addresses from Provider : Called before Begin Event

Reimplemented from IAddressProvider.

Definition at line 32 of file MuonCalibStreamAddressProviderSvc.cxx.

32  {
33  ATH_MSG_DEBUG(" call MuonCalibStreamAddressProviderSvc::preLoadAddresses");
34 
35  if (idp != StoreID::EVENT_STORE) {
36  ATH_MSG_DEBUG("idp = " << idp << " != StoreID::EVENT_STORE; not creating TADs");
37  return StatusCode::SUCCESS;
38  } else {
39  ATH_MSG_DEBUG("idp = " << idp << " == StoreID::EVENT_STORE; Creating TADs for muon detectors!");
40  }
41 
42  // only deal with event store.
43  std::vector<std::string>::const_iterator it = m_typeNames.begin();
44  std::vector<std::string>::const_iterator it_e = m_typeNames.end();
45 
46  IClassIDSvc *clidSvc;
47  ATH_CHECK(service("ClassIDSvc", clidSvc));
48 
49  for (; it != it_e; ++it) {
50  ListItem item(*it);
51  std::string t = item.type();
52  std::string nm = item.name();
53 
54  CLID id;
55  ATH_CHECK(clidSvc->getIDOfTypeName(t, id));
56 
58  tlist.push_back(tad);
59  ATH_MSG_DEBUG(" created TAD for (type,clid,name,TAD)" << t << " " << id << " " << nm);
60 
61  // save the clid and key.
62  m_clidKey[id].insert(nm);
63  }
64  return StatusCode::SUCCESS;
65 } // MuonCalibStreamAddressProviderSvc::preLoadAddresses()

◆ updateAddress()

StatusCode MuonCalibStreamAddressProviderSvc::updateAddress ( StoreID::type  tp,
SG::TransientAddress tad,
const EventContext &   
)
virtual

update an existing transient Address

Implements IAddressProvider.

Definition at line 68 of file MuonCalibStreamAddressProviderSvc.cxx.

68  {
69  CLID clid = tad->clID();
70  std::string nm = tad->name();
71  std::map<CLID, std::set<std::string> >::const_iterator it = m_clidKey.find(clid);
72 
73  if (it == m_clidKey.end()) return StatusCode::FAILURE;
74 
75  if ((*it).second.count(nm) == 0) return StatusCode::FAILURE;
76 
77  ATH_MSG_DEBUG(" creating address for " << clid << " " << nm);
78 
80  tad->setAddress(add);
81  return StatusCode::SUCCESS;
82 }

Friends And Related Function Documentation

◆ SvcFactory< MuonCalibStreamAddressProviderSvc >

Allow the factory class access to the constructor.

Definition at line 1 of file MuonCalibStreamAddressProviderSvc.h.

Member Data Documentation

◆ m_clidKey

std::map<CLID, std::set<std::string> > MuonCalibStreamAddressProviderSvc::m_clidKey
private

Definition at line 38 of file MuonCalibStreamAddressProviderSvc.h.

◆ m_dataSvc

IMuonCalibStreamDataProviderSvc* MuonCalibStreamAddressProviderSvc::m_dataSvc
private

Definition at line 37 of file MuonCalibStreamAddressProviderSvc.h.

◆ m_typeNames

std::vector<std::string> MuonCalibStreamAddressProviderSvc::m_typeNames
private

Definition at line 36 of file MuonCalibStreamAddressProviderSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
MuonCalibStreamAddressProviderSvc::m_dataSvc
IMuonCalibStreamDataProviderSvc * m_dataSvc
Definition: MuonCalibStreamAddressProviderSvc.h:37
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
query_example.tlist
tlist
Definition: query_example.py:25
skel.it
it
Definition: skel.GENtoEVGEN.py:423
SG::TransientAddress
Definition: TransientAddress.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:208
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:201
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
item
Definition: ItemListSvc.h:43
SG::TransientAddress::setAddress
void setAddress(IOpaqueAddress *pAddress)
Retrieve primary clid.
Definition: TransientAddress.cxx:172
MuonCalibStreamAddressProviderSvc::m_clidKey
std::map< CLID, std::set< std::string > > m_clidKey
Definition: MuonCalibStreamAddressProviderSvc.h:38
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
MuonCalibStreamAddress
Definition: MuonCalibStreamAddress.h:14
MuonCalibStreamAddressProviderSvc::m_typeNames
std::vector< std::string > m_typeNames
Definition: MuonCalibStreamAddressProviderSvc.h:36