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 <cstdint>
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
55 /// if cloneRelations=false, the relations are not cloned and will be empty
56 MutableRawTrackerHit clone(bool cloneRelations=true) const;
57
58 /// destructor
59 ~RawTrackerHit() = default;
60
61 /// converting constructor from mutable object
63
64 static RawTrackerHit makeEmpty();
65
66public:
67
68 /// Access the The detector specific (geometrical) cell id.
69 std::uint64_t getCellID() const;
70
71 /// Access the ADC value
72 std::int32_t getCharge() const;
73
74 /// Access the TDC value.
75 std::int32_t getTimeStamp() const;
76
77
78
79
80
81 /// check whether the object is actually available
82 bool isAvailable() const;
83 /// disconnect from RawTrackerHitObj instance
84 void unlink() { m_obj = podio::utils::MaybeSharedPtr<RawTrackerHitObj>{nullptr}; }
85
86 bool operator==(const RawTrackerHit& other) const { return m_obj == other.m_obj; }
87 bool operator==(const MutableRawTrackerHit& other) const;
88
89 bool operator!=(const RawTrackerHit& other) const { return !(*this == other); }
90 bool operator!=(const MutableRawTrackerHit& other) const { return !(*this == other); }
91
92 // less comparison operator, so that objects can be e.g. stored in sets.
93 bool operator<(const RawTrackerHit& other) const { return m_obj < other.m_obj; }
94
95 podio::ObjectID id() const { return getObjectID(); }
96
97 const podio::ObjectID getObjectID() const;
98
99 friend void swap(RawTrackerHit& a, RawTrackerHit& b) {
100 using std::swap;
101 swap(a.m_obj, b.m_obj); // swap out the internal pointers
102 }
103
104private:
105 /// constructor from existing RawTrackerHitObj
106 explicit RawTrackerHit(podio::utils::MaybeSharedPtr<RawTrackerHitObj> obj);
108
109 podio::utils::MaybeSharedPtr<RawTrackerHitObj> m_obj{nullptr};
110};
111
112std::ostream& operator<<(std::ostream& o, const RawTrackerHit& value);
113
114#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
115void to_json(nlohmann::json& j, const RawTrackerHit& value);
116#endif
117
118
119} // namespace edm4eic
120
121
122#endif
Definition MutableRawTrackerHit.h:29
Definition RawTrackerHitCollectionData.h:30
Definition RawTrackerHitCollection.h:92
Definition RawTrackerHitCollection.h:37
Definition RawTrackerHit.h:31
const podio::ObjectID getObjectID() const
Definition RawTrackerHit.cc:67
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition RawTrackerHit.cc:54
~RawTrackerHit()=default
destructor
void unlink()
disconnect from RawTrackerHitObj instance
Definition RawTrackerHit.h:84
std::int32_t getTimeStamp() const
Access the TDC value.
Definition RawTrackerHit.cc:56
RawTrackerHit()
default constructor
Definition RawTrackerHit.cc:20
bool operator==(const RawTrackerHit &other) const
Definition RawTrackerHit.h:86
bool operator!=(const RawTrackerHit &other) const
Definition RawTrackerHit.h:89
RawTrackerHit & operator=(RawTrackerHit other)
copy-assignment operator
Definition RawTrackerHit.cc:30
friend class MutableRawTrackerHit
Definition RawTrackerHit.h:33
bool isAvailable() const
check whether the object is actually available
Definition RawTrackerHit.cc:63
MutableRawTrackerHit clone(bool cloneRelations=true) const
Definition RawTrackerHit.cc:35
bool operator!=(const MutableRawTrackerHit &other) const
Definition RawTrackerHit.h:90
std::int32_t getCharge() const
Access the ADC value.
Definition RawTrackerHit.cc:55
friend class RawTrackerHitCollection
Definition RawTrackerHit.h:34
bool operator<(const RawTrackerHit &other) const
Definition RawTrackerHit.h:93
podio::ObjectID id() const
Definition RawTrackerHit.h:95
static RawTrackerHit makeEmpty()
Definition RawTrackerHit.cc:50
RawTrackerHit(const RawTrackerHit &other)=default
copy constructor
friend void swap(RawTrackerHit &a, RawTrackerHit &b)
Definition RawTrackerHit.h:99
Definition RawTrackerHitObj.h:17
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103