ATLAS Offline Software
MetaHandleKey.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef STOREGATE_METAHANDLEKEY_H
6 #define STOREGATE_METAHANDLEKEY_H
7 
10 #include "StoreGate/StoreGateSvc.h"
12 #include "GaudiKernel/ServiceHandle.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/IClassIDSvc.h"
15 
16 namespace SG {
17 
18  template <class T>
19  class MetaHandleKey : public VarHandleKey {
20 
21  public:
22  MetaHandleKey( const std::string& key,
23  const std::string& dbKey,
25 
27 
28  const MetaContBase::SourceID& dbKey() const { return m_dbKey; }
30 
31  protected:
32  bool isInit() const { return m_isInit; }
33 
34  MetaCont<T>* getContainer ATLAS_NOT_CONST_THREAD_SAFE () const { return m_cont; }
35 
37 
38  private:
39 
41  MetaCont<T>* m_cont{nullptr};
42 
44 
45  bool m_isInit {false};
46 
47  };
48 
49 
50 }
51 
53 
54 #endif
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::MetaHandleKey::MetaHandleKey
MetaHandleKey(const std::string &key, const std::string &dbKey, Gaudi::DataHandle::Mode a)
SG::MetaHandleKey::m_cont
MetaCont< T > * m_cont
Definition: MetaHandleKey.h:41
SG::MetaHandleKey::initialize
StatusCode initialize()
SG::MetaHandleKey::m_dbKey
MetaContBase::SourceID m_dbKey
Definition: MetaHandleKey.h:43
MetaHandleKey.icc
SG::MetaHandleKey::getStore
StoreGateSvc * getStore() const
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::MetaHandleKey::m_store
ServiceHandle< StoreGateSvc > m_store
Definition: MetaHandleKey.h:40
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
MetaCont
Definition: MetaCont.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::MetaHandleKey::isInit
bool isInit() const
Definition: MetaHandleKey.h:32
SG::MetaHandleKey::m_isInit
bool m_isInit
Definition: MetaHandleKey.h:45
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
SG::MetaHandleKey::setDbKey
void setDbKey(const MetaContBase::SourceID &dbKey)
Definition: MetaHandleKey.h:29
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition: StoreGate/StoreGate/VarHandleKey.h:62
a
TList * a
Definition: liststreamerinfos.cxx:10
MetaContBase::SourceID
SG::SourceID SourceID
Definition: MetaCont.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
StoreGateSvc.h
SG::MetaHandleKey
Definition: MetaHandleKey.h:19
MetaCont.h
SG::MetaHandleKey::ATLAS_NOT_CONST_THREAD_SAFE
MetaCont< T > *getContainer ATLAS_NOT_CONST_THREAD_SAFE() const
Definition: MetaHandleKey.h:34
SG::MetaHandleKey::dbKey
const MetaContBase::SourceID & dbKey() const
Definition: MetaHandleKey.h:28
ServiceHandle< StoreGateSvc >