ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
ExampleHitStreamer_p0 Class Reference

This class provides an example for a ROOT streamer. More...

#include <ExampleHitStreamer_p0.h>

Inheritance diagram for ExampleHitStreamer_p0:
Collaboration diagram for ExampleHitStreamer_p0:

Public Member Functions

 ExampleHitStreamer_p0 ()
 
void CopyOldToNew (const ExampleHit_p0 &old_obj, ExampleHit &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

This class provides an example for a ROOT streamer.

Definition at line 22 of file ExampleHitStreamer_p0.h.

Constructor & Destructor Documentation

◆ ExampleHitStreamer_p0()

ExampleHitStreamer_p0::ExampleHitStreamer_p0 ( )
inline

Definition at line 24 of file ExampleHitStreamer_p0.h.

24  {
25  SetClassNameAndChecksum("ExampleHit", 306442982U);
26  }

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

virtual void T_AthenaRootConverter< ExampleHit , ExampleHit_p0 >::Convert ( const void *  old_obj,
void *  new_obj 
)
inlinevirtualinherited

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

void ExampleHitStreamer_p0::CopyOldToNew ( const ExampleHit_p0 old_obj,
ExampleHit 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 from T_AthenaRootConverter< ExampleHit, ExampleHit_p0 >.

Definition at line 27 of file ExampleHitStreamer_p0.h.

27  {
28  new_obj.setX(old_obj.m_x);
29  new_obj.setY(old_obj.m_y);
30  new_obj.setZ(old_obj.m_z);
31  new_obj.setDetector( old_obj.m_detector );
32  }

◆ InstantiateOld()

virtual void* T_AthenaRootConverter< ExampleHit , ExampleHit_p0 >::InstantiateOld
inlinevirtualinherited

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

virtual const std::type_info& T_AthenaRootConverter< ExampleHit , ExampleHit_p0 >::TypeIDOld
inlinevirtualinherited

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
ExampleHit::setY
void setY(double y)
Set the Y coordinate.
Definition: ExampleHit.h:51
ExampleHit_p0::m_detector
std::string m_detector
Definition: ExampleHit_p0.h:41
ExampleHit::setX
void setX(double x)
Set the X coordinate.
Definition: ExampleHit.h:47
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
ExampleHit_p0::m_x
double m_x
Definition: ExampleHit_p0.h:42
ExampleHit_p0::m_z
double m_z
Definition: ExampleHit_p0.h:44
T_AthenaRootConverter< ExampleHit, ExampleHit_p0 >::CopyOldToNew
virtual void CopyOldToNew(const ExampleHit_p0 &old_obj, ExampleHit &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
ExampleHit_p0::m_y
double m_y
Definition: ExampleHit_p0.h:43
ExampleHit::setZ
void setZ(double z)
Set the Z coordinate.
Definition: ExampleHit.h:55
ExampleHit::setDetector
void setDetector(const std::string &detector)
Set the detector string.
Definition: ExampleHit.h:59