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

#include <InDetTrackCnv.h>

Inheritance diagram for InDetTrackCnv:
Collaboration diagram for InDetTrackCnv:

Public Types

typedef T_AthenaPoolCustomCnv< TRANS, PERSBaseType
 

Public Member Functions

 InDetTrackCnv (ISvcLocator *svcloc)
 

Protected Member Functions

virtual StatusCode initialize ()
 
virtual AthenaPoolTopLevelTPCnvBasegetTopLevelTPCnv ()
 Return the top level TP converter (which is always used for writing) More...
 
virtual AthenaPoolCnvTPExtensionclone ()
 
virtual void readObjectFromPool (const std::string &)
 Read the persistent object from POOL. More...
 
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

InDetTrackCnv_tlp1 m_TPConverter1
 
InDetTrackCnv_tlp2 m_TPConverter2
 

Friends

class CnvFactory< InDetTrackCnv >
 

Detailed Description

Definition at line 25 of file InDetTrackCnv.h.

Member Typedef Documentation

◆ BaseType

Definition at line 29 of file T_AthenaPoolExtendingCnv.h.

Constructor & Destructor Documentation

◆ InDetTrackCnv()

InDetTrackCnv::InDetTrackCnv ( ISvcLocator *  svcloc)

Definition at line 13 of file InDetTrackCnv.cxx.

13  :
14  InDetTrackCnvBase(svcloc)
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* InDetTrackCnv::clone ( )
inlineprotectedvirtual

Definition at line 39 of file InDetTrackCnv.h.

39 { return new InDetTrackCnv(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* InDetTrackCnv::getTopLevelTPCnv ( )
inlineprotectedvirtual

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

Implements T_AthenaPoolExtendingCnv.

Definition at line 37 of file InDetTrackCnv.h.

37 { return &m_TPConverter2; }

◆ initialize()

StatusCode InDetTrackCnv::initialize ( )
protectedvirtual

Definition at line 19 of file InDetTrackCnv.cxx.

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

◆ 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 InDetTrackCnv::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 33 of file InDetTrackCnv.cxx.

34 {
35  static const pool::Guid p2_guid( "4E3778E2-1497-4F10-8746-AA02319FAC83" );
36  static const pool::Guid p1_guid( "8380F7AC-4A8F-4382-95A5-1234E43D3B08" );
37 
38  // set the POOL token which will be used for reading from POOL
39  setToken( token );
40 
41  // select the object type based on its GUID
42  if( compareClassGuid( p2_guid ) ) {
43  // read the object using the main TP converter
44  poolReadObject< InDetTrack_PERS >( m_TPConverter2 );
45  }else if( compareClassGuid( p1_guid ) ) {
46  poolReadObject< InDet::Track_tlp1 >( m_TPConverter1 );
47  }
48  else
49  throw std::runtime_error( "Unsupported version of InDetTrack_PERS (unknown GUID)" );
50 }

◆ 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< InDetTrackCnv >

friend class CnvFactory< InDetTrackCnv >
friend

Definition at line 20 of file InDetTrackCnv.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_TPConverter1

InDetTrackCnv_tlp1 InDetTrackCnv::m_TPConverter1
private

Definition at line 45 of file InDetTrackCnv.h.

◆ m_TPConverter2

InDetTrackCnv_tlp2 InDetTrackCnv::m_TPConverter2
private

Definition at line 46 of file InDetTrackCnv.h.


The documentation for this class was generated from the following files:
InDetTrackCnv::m_TPConverter2
InDetTrackCnv_tlp2 m_TPConverter2
Definition: InDetTrackCnv.h:46
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
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.
InDetTrackCnv::m_TPConverter1
InDetTrackCnv_tlp1 m_TPConverter1
Definition: InDetTrackCnv.h:45
InDetTrackCnvBase
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS > InDetTrackCnvBase
Definition: InDetTrackCnv.h:20
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
InDetTrackCnv::InDetTrackCnv
InDetTrackCnv(ISvcLocator *svcloc)
Definition: InDetTrackCnv.cxx:13