ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DataModelAthenaPool::PointConverter Class Reference

Converter for Hep3Vector to Point3D<double>. More...

Inheritance diagram for DataModelAthenaPool::PointConverter:
Collaboration diagram for DataModelAthenaPool::PointConverter:

Public Member Functions

 PointConverter ()
 Constructor. More...
 
virtual void operator() (TBuffer &b, void *pmember, Int_t size=0)
 Run the streamer. More...
 

Private Attributes

TClass * m_cl
 Hold the class for Hep3Vector. More...
 

Detailed Description

Converter for Hep3Vector to Point3D<double>.

Definition at line 32 of file CLHEPConverters.cxx.

Constructor & Destructor Documentation

◆ PointConverter()

DataModelAthenaPool::PointConverter::PointConverter ( )

Constructor.

Definition at line 58 of file CLHEPConverters.cxx.

59 {
60  m_cl = gROOT->GetClass ("Hep3Vector");
61  m_cl = gROOT->GetClass ("CLHEP::Hep3Vector");
62 }

Member Function Documentation

◆ operator()()

void DataModelAthenaPool::PointConverter::operator() ( TBuffer &  b,
void *  pmember,
Int_t  size = 0 
)
virtual

Run the streamer.

Parameters
bBuffer from which to read.
pmemberPointer to the object into which to read.
sizeNumber of instances to read.

Definition at line 71 of file CLHEPConverters.cxx.

74 {
75  // This only works for reading!
76  assert (b.IsReading());
77 
78  // The transient object.
79  HepGeom::Point3D<double>* obj =
80  reinterpret_cast<HepGeom::Point3D<double>*> (pmember);
81 
82  // We'll read into this object.
83  CLHEP::Hep3Vector tmp;
84 
85  if (size == 0) size = 1;
86  while (size-- > 0) {
87  // Read into tmp and copy data to *obj.
88  m_cl->Streamer (&tmp, b);
89  obj->setX (tmp.x());
90  obj->setY (tmp.y());
91  obj->setZ (tmp.z());
92  ++obj;
93  }
94 }

Member Data Documentation

◆ m_cl

TClass* DataModelAthenaPool::PointConverter::m_cl
private

Hold the class for Hep3Vector.

Definition at line 51 of file CLHEPConverters.cxx.


The documentation for this class was generated from the following file:
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
DataModelAthenaPool::PointConverter::m_cl
TClass * m_cl
Hold the class for Hep3Vector.
Definition: CLHEPConverters.cxx:51
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.PyAthena.obj
obj
Definition: PyAthena.py:132