ATLAS Offline Software
AthToolSupport/AsgDataHandles/AsgDataHandles/ReadDecorHandleKey.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 /*
4  * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
5  */
6 
16 #ifndef ASG_DATA_HANDLES_READ_DECOR_HANDLE_KEY_H
17 #define ASG_DATA_HANDLES_READ_DECOR_HANDLE_KEY_H
18 
19 #ifndef XAOD_STANDALONE
21 #else
22 
24 
25 namespace SG {
26 
27 /*
28  * @brief Property holding a SG store/key/clid/attr name from which a
29  * ReadDecorHandle is made.
30  *
31  * See StoreGate/ReadDecorHandleKey for details.
32  *
33  * This currently (31 Jul 20) contains a number of commented out
34  * members that were part of the original handle implementation, but
35  * have not yet been implemented in the standalone version. The plan
36  * is to either implement or remove them, depending on what is needed
37  * in AnalysisBase as we add more packages.
38  *
39  */
40 template <class T>
41 class ReadDecorHandleKey
42  : public ReadHandleKey<T>
43 {
44 public:
46  typedef ReadHandleKey<T> Base;
47 
48 // /// Class for which we set the CLID. See above.
49 // typedef typename SG::TopBase<T>::type topbase_t;
50 
51 
61  ReadDecorHandleKey (const std::string& key = "");
62  // const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
63 
64 
78  template <class OWNER, class K>
79  ReadDecorHandleKey( OWNER* owner,
80  const std::string& name,
81  const K& key = {},
82  const std::string& doc = "");
83 
84 
93  ReadDecorHandleKey& operator= (const std::string& sgkey);
94 
95 
107  virtual StatusCode assign (const std::string& sgkey) override;
108 
109 
110 // /**
111 // * @brief Return the class ID for the referenced object.
112 // *
113 // * Overridden here to return the CLID for @c T instead of @c topbase_t.
114 // */
115 // CLID clid() const;
116 
117 
125  StatusCode initialize (bool used = true);
126 
127 
131  const ReadHandleKey<T>& contHandleKey() const;
132 
133 
134 private:
136  ReadHandleKey<T> m_contHandleKey;
137 };
138 
139 
140 } // namespace SG
141 
142 
144 
145 #endif
146 
147 #endif // not STOREGATE_READDECORHANDLEKEY_H
used
common.sgkey
def sgkey(tool)
Definition: common.py:1028
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ReadDecorHandleKey::m_contHandleKey
ReadHandleKey< T > m_contHandleKey
The container handle.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:218
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::ReadDecorHandleKey::operator=
ReadDecorHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
ReadDecorHandleKey.icc
SG::ReadDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadDecorHandleKey::ReadDecorHandleKey
ReadDecorHandleKey(const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadDecorHandleKey::assign
virtual StatusCode assign(const std::string &sgkey) override
Change the key of the object to which we're referring.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::ReadDecorHandleKey::contHandleKey
const ReadHandleKey< T > & contHandleKey() const
Return the handle key for the container.
SG::ReadDecorHandleKey::Base
ReadHandleKey< T > Base
Base class.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:88