Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
T_AthenaPoolExtendingCnv Class Referenceabstract

This templated class extends T_AthenaPoolCustomCnv to provide additional/chaged functionality for AthenaPool converters for top-level TP separated persistent objects that are an extension to some other, top-level TP separated object. More...

#include <T_AthenaPoolCustomCnv.h>

Inheritance diagram for T_AthenaPoolExtendingCnv:
Collaboration diagram for T_AthenaPoolExtendingCnv:

Public Types

typedef T_AthenaPoolCustomCnv< TRANS, PERSBaseType
 

Public Member Functions

 T_AthenaPoolExtendingCnv (ISvcLocator *svcloc)
 Constructor. More...
 

Protected Member Functions

virtual TopLevelTPCnvBasegetTopLevelTPCnv () override=0
 Return the top level TP converter (which is always used for writing) More...
 
virtual void readObjectFromPool (const std::string &token)=0
 Read the persistent object from POOL. More...
 
virtual void readObject (const std::string &token) override
 
virtual std::unique_ptr< const TokenwriteObject (const std::string &key, const std::string &output) override
 Write the persistent object to POOL. More...
 
virtual BaseTypebaseAthenaPoolCnv ()
 return the original AthenaPool converter this one was cloned from if not cloned this returns self if not registered this returns NULL More...
 
virtual void wasClonedFrom (AthenaConverterTLPExtension *orig_converter) override
 remember the original converter this one was cloned from More...
 
virtual bool needsCloning () const override
 tells if this converter needs to be cloned (true after the converter has been registered once already) More...
 
virtual void setToken (const std::string &token) override
 Set the token (in std::string representation) and classID for the object that will be read next. More...
 
template<class P >
P * poolReadObject ()
 Read object of type P. More...
 
template<class P >
void poolReadObject (TopLevelTPCnvBase &tlp_converter)
 Read object of type P (plus all extending objects) using the indicated top-level TP converter. More...
 
virtual const std::string name () const override
 Get the name of this converter (anything that identifies it). More...
 
virtual PERScreatePersistent (TRANS *) override
 no-op More...
 
virtual TRANS * createTransient () override
 

Protected Attributes

BaseTypem_originalExtendingCnv
 pointer to the original Gaudi converter - only this one is registered in the framework and has to be used for all I/O operations More...
 

Friends

class CnvFactory< T_AthenaPoolExtendingCnv< TRANS, PERS > >
 

Detailed Description

This templated class extends T_AthenaPoolCustomCnv to provide additional/chaged functionality for AthenaPool converters for top-level TP separated persistent objects that are an extension to some other, top-level TP separated object.

Definition at line 24 of file T_AthenaPoolCustomCnv.h.

Member Typedef Documentation

◆ BaseType

Definition at line 29 of file T_AthenaPoolExtendingCnv.h.

Constructor & Destructor Documentation

◆ T_AthenaPoolExtendingCnv()

T_AthenaPoolExtendingCnv::T_AthenaPoolExtendingCnv ( ISvcLocator *  svcloc)

Constructor.

Member Function Documentation

◆ baseAthenaPoolCnv()

virtual BaseType* T_AthenaPoolExtendingCnv::baseAthenaPoolCnv ( )
inlineprotectedvirtual

return the original AthenaPool converter this one was cloned from if not cloned this returns self if not registered this returns NULL

Definition at line 58 of file T_AthenaPoolExtendingCnv.h.

58 { return m_originalExtendingCnv; }

◆ createPersistent()

virtual PERS* T_AthenaPoolExtendingCnv::createPersistent ( TRANS *  )
inlineoverrideprotectedvirtual

no-op

Definition at line 91 of file T_AthenaPoolExtendingCnv.h.

91 { return 0; }

◆ createTransient()

virtual TRANS* T_AthenaPoolExtendingCnv::createTransient ( )
inlineoverrideprotectedvirtual

Reimplemented in MVFVxContainerCnv.

Definition at line 92 of file T_AthenaPoolExtendingCnv.h.

92 { return 0; }

◆ getTopLevelTPCnv()

virtual TopLevelTPCnvBase* T_AthenaPoolExtendingCnv::getTopLevelTPCnv ( )
overrideprotectedpure virtual

Return the top level TP converter (which is always used for writing)

Implemented in JetTagInfoCnv, MVFVxContainerCnv, MuonCaloEnergiesCnv, InDetTrackCnv, and MuonMeasurementsCnv.

◆ name()

virtual const std::string T_AthenaPoolExtendingCnv::name ( ) const
overrideprotectedvirtual

Get the name of this converter (anything that identifies it).

Used for logging

Returns
Name of this converter

◆ needsCloning()

virtual bool T_AthenaPoolExtendingCnv::needsCloning ( ) const
inlineoverrideprotectedvirtual

tells if this converter needs to be cloned (true after the converter has been registered once already)

Definition at line 65 of file T_AthenaPoolExtendingCnv.h.

65 { return m_originalExtendingCnv != 0; }

◆ poolReadObject() [1/2]

template<class P >
P* T_AthenaPoolExtendingCnv::poolReadObject ( )
protected

Read object of type P.

This is an exception-throwing version of poolToObject() plus reading of all extending objects. Version 1 - (see createTransient() above)

Returns
object read from POOL (by pointer) deprecated - use poolReadObject(TLPCnv)

◆ poolReadObject() [2/2]

template<class P >
void T_AthenaPoolExtendingCnv::poolReadObject ( TopLevelTPCnvBase tlp_converter)
protected

Read object of type P (plus all extending objects) using the indicated top-level TP converter.

Version 2 - (see createTransient() above) NOTE: the TLP converter will delete the persistent object after createTransient()

Parameters
tlp_converter[IN] top-level TP converter to be used when reading

◆ readObject()

virtual void T_AthenaPoolExtendingCnv::readObject ( const std::string &  token)
inlineoverrideprotectedvirtual

Definition at line 49 of file T_AthenaPoolExtendingCnv.h.

49 { this->readObjectFromPool(token); }

◆ readObjectFromPool()

virtual void T_AthenaPoolExtendingCnv::readObjectFromPool ( const std::string &  token)
protectedpure virtual

Read the persistent object from POOL.

Parameters
token[IN] token of the object to read

Implemented in MVFVxContainerCnv, JetTagInfoCnv, InDetTrackCnv, MuonCaloEnergiesCnv, and MuonMeasurementsCnv.

◆ setToken()

virtual void T_AthenaPoolExtendingCnv::setToken ( const std::string &  token)
overrideprotectedvirtual

Set the token (in std::string representation) and classID for the object that will be read next.

Required by compareClassGuid() and poolReadObject(). Only extending converter needs to call this method explicitely

Parameters
token[IN] token for the object to be read

◆ wasClonedFrom()

virtual void T_AthenaPoolExtendingCnv::wasClonedFrom ( AthenaConverterTLPExtension orig_converter)
overrideprotectedvirtual

remember the original converter this one was cloned from

◆ writeObject()

virtual std::unique_ptr<const Token> T_AthenaPoolExtendingCnv::writeObject ( const std::string &  key,
const std::string &  output 
)
overrideprotectedvirtual

Write the persistent object to POOL.

Parameters
key[IN] StoreGate key (string) - placement hint to generate POOL container name

Friends And Related Function Documentation

◆ CnvFactory< T_AthenaPoolExtendingCnv< TRANS, PERS > >

friend class CnvFactory< T_AthenaPoolExtendingCnv< TRANS, PERS > >
friend

Definition at line 1 of file T_AthenaPoolExtendingCnv.h.

Member Data Documentation

◆ m_originalExtendingCnv

BaseType* T_AthenaPoolExtendingCnv::m_originalExtendingCnv
protected

pointer to the original Gaudi converter - only this one is registered in the framework and has to be used for all I/O operations

Definition at line 95 of file T_AthenaPoolExtendingCnv.h.


The documentation for this class was generated from the following files:
T_AthenaPoolExtendingCnv::readObjectFromPool
virtual void readObjectFromPool(const std::string &token)=0
Read the persistent object from POOL.
T_AthenaPoolExtendingCnv::m_originalExtendingCnv
BaseType * m_originalExtendingCnv
pointer to the original Gaudi converter - only this one is registered in the framework and has to be ...
Definition: T_AthenaPoolExtendingCnv.h:95