ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
T_AthenaRootConverter< NEW, OLD > Class Template Reference

#include <T_AthenaRootConverter.h>

Inheritance diagram for T_AthenaRootConverter< NEW, OLD >:
Collaboration diagram for T_AthenaRootConverter< NEW, OLD >:

Public Member Functions

 T_AthenaRootConverter ()
 Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version To be implemented by the user in the derived class. More...
 
virtual void CopyOldToNew (const OLD &old_obj, NEW &new_obj)
 The converter function which copies the content of the object from its old shape to the new shape To be implemented by the user in the derived class Default implementation simply does a cast
More...
 
virtual void Convert (const void *old_obj, void *new_obj)
 General (typeless) invocation of the convertion function it calls the actual user implemenation with concrete argument types. More...
 
virtual void * InstantiateOld ()
 Create an instance of the old object. More...
 
virtual const std::type_info & TypeIDOld ()
 Get typeinfo of the old object type. More...
 
void SetClassNameAndChecksum (const std::string &classname, unsigned checksum)
 Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version. More...
 
const std::string & ClassName ()
 
unsigned StreamerChecksum ()
 

Protected Attributes

std::string m_className
 
unsigned m_streamerChecksum
 

Detailed Description

template<class NEW, class OLD>
class T_AthenaRootConverter< NEW, OLD >

Definition at line 65 of file T_AthenaRootConverter.h.

Constructor & Destructor Documentation

◆ T_AthenaRootConverter()

template<class NEW , class OLD >
T_AthenaRootConverter< NEW, OLD >::T_AthenaRootConverter ( )
inline

Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version To be implemented by the user in the derived class.

Definition at line 70 of file T_AthenaRootConverter.h.

70  {
72  }

Member Function Documentation

◆ ClassName()

const std::string& T_AthenaRootConverterBase::ClassName ( )
inlineinherited

Definition at line 27 of file T_AthenaRootConverter.h.

27 { return m_className; }

◆ Convert()

template<class NEW , class OLD >
virtual void T_AthenaRootConverter< NEW, OLD >::Convert ( const void *  old_obj,
void *  new_obj 
)
inlinevirtual

General (typeless) invocation of the convertion function it calls the actual user implemenation with concrete argument types.

Implements T_AthenaRootConverterBase.

Definition at line 84 of file T_AthenaRootConverter.h.

84  {
85  CopyOldToNew( *(const OLD*)old_obj, *(NEW*)new_obj);
86  }

◆ CopyOldToNew()

template<class NEW , class OLD >
virtual void T_AthenaRootConverter< NEW, OLD >::CopyOldToNew ( const OLD &  old_obj,
NEW &  new_obj 
)
inlinevirtual

The converter function which copies the content of the object from its old shape to the new shape To be implemented by the user in the derived class Default implementation simply does a cast

Reimplemented in TrackRecordStreamer_p0, TgcRawDataStreamer_p0, ExampleHitStreamer_p0, and CscRawDataStreamer_p0.

Definition at line 78 of file T_AthenaRootConverter.h.

78  {
79  new_obj = *(NEW*)&old_obj;
80  }

◆ InstantiateOld()

template<class NEW , class OLD >
virtual void* T_AthenaRootConverter< NEW, OLD >::InstantiateOld ( )
inlinevirtual

Create an instance of the old object.

Implements T_AthenaRootConverterBase.

Definition at line 89 of file T_AthenaRootConverter.h.

89 { return new OLD(); }

◆ SetClassNameAndChecksum()

void T_AthenaRootConverterBase::SetClassNameAndChecksum ( const std::string &  classname,
unsigned  checksum 
)
inlineinherited

Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version.

Definition at line 55 of file T_AthenaRootConverter.h.

56 {
57  m_className = classname;
58  m_streamerChecksum = checksum;
59 }

◆ StreamerChecksum()

unsigned T_AthenaRootConverterBase::StreamerChecksum ( )
inlineinherited

Definition at line 28 of file T_AthenaRootConverter.h.

28 { return m_streamerChecksum; }

◆ TypeIDOld()

template<class NEW , class OLD >
virtual const std::type_info& T_AthenaRootConverter< NEW, OLD >::TypeIDOld ( )
inlinevirtual

Get typeinfo of the old object type.

Implements T_AthenaRootConverterBase.

Definition at line 91 of file T_AthenaRootConverter.h.

91 { return typeid(OLD); }

Member Data Documentation

◆ m_className

std::string T_AthenaRootConverterBase::m_className
protectedinherited

Definition at line 40 of file T_AthenaRootConverter.h.

◆ m_streamerChecksum

unsigned T_AthenaRootConverterBase::m_streamerChecksum
protectedinherited

Definition at line 41 of file T_AthenaRootConverter.h.


The documentation for this class was generated from the following file:
T_AthenaRootConverterBase::m_streamerChecksum
unsigned m_streamerChecksum
Definition: T_AthenaRootConverter.h:41
T_AthenaRootConverterBase::m_className
std::string m_className
Definition: T_AthenaRootConverter.h:40
T_AthenaRootConverterBase::SetClassNameAndChecksum
void SetClassNameAndChecksum(const std::string &classname, unsigned checksum)
Set the name of the class for which this converter is implemented and the particualar ROOT streamerIn...
Definition: T_AthenaRootConverter.h:55
T_AthenaRootConverter::CopyOldToNew
virtual void CopyOldToNew(const OLD &old_obj, NEW &new_obj)
The converter function which copies the content of the object from its old shape to the new shape To ...
Definition: T_AthenaRootConverter.h:78