ATLAS Offline Software
ExampleHit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAPOOLEXAMPLEDATA_EXAMPLEHIT_H
6 #define ATHENAPOOLEXAMPLEDATA_EXAMPLEHIT_H
7 
14 #include "GaudiKernel/DataObject.h"
16 #include <CLHEP/Geometry/Vector3D.h>
17 
18 #include <string>
19 
24 class ExampleHit : public DataObject, public NavigableTerminalNode {
25 
26 public: // Constructor and Destructor
28  ExampleHit() : m_vec(0.0, 0.0, 0.0), m_detector("") {}
30  virtual ~ExampleHit() {}
31 
32 public: // Non-static members
34  double getX() const { return(m_vec.x()); }
35 
37  double getY() const { return(m_vec.y()); }
38 
40  double getZ() const { return(m_vec.z()); }
41 
43  const std::string& getDetector() const { return(m_detector); }
44 
47  void setX(double x) { m_vec.setX(x); }
48 
51  void setY(double y) { m_vec.setY(y); }
52 
55  void setZ(double z) { m_vec.setZ(z); }
56 
59  void setDetector(const std::string& detector) { m_detector = detector; }
60 
61 private:
62  HepGeom::Vector3D<double> m_vec;
63  std::string m_detector;
64 };
65 #endif
ExampleHit::setY
void setY(double y)
Set the Y coordinate.
Definition: ExampleHit.h:51
NavigableTerminalNode
Dummy type needed fro specialized implementation.
Definition: NavigableTerminalNode.h:19
ExampleHit::m_vec
HepGeom::Vector3D< double > m_vec
Definition: ExampleHit.h:62
x
#define x
ExampleHit::getY
double getY() const
Definition: ExampleHit.h:37
TRT::Hit::detector
@ detector
Definition: HitInfo.h:78
ExampleHit::m_detector
std::string m_detector
Definition: ExampleHit.h:63
z
#define z
ExampleHit::getX
double getX() const
Definition: ExampleHit.h:34
ExampleHit::~ExampleHit
virtual ~ExampleHit()
Destructor.
Definition: ExampleHit.h:30
ExampleHit
This class provides a dummy hit data object for AthenaPool.
Definition: ExampleHit.h:24
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
NavigableTerminalNode.h
y
#define y
ExampleHit::ExampleHit
ExampleHit()
Default Constructor.
Definition: ExampleHit.h:28
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