ATLAS Offline Software
TypelessWriteHandleKey.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef STOREGATE_TYPELESSWRITEHANDLEKEY_H
14 #define STOREGATE_TYPELESSWRITEHANDLEKEY_H
15 
16 
17 #include "StoreGate/VarHandleKey.h"
18 
19 
20 namespace SG {
21 
22 
34  : public VarHandleKey
35 {
36 public:
47  TypelessWriteHandleKey (CLID clid = CLID_NULL,
48  const std::string& key = "",
49  const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
50 
51 
66  template <class OWNER,
68  inline
69  TypelessWriteHandleKey( OWNER* owner,
70  const std::string& name,
71  CLID clid = CLID_NULL,
72  const std::string& key={},
73  const std::string& doc="")
75  {
76  auto p = owner->declareProperty(name, *this, doc);
77  p->template setOwnerType<OWNER>();
78  }
79 
80 
88  TypelessWriteHandleKey& operator= (const std::string& sgkey);
89 
90 
100  virtual StatusCode assign (const std::string& key) override;
101 };
102 
103 
104 } //namespace SG
105 
106 
107 #endif // not STOREGATE_TYPELESSWRITEHANDLEKEY_H
common.sgkey
def sgkey(tool)
Definition: common.py:1028
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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::TypelessWriteHandleKey::operator=
TypelessWriteHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
Definition: TypelessWriteHandleKey.cxx:50
athena.value
value
Definition: athena.py:122
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::TypelessWriteHandleKey
Property holding a write key for which the type can be configured.
Definition: TypelessWriteHandleKey.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::TypelessWriteHandleKey::TypelessWriteHandleKey
TypelessWriteHandleKey(OWNER *owner, const std::string &name, CLID clid=CLID_NULL, const std::string &key={}, const std::string &doc="")
auto-declaring Property constructor.
Definition: TypelessWriteHandleKey.h:69
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::VarHandleKey::clid
CLID clid() const
Return the class ID for the referenced object.
Definition: StoreGate/src/VarHandleKey.cxx:177
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition: StoreGate/StoreGate/VarHandleKey.h:62
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
StoreID::storeName
static const std::string & storeName(const StoreID::type &s)
Definition: StoreID.cxx:77
SG::TypelessWriteHandleKey::assign
virtual StatusCode assign(const std::string &key) override
Change the key of the object to which we're referring.
Definition: TypelessWriteHandleKey.cxx:68
SG::TypelessWriteHandleKey::TypelessWriteHandleKey
TypelessWriteHandleKey(CLID clid=CLID_NULL, const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
Definition: TypelessWriteHandleKey.cxx:32