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

#include <JetTagInfoCnv.h>

Inheritance diagram for JetTagInfoCnv:
Collaboration diagram for JetTagInfoCnv:

Public Types

typedef T_AthenaPoolCustomCnv< TRANS, PERSBaseType
 

Public Member Functions

 JetTagInfoCnv (ISvcLocator *svcloc)
 Init our base class. More...
 

Protected Member Functions

StatusCode initialize (void)
 Make sure to pass on the init! More...
 
AthenaPoolTopLevelTPCnvBasegetTopLevelTPCnv (void)
 Return the top level TP converter (which is always used for writing) More...
 
AthenaPoolCnvTPExtensionclone (void)
 
void readObjectFromPool (const std::string &obj)
 Read the persistant bit in. 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

Analysis::JetTagInfoCnv_tlp3 m_TPConverter
 
Analysis::JetTagInfoCnv_tlp2 m_TPConverter_p2
 
Analysis::JetTagInfoCnv_tlp1 m_TPConverter_p1
 

Friends

class CnvFactory< JetTagInfoCnv >
 

Detailed Description

Definition at line 25 of file JetTagInfoCnv.h.

Member Typedef Documentation

◆ BaseType

Definition at line 29 of file T_AthenaPoolExtendingCnv.h.

Constructor & Destructor Documentation

◆ JetTagInfoCnv()

JetTagInfoCnv::JetTagInfoCnv ( ISvcLocator *  svcloc)

Init our base class.

Definition at line 23 of file JetTagInfoCnv.cxx.

24  : JetTagInfoCnvBase (loc)
25 {
26 }

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

AthenaPoolCnvTPExtension* JetTagInfoCnv::clone ( void  )
inlineprotected

Definition at line 39 of file JetTagInfoCnv.h.

40  {
41  return new JetTagInfoCnv(0);
42  }

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

AthenaPoolTopLevelTPCnvBase* JetTagInfoCnv::getTopLevelTPCnv ( void  )
inlineprotectedvirtual

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

Implements T_AthenaPoolExtendingCnv.

Definition at line 35 of file JetTagInfoCnv.h.

36  {
37  return &m_TPConverter;
38  }

◆ initialize()

StatusCode JetTagInfoCnv::initialize ( void  )
protected

Make sure to pass on the init!

Definition at line 29 of file JetTagInfoCnv.cxx.

30 {
32  return result;
33 }

◆ 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 JetTagInfoCnv::readObjectFromPool ( const std::string &  obj)
protectedvirtual

Read the persistant bit in.

Fortunately, we don't have to do anything at all for this.

The POOL token which will be used for reading from POOL.

And use the GUID to select what we want

Implements T_AthenaPoolExtendingCnv.

Definition at line 37 of file JetTagInfoCnv.cxx.

38 {
39  static const pool::Guid p1_guid ("977E2E76-4DA6-4A4B-87A8-2E41353DB9F4");
40  static const pool::Guid p2_guid ("50E644C1-E247-41B0-B873-416362824A21");
41  static const pool::Guid p3_guid ("8A57BABD-C361-4796-93CD-E8171EF06BC7");
42 
44 
45  setToken (token);
46 
48 
49  if(compareClassGuid (p3_guid)){
50  poolReadObject<JetTagInfo_tlp3> (m_TPConverter);
51  }
52  else if (compareClassGuid (p2_guid)) {
53  poolReadObject<JetTagInfo_tlp2> (m_TPConverter_p2);
54  } else if (compareClassGuid (p1_guid)) {
55  poolReadObject<JetTagInfo_tlp1> (m_TPConverter_p1);
56  } else {
57  throw runtime_error ("Unsupported version of JetTagInfo_tlp1 (unknonw GUID)");
58  }
59 }

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

friend class CnvFactory< JetTagInfoCnv >
friend

Definition at line 21 of file JetTagInfoCnv.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

Analysis::JetTagInfoCnv_tlp3 JetTagInfoCnv::m_TPConverter
private

Definition at line 46 of file JetTagInfoCnv.h.

◆ m_TPConverter_p1

Analysis::JetTagInfoCnv_tlp1 JetTagInfoCnv::m_TPConverter_p1
private

Definition at line 48 of file JetTagInfoCnv.h.

◆ m_TPConverter_p2

Analysis::JetTagInfoCnv_tlp2 JetTagInfoCnv::m_TPConverter_p2
private

Definition at line 47 of file JetTagInfoCnv.h.


The documentation for this class was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
T_AthenaPoolExtendingCnv::readObjectFromPool
virtual void readObjectFromPool(const std::string &token)=0
Read the persistent object from POOL.
JetTagInfoCnv::m_TPConverter_p1
Analysis::JetTagInfoCnv_tlp1 m_TPConverter_p1
Definition: JetTagInfoCnv.h:48
initialize
void initialize()
Definition: run_EoverP.cxx:894
JetTagInfoCnvBase
T_AthenaPoolExtendingCnv< JetTagInfo, Analysis::JetTagInfo_tlp3 > JetTagInfoCnvBase
The Athena Pool Converter for TagInfo guys.
Definition: JetTagInfoCnv.h:21
JetTagInfoCnv::m_TPConverter_p2
Analysis::JetTagInfoCnv_tlp2 m_TPConverter_p2
Definition: JetTagInfoCnv.h:47
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
JetTagInfoCnv::JetTagInfoCnv
JetTagInfoCnv(ISvcLocator *svcloc)
Init our base class.
Definition: JetTagInfoCnv.cxx:23
JetTagInfoCnv::m_TPConverter
Analysis::JetTagInfoCnv_tlp3 m_TPConverter
Definition: JetTagInfoCnv.h:46