Class managing ConstDataVector objects in transient memory.
More...
#include <TCDVHolderT.h>
template<class T>
class xAOD::TCDVHolderT< T >
Class managing ConstDataVector objects in transient memory.
In order to be able to record ConstDataVector objects into the transient store, and be able to retrieve them as "const DataVector", we need to use a specialised holder type. Very much like how we use a specialised SG::DataBucket for this type in Athena's StoreGate.
- Author
- Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Definition at line 28 of file TCDVHolderT.h.
◆ Object_t
◆ TypeKind
Type of the object held by this one.
Definition at line 103 of file THolder.h.
◆ TCDVHolderT()
Constructor with the object, and its type.
◆ deleteObject()
void xAOD::THolder::deleteObject |
( |
| ) |
|
|
protectedinherited |
Internal function used to delete the managed object from memory.
Definition at line 437 of file THolder.cxx.
446 if(
m_type->IsLoaded() ) {
456 const TVirtualDestructor*
d =
461 ::Error(
"xAOD::THolder::deleteObject",
465 ::Error(
"xAOD::THolder::deleteObject",
◆ get() [1/2]
void * xAOD::THolder::get |
( |
| ) |
|
|
inherited |
Return a typeless pointer to the held object.
Definition at line 220 of file THolder.cxx.
◆ get() [2/2]
const void * xAOD::THolder::get |
( |
| ) |
const |
|
inherited |
Return a typeless const pointer to the held object.
Definition at line 215 of file THolder.cxx.
◆ getAs()
Return the object as a specific pointer.
Reimplemented from xAOD::THolder.
◆ getAsConst()
Return the object as a specific, constant pointer.
Reimplemented from xAOD::THolder.
◆ getClass() [1/2]
TClass * xAOD::THolder::getClass |
( |
| ) |
|
|
inherited |
◆ getClass() [2/2]
const ::TClass * xAOD::THolder::getClass |
( |
| ) |
const |
|
inherited |
Return the concrete type of the object
Definition at line 401 of file THolder.cxx.
◆ getImpl()
void * xAOD::THolder::getImpl |
( |
const std::type_info & |
tid, |
|
|
::Bool_t |
silent = kFALSE |
|
) |
| const |
|
protectedinherited |
Internal function to get an object.
Internal helper or getAs and getAsConst.
- Parameters
-
tid | The type as which the object is to be retrieved |
silent | When kTRUE , the call will fail silently when unsuccessful |
- Returns
- A pointer that can be cast to the requested type
Definition at line 296 of file THolder.cxx.
306 const std::string heldType =
308 const std::string reqType =
310 ::Warning(
"xAOD::THolder::getAs",
311 "Trying to retrieve %s object with a %s pointer",
312 heldType.c_str(), reqType.c_str() );
323 if( ! userClass.first ) {
324 userClass.second = ::TClass::GetClass( tid );
329 if( ! userClass.second ) {
331 ::Error(
"xAOD::THolder::getAs",
332 XAOD_MESSAGE(
"Couldn't access the dictionary for user "
345 const Int_t
offset =
cl->GetBaseClassOffset( userClass.second );
348 ::Warning(
"xAOD::THolder::getAs",
349 "User class \"%s\" is not a valid base "
◆ getPtr()
void ** xAOD::THolder::getPtr |
( |
| ) |
|
|
inherited |
Return a typeless pointer to the held object's pointer.
Definition at line 225 of file THolder.cxx.
◆ getTypeInfo()
const std::type_info * xAOD::THolder::getTypeInfo |
( |
| ) |
const |
|
inherited |
◆ isConst()
Bool_t xAOD::THolder::isConst |
( |
| ) |
const |
|
inherited |
Check if the object is const.
Definition at line 279 of file THolder.cxx.
◆ isOwner()
Bool_t xAOD::THolder::isOwner |
( |
| ) |
const |
|
inherited |
Check whether the holder owns its object.
Definition at line 252 of file THolder.cxx.
◆ renew()
void xAOD::THolder::renew |
( |
| ) |
|
|
inherited |
Renew the object in memory.
This function is mostly used in "Athena access mode", to delete the managed objects from memory between events, and recreate them from scratch.
Definition at line 420 of file THolder.cxx.
◆ set()
◆ setConst()
void xAOD::THolder::setConst |
( |
| ) |
|
|
inherited |
◆ setOwner()
void xAOD::THolder::setOwner |
( |
::Bool_t |
state = kTRUE | ) |
|
|
inherited |
Set whether the holder should own its object.
Definition at line 257 of file THolder.cxx.
264 ::Warning(
"xAOD::THolder::setOwner",
265 "Deleting object %p no longer held by any owner",
◆ typeKind()
TypeKind xAOD::THolder::typeKind |
( |
| ) |
const |
|
inlineinherited |
Return the type of the object held by this one.
Definition at line 110 of file THolder.h.
◆ m_cdvObject
Type specific pointer to the managed object.
Definition at line 51 of file TCDVHolderT.h.
◆ m_const
::Bool_t xAOD::THolder::m_const |
|
protectedinherited |
Is the held object const?
Definition at line 133 of file THolder.h.
◆ m_holderHelper
◆ m_object
void* xAOD::THolder::m_object |
|
protectedinherited |
Typeless pointer to the object in memory.
Definition at line 123 of file THolder.h.
◆ m_owner
::Bool_t xAOD::THolder::m_owner |
|
protectedinherited |
A flag for whether the object owns what it points to.
Definition at line 129 of file THolder.h.
◆ m_type
::TClass* xAOD::THolder::m_type |
|
protectedinherited |
Concrete type of the object being held on to.
Definition at line 125 of file THolder.h.
◆ m_typeInfo
const std::type_info* xAOD::THolder::m_typeInfo |
|
protectedinherited |
Concrete type of the object, if it doesn't have a dictionary.
Definition at line 127 of file THolder.h.
◆ m_typeKind
Type of the object held.
Definition at line 131 of file THolder.h.
The documentation for this class was generated from the following file: