ATLAS Offline Software
ExampleHitCnv_p1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EXAMPLEHITCNV_P1_H
6 #define EXAMPLEHITCNV_P1_H
7 
18 
19 
20 class ExampleHitCnv_p1 : public T_AthenaPoolTPCnvBase<ExampleHit, ExampleHit_p1> {
21 
22 public:
24 
28  virtual void persToTrans(const ExampleHit_p1* persObj, ExampleHit* transObj, MsgStream&/* msg*/) {
29  transObj->setX (persObj->m_vec.x());
30  transObj->setY (persObj->m_vec.y());
31  transObj->setZ (persObj->m_vec.z());
32  transObj->setDetector (persObj->m_detector);
33  }
34 
38  virtual void transToPers(const ExampleHit* transObj, ExampleHit_p1* persObj, MsgStream&/* msg*/) {
39  persObj->m_vec.setX (transObj->getX());
40  persObj->m_vec.setY (transObj->getY());
41  persObj->m_vec.setZ (transObj->getZ());
42  persObj->m_detector = transObj->getDetector();
43  }
44 };
45 
46 #endif
ExampleHit::setY
void setY(double y)
Set the Y coordinate.
Definition: ExampleHit.h:51
ExampleHit.h
This file contains the class definition for the ExampleHit class.
TPConverterBase
Definition: TPConverter.h:738
ExampleHit_p1::m_vec
HepGeom::Vector3D< double > m_vec
Definition: ExampleHit_p1.h:28
ExampleHitCnv_p1::transToPers
virtual void transToPers(const ExampleHit *transObj, ExampleHit_p1 *persObj, MsgStream &)
Method creating the persistent representation ExampleHit_p1 from its transient representation Example...
Definition: ExampleHitCnv_p1.h:38
ExampleHit::getY
double getY() const
Definition: ExampleHit.h:37
ExampleHit_p1.h
This file contains the class definition for the ExampleHit_p1 class.
ExampleHitCnv_p1::persToTrans
virtual void persToTrans(const ExampleHit_p1 *persObj, ExampleHit *transObj, MsgStream &)
Method creating the transient representation of ExampleHit from its persistent representation Example...
Definition: ExampleHitCnv_p1.h:28
ExampleHit::getX
double getX() const
Definition: ExampleHit.h:34
T_AthenaPoolTPConverter.h
ExampleHitCnv_p1::ExampleHitCnv_p1
ExampleHitCnv_p1()
Definition: ExampleHitCnv_p1.h:23
ExampleHit
This class provides a dummy hit data object for AthenaPool.
Definition: ExampleHit.h:24
ExampleHitCnv_p1
Definition: ExampleHitCnv_p1.h:20
ExampleHit::getZ
double getZ() const
Definition: ExampleHit.h:40
ExampleHit::setX
void setX(double x)
Set the X coordinate.
Definition: ExampleHit.h:47
ExampleHit::getDetector
const std::string & getDetector() const
Definition: ExampleHit.h:43
ExampleHit_p1::m_detector
std::string m_detector
Definition: ExampleHit_p1.h:29
ExampleHit_p1
This class provides a dummy hit data object for AthenaPool.
Definition: ExampleHit_p1.h:20
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