ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
MuonCaloEnergiesCnv Class Reference

#include <MuonCaloEnergiesCnv.h>

Inheritance diagram for MuonCaloEnergiesCnv:
Collaboration diagram for MuonCaloEnergiesCnv:

Public Types

typedef T_AthenaPoolCustomCnv< TRANS, PERSBaseType
 

Public Member Functions

 MuonCaloEnergiesCnv (ISvcLocator *svcloc)
 

Protected Member Functions

virtual StatusCode initialize ()
 
virtual AthenaPoolTopLevelTPCnvBasegetTopLevelTPCnv ()
 Return the top level TP converter (which is always used for writing) More...
 
virtual void readObjectFromPool (const std::string &)
 Read the persistent object from POOL. More...
 
virtual AthenaPoolCnvTPExtensionclone ()
 
virtual void readObject (const std::string &token)
 
virtual const TokenwriteObject (const std::string &key, const std::string &output)
 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)
 remember the original converter this one was cloned from More...
 
virtual bool needsCloning () const
 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)
 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
 Get the name of this converter (anything that identifies it). More...
 
virtual PERScreatePersistent (TRANS *)
 no-op More...
 
virtual TRANS * createTransient ()
 

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...
 

Private Attributes

MuonCaloEnergyContainerCnv_tlp1 m_TPConverter
 

Friends

class CnvFactory< MuonCaloEnergiesCnv >
 

Detailed Description

Definition at line 28 of file MuonCaloEnergiesCnv.h.

Member Typedef Documentation

◆ BaseType

Definition at line 29 of file T_AthenaPoolExtendingCnv.h.

Constructor & Destructor Documentation

◆ MuonCaloEnergiesCnv()

MuonCaloEnergiesCnv::MuonCaloEnergiesCnv ( ISvcLocator *  svcloc)

Definition at line 13 of file MuonCaloEnergiesCnv.cxx.

13  :
15 {
16 }

Member Function Documentation

◆ baseAthenaPoolCnv()

virtual BaseType* T_AthenaPoolExtendingCnv::baseAthenaPoolCnv ( )
inlineprotectedvirtualinherited

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; }

◆ clone()

virtual AthenaPoolCnvTPExtension* MuonCaloEnergiesCnv::clone ( )
inlineprotectedvirtual

Definition at line 43 of file MuonCaloEnergiesCnv.h.

43 { return new MuonCaloEnergiesCnv(0); }

◆ createPersistent()

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

no-op

Definition at line 91 of file T_AthenaPoolExtendingCnv.h.

91 { return 0; }

◆ createTransient()

virtual TRANS* T_AthenaPoolExtendingCnv::createTransient ( )
inlineprotectedvirtualinherited

Reimplemented in MVFVxContainerCnv.

Definition at line 92 of file T_AthenaPoolExtendingCnv.h.

92 { return 0; }

◆ getTopLevelTPCnv()

virtual AthenaPoolTopLevelTPCnvBase* MuonCaloEnergiesCnv::getTopLevelTPCnv ( )
inlineprotectedvirtual

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

Implements T_AthenaPoolExtendingCnv.

Definition at line 39 of file MuonCaloEnergiesCnv.h.

39 { return &m_TPConverter; }

◆ initialize()

StatusCode MuonCaloEnergiesCnv::initialize ( )
protectedvirtual

Definition at line 19 of file MuonCaloEnergiesCnv.cxx.

20 {
21  if( !MuonCaloEnergiesCnvBase::initialize().isSuccess() )
22  return StatusCode::FAILURE;
23  // std::cout << " ------->>---- In MuonCaloEnergiesCnv::initialize()" << std::endl;
24 
25  return StatusCode::SUCCESS;
26 }

◆ name()

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

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
inlineprotectedvirtualinherited

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 ( )
protectedinherited

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)
protectedinherited

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)
inlineprotectedvirtualinherited

Definition at line 49 of file T_AthenaPoolExtendingCnv.h.

49 { this->readObjectFromPool(token); }

◆ readObjectFromPool()

void MuonCaloEnergiesCnv::readObjectFromPool ( const std::string &  token)
protectedvirtual

Read the persistent object from POOL.

Parameters
token[IN] token of the object to read

Implements T_AthenaPoolExtendingCnv.

Definition at line 31 of file MuonCaloEnergiesCnv.cxx.

32 {
33 
34  static const pool::Guid p1_guid( "E60630E0-FAA1-4658-9BDD-8BB977C4200B" );
35 
36  // set the POOL token which will be used for reading from POOL
37  setToken( token );
38 
39  // select the object type based on its GUID
40  if( compareClassGuid( p1_guid ) ) {
41  // read MuonCaloEnergies_PERS object from POOL using given TLP converter
42  poolReadObject< MuonCaloEnergies_PERS >( m_TPConverter );
43  }
44  else
45  throw std::runtime_error( "Unsupported version of MuonCaloEnergies_PERS (unknown GUID)" );
46 }

◆ setToken()

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

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)
protectedvirtualinherited

remember the original converter this one was cloned from

◆ writeObject()

virtual const Token* T_AthenaPoolExtendingCnv::writeObject ( const std::string &  key,
const std::string &  output 
)
protectedvirtualinherited

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< MuonCaloEnergiesCnv >

friend class CnvFactory< MuonCaloEnergiesCnv >
friend

Definition at line 23 of file MuonCaloEnergiesCnv.h.

Member Data Documentation

◆ m_originalExtendingCnv

BaseType* T_AthenaPoolExtendingCnv::m_originalExtendingCnv
protectedinherited

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.

◆ m_TPConverter

MuonCaloEnergyContainerCnv_tlp1 MuonCaloEnergiesCnv::m_TPConverter
private

Definition at line 46 of file MuonCaloEnergiesCnv.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.
initialize
void initialize()
Definition: run_EoverP.cxx:894
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
MuonCaloEnergiesCnv::MuonCaloEnergiesCnv
MuonCaloEnergiesCnv(ISvcLocator *svcloc)
Definition: MuonCaloEnergiesCnv.cxx:13
T_AthenaPoolExtendingCnv::setToken
virtual void setToken(const std::string &token)
Set the token (in std::string representation) and classID for the object that will be read next.
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
MuonCaloEnergiesCnv::m_TPConverter
MuonCaloEnergyContainerCnv_tlp1 m_TPConverter
Definition: MuonCaloEnergiesCnv.h:46
MuonCaloEnergiesCnvBase
T_AthenaPoolExtendingCnv< TPCnv::MuonCaloEnergies, MuonCaloEnergies_PERS > MuonCaloEnergiesCnvBase
Definition: MuonCaloEnergiesCnv.h:23