ATLAS Offline Software
Loading...
Searching...
No Matches
CondHandleKey.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef STOREGATE_CONDHANDLEKEY_H
6#define STOREGATE_CONDHANDLEKEY_H 1
7
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/MsgStream.h"
14#include "GaudiKernel/IClassIDSvc.h"
15
16namespace SG {
17
18 template <class T>
19 class CondHandleKey : public VarHandleKey {
20
21 public:
22 CondHandleKey( const std::string& key,
23 const std::string& dbKey,
24 Gaudi::DataHandle::Mode a );
25
26// CondHandleKey& operator= (const std::string& sgkey);
27
28 StatusCode initialize(bool used = true);
30
31 const std::string& dbKey() const { return m_dbKey; }
32 void setDbKey(const std::string& dbKey) { m_dbKey = dbKey; }
33
34
42 virtual StatusCode start() override;
43
44
45 protected:
46 bool isInit() const { return m_isInit; }
47
48 // Deliberately returning a non-const pointer here from a const
49 // member function. We don't own the CondCont, we just reference it.
50 // The Handle<> classes need to get a non-const CondCont from a
51 // const HandleKey<>.
52 CondCont<T>* getCC ATLAS_NOT_CONST_THREAD_SAFE () const { return m_cc; }
53
55
56 private:
57
60
61 std::string m_dbKey{""};
62
63 bool m_isInit {false};
64
65 };
66
67
68}
69
71
72#endif
Hold mappings of ranges to condition objects.
static Double_t a
A property holding a SG store/key/clid from which a VarHandle is made.
Define macros for attributes used to control the static checker.
Hold mapping of ranges to condition objects.
Definition CondCont.h:889
StatusCode initialize(AllowEmptyEnum)
void setDbKey(const std::string &dbKey)
CondHandleKey(const std::string &key, const std::string &dbKey, Gaudi::DataHandle::Mode a)
ServiceHandle< StoreGateSvc > m_cs
const std::string & dbKey() const
bool isInit() const
StoreGateSvc * getCS() const
std::string m_dbKey
virtual StatusCode start() override
Called by the owning algorithm during the START transition.
StatusCode initialize(bool used=true)
CondCont< T > * m_cc
CondCont< T > *getCC ATLAS_NOT_CONST_THREAD_SAFE() const
const std::string & key() const
Return the StoreGate ID for the referenced object.
VarHandleKey(CLID clid, const std::string &sgkey, Gaudi::DataHandle::Mode a, const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE), bool isCond=false)
Constructor.
The Athena Transient Store API.
holding In fact this class is here in order to allow STL container for all features This class is sho...
Forward declaration.