|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef XAODROOTACCESS_TSTORE_H
6 #define XAODROOTACCESS_TSTORE_H
67 template<
typename T >
71 template<
typename T >
75 template<
typename T >
78 template<
typename T >
82 template<
typename T >
85 template<
typename T >
89 template<
typename T >
92 template<
typename T >
96 template<
typename T >
97 void keys( std::vector< std::string >& vkeys )
const;
118 const std::type_info& ti )
const;
121 const std::type_info& ti )
const;
123 void*
getObject(
const std::string&
key,
const std::type_info& ti )
const;
126 const std::type_info& ti )
const;
129 const std::string& classname,
130 ::Bool_t isOwner, ::Bool_t
isConst );
133 const std::type_info& ti,
134 ::Bool_t isOwner, ::Bool_t
isConst );
139 const std::type_info& ti,
140 ::Bool_t isOwner, ::Bool_t
isConst );
154 const std::string&
getName(
const void*
ptr )
const;
156 void getNames(
const std::string& targetClassName,
157 std::vector<std::string>& vkeys )
const;
173 template<
typename T >
175 ::Bool_t isOwner, ::Bool_t
isConst );
184 #endif // XAODROOTACCESS_TSTORE_H
virtual ~TStore()
Destructor.
HashedKeys_t m_keys
The key map.
const THolder * holder(const std::string &key) const
return holder for key
DataVector adapter that acts like it holds const pointers.
This class takes care of holding EDM objects in memory.
StatusCode record(const T *obj, const std::string &key)
Add a const object to the store.
StatusCode retrieve(const T *&obj, const std::string &key) const
Retrieve either a constant or non-constant object from the store.
const std::string & getName(SG::sgkey_t hash) const
Get the name corresponding to a hashed key.
StatusCode record(std::unique_ptr< const T > obj, const std::string &key)
Add a const object to the store, explicitly taking ownership of it.
void setActive()
Set this as the active transient store in the application.
std::map< std::string, THolder * > Objects_t
Type of the internal container storing all the objects.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void clear()
Clear the store of all of its contents.
StatusCode record(std::unique_ptr< T > obj, const std::string &key)
Add an object to the store, explicitly taking ownership of it.
::Bool_t contains(const std::string &key) const
Function checking if an object is available from the store.
TStore(const TStore &)=delete
Disallow copying the object.
StatusCode record(ConstDataVector< T > *obj, const std::string &key, const std::type_info &ti, ::Bool_t isOwner, ::Bool_t isConst)
Function doing the first step of recording a ConstDataVector object.
::Bool_t isConst(const std::string &key) const
Function checking if an object with a given type is constant.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode retrieve(T *&obj, const std::string &key) const
Retrieve a non-constant object from the store.
StatusCode record_impl(T *obj, const std::string &key, ::Bool_t isOwner, ::Bool_t isConst)
Internal implementation of the templated record method.
StatusCode remove(const std::string &key)
Remove an object from the store by name.
SG::SGKeyMap< std::string > HashedKeys_t
Type of the internal storage for the hashed keys of the object names.
void * getObject(const std::string &key, const std::type_info &ti) const
Function retrieving a non-const object in a non-template way.
Objects_t m_objects
The object storage.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
void print() const
Print the current contents of the transient store.
const void * getConstObject(const std::string &key, const std::type_info &ti) const
Function retrieving a const object in a non-template way.
Define the type used for hashed StoreGate key+CLID pairs.
A relatively simple transient store for objects created in analysis.
StatusCode record(T *obj, const std::string &key)
Add an object to the store.
TStore & operator=(const TStore &)=delete
Disallow copying the object.
void keys(std::vector< std::string > &vkeys) const
provide a list of keys associated with a type
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
void getNames(const std::string &targetClassName, std::vector< std::string > &vkeys) const
Function determining the list keys associated with a type name.
TStore()
Default constructor.
Tool for accessing xAOD files outside of Athena.