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