EDM4eic
EIC data model
Loading...
Searching...
No Matches
RawTrackerHit.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_RawTrackerHit_H
4#define EDM4EIC_RawTrackerHit_H
5
7
8#include <cstdint>
9
10#include "podio/utilities/MaybeSharedPtr.h"
11
12#include <ostream>
13#include <cstddef>
14
15#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
16#include "nlohmann/json_fwd.hpp"
17#endif
18
19
20
21namespace edm4eic {
22
23class MutableRawTrackerHit;
24class RawTrackerHitCollection;
25class RawTrackerHitCollectionData;
26
27/** @class RawTrackerHit
28 * Raw (digitized) tracker hit
29 * @author: W. Armstrong, S. Joosten
30 */
32
37
38public:
41
42 /// default constructor
44
45 /// Constructor initializing all members
46 RawTrackerHit(std::uint64_t cellID, std::int32_t charge, std::int32_t timeStamp);
47
48 /// copy constructor
49 RawTrackerHit(const RawTrackerHit& other) = default;
50
51 /// copy-assignment operator
53
54 /// create a mutable deep-copy of the object with identical relations
56
57 /// destructor
58 ~RawTrackerHit() = default;
59
60
61 static RawTrackerHit makeEmpty();
62
63public:
64
65 /// Access the The detector specific (geometrical) cell id.
66 std::uint64_t getCellID() const;
67
68 /// Access the ADC value
69 std::int32_t getCharge() const;
70
71 /// Access the TDC value.
72 std::int32_t getTimeStamp() const;
73
74
75
76
77
78 /// check whether the object is actually available
79 bool isAvailable() const;
80 /// disconnect from RawTrackerHitObj instance
81 void unlink() { m_obj = podio::utils::MaybeSharedPtr<RawTrackerHitObj>{nullptr}; }
82
83 bool operator==(const RawTrackerHit& other) const { return m_obj == other.m_obj; }
84 bool operator==(const MutableRawTrackerHit& other) const;
85
86 // less comparison operator, so that objects can be e.g. stored in sets.
87 bool operator<(const RawTrackerHit& other) const { return m_obj < other.m_obj; }
88
89 podio::ObjectID id() const { return getObjectID(); }
90
91 const podio::ObjectID getObjectID() const;
92
93 friend void swap(RawTrackerHit& a, RawTrackerHit& b) {
94 using std::swap;
95 swap(a.m_obj, b.m_obj); // swap out the internal pointers
96 }
97
98private:
99 /// constructor from existing RawTrackerHitObj
100 explicit RawTrackerHit(podio::utils::MaybeSharedPtr<RawTrackerHitObj> obj);
102
103 podio::utils::MaybeSharedPtr<RawTrackerHitObj> m_obj{nullptr};
104};
105
106std::ostream& operator<<(std::ostream& o, const RawTrackerHit& value);
107
108#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
109void to_json(nlohmann::json& j, const RawTrackerHit& value);
110#endif
111
112
113} // namespace edm4eic
114
115
116#endif
Definition MutableRawTrackerHit.h:30
Definition RawTrackerHitCollectionData.h:30
Definition RawTrackerHitCollection.h:95
Definition RawTrackerHitCollection.h:40
Definition RawTrackerHit.h:31
const podio::ObjectID getObjectID() const
Definition RawTrackerHit.cc:64
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition RawTrackerHit.cc:48
~RawTrackerHit()=default
destructor
void unlink()
disconnect from RawTrackerHitObj instance
Definition RawTrackerHit.h:81
std::int32_t getTimeStamp() const
Access the TDC value.
Definition RawTrackerHit.cc:50
RawTrackerHit()
default constructor
Definition RawTrackerHit.cc:21
bool operator==(const RawTrackerHit &other) const
Definition RawTrackerHit.h:83
RawTrackerHit & operator=(RawTrackerHit other)
copy-assignment operator
Definition RawTrackerHit.cc:31
friend class MutableRawTrackerHit
Definition RawTrackerHit.h:33
bool isAvailable() const
check whether the object is actually available
Definition RawTrackerHit.cc:57
std::int32_t getCharge() const
Access the ADC value.
Definition RawTrackerHit.cc:49
friend class RawTrackerHitCollection
Definition RawTrackerHit.h:34
bool operator<(const RawTrackerHit &other) const
Definition RawTrackerHit.h:87
podio::ObjectID id() const
Definition RawTrackerHit.h:89
static RawTrackerHit makeEmpty()
Definition RawTrackerHit.cc:44
RawTrackerHit(const RawTrackerHit &other)=default
copy constructor
friend void swap(RawTrackerHit &a, RawTrackerHit &b)
Definition RawTrackerHit.h:93
MutableRawTrackerHit clone() const
create a mutable deep-copy of the object with identical relations
Definition RawTrackerHit.cc:36
Definition RawTrackerHitObj.h:17
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97