LDMX Software
TrigScintQIEDigis.h
1#ifndef TRIGSCINT_EVENT_TRIGSCINTQIEDIGIS_H
2#define TRIGSCINT_EVENT_TRIGSCINTQIEDIGIS_H
3
4//---< ROOT >---//
5#include "TObject.h"
6
7namespace trigscint {
8
14 public:
16 TrigScintQIEDigis() = default;
17
19 virtual ~TrigScintQIEDigis() = default;
20
24 friend std::ostream &operator<<(std::ostream &o, const TrigScintQIEDigis &d);
25
30 void clear(Option_t *option = "");
31
36 bool operator<(const TrigScintQIEDigis &rhs) const {
37 return this->chan_id_ < rhs.chan_id_;
38 }
39
43 int getChanID() const { return chan_id_; }
44
48 int getElecID() const { return elec_id_; }
49
53 int getModuleID() const { return module_id_; }
54
58 int getLaneID() const { return lane_id_; }
59
63 std::vector<int> getADC() const { return adcs_; }
64
68 std::vector<int> getTDC() const { return tdcs_; }
69
73 std::vector<int> getCID() const { return cids_; }
74
78 std::vector<int> getBC0() const { return bc0s_; }
79
83 std::vector<int> getCE() const { return ces_; }
84
88 void setTimeSinceSpill(const uint32_t timeSpill) {
89 time_since_spill_counter_ = timeSpill;
90 }
91
95 uint32_t getTimeSinceSpill() const { return time_since_spill_counter_; }
96
100 void setChanID(const int chanid) { chan_id_ = chanid; }
101
105 void setElecID(const int elecid) { elec_id_ = elecid; }
106
110 void setModuleID(const int moduleid) { module_id_ = moduleid; }
111
115 void setLaneID(const int laneid) { lane_id_ = laneid; }
116
121 void setADC(const std::vector<int> adc) { adcs_ = adc; }
122
127 void setTDC(const std::vector<int> tdc) { tdcs_ = tdc; }
128
133 void setCID(const std::vector<int> cid) { cids_ = cid; }
134
139 void setBC0(const std::vector<int> bc0) { bc0s_ = bc0; }
140
145 void setCE(const std::vector<int> ce) { ces_ = ce; }
146
147 protected:
151 int elec_id_{-1};
155 int lane_id_{-1};
156
158 std::vector<int> adcs_;
159
161 std::vector<int> tdcs_;
162
165
166 private:
168 std::vector<int> cids_;
169 std::vector<int> bc0s_;
170 std::vector<int> ces_;
171
172 ClassDef(TrigScintQIEDigis, 4);
173};
174} // namespace trigscint
175#endif
class for storing QIE output
void setLaneID(const int laneid)
Store the lane (fiber) ID.
uint32_t getTimeSinceSpill() const
Store the event time since spill counter.
std::vector< int > getADC() const
Get ADCs of all time samples.
uint32_t time_since_spill_counter_
Time since spill (a counter, to be divided by 125e6 or so)
void setCID(const std::vector< int > cid)
Store cids of all time samples.
std::vector< int > adcs_
analog to digital counts
void setTDC(const std::vector< int > tdc)
Store tdcs of all time samples.
std::vector< int > cids_
capacitor IDs
int getLaneID() const
Get lane ID.
void setBC0(const std::vector< int > bc0)
Store bc0s of all time samples.
void setChanID(const int chanid)
Store the channel ID.
void clear(Option_t *option="")
A dummy function.
virtual ~TrigScintQIEDigis()=default
Default destructor.
TrigScintQIEDigis()=default
Default constructor.
int getElecID() const
Get electronics ID.
void setTimeSinceSpill(const uint32_t timeSpill)
Store the event time since spill counter.
std::vector< int > getCID() const
Get Cap IDs of all time samples.
std::vector< int > getCE() const
Get CEs (an error state flag) of all time samples.
int getChanID() const
Get channel ID.
bool operator<(const TrigScintQIEDigis &rhs) const
A dummy operator overloading.
std::vector< int > tdcs_
Time to Digital counts.
int getModuleID() const
Get module ID (pad naming number -1)
std::vector< int > getTDC() const
Get tdcs of all time samples.
void setModuleID(const int moduleid)
Store the module ID (pad number-1)
friend std::ostream & operator<<(std::ostream &o, const TrigScintQIEDigis &d)
Print ifo about the class.
void setCE(const std::vector< int > ce)
Store ces of all time samples.
void setElecID(const int elecid)
Store the electronics ID.
std::vector< int > getBC0() const
Get BC0s (= 1 for periodic sync time sample) of all time samples.
void setADC(const std::vector< int > adc)
Store adcs of all time samples.