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 std::vector<int> getADC() const { return adcs_; }
54
58 std::vector<int> getTDC() const { return tdcs_; }
59
63 std::vector<int> getCID() const { return cids_; }
64
68 void setTimeSinceSpill(const uint32_t timeSpill) {
69 time_since_spill_counter_ = timeSpill;
70 }
71
75 uint32_t getTimeSinceSpill() const { return time_since_spill_counter_; }
76
80 void setChanID(const int chanid) { chan_id_ = chanid; }
81
85 void setElecID(const int elecid) { elec_id_ = elecid; }
86
91 void setADC(const std::vector<int> adc) { adcs_ = adc; }
92
97 void setTDC(const std::vector<int> tdc) { tdcs_ = tdc; }
98
103 void setCID(const std::vector<int> cid) { cids_ = cid; }
104
105 protected:
109 int elec_id_{-1};
110
112 std::vector<int> adcs_;
113
115 std::vector<int> tdcs_;
116
119
120 private:
122 std::vector<int> cids_;
123
124 ClassDef(TrigScintQIEDigis, 3);
125};
126} // namespace trigscint
127#endif
class for storing QIE output
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
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.
int getChanID() const
Get channel ID.
bool operator<(const TrigScintQIEDigis &rhs) const
A dummy operator overloading.
std::vector< int > tdcs_
Time to Digital counts.
std::vector< int > getTDC() const
Get tdcs of all time samples.
friend std::ostream & operator<<(std::ostream &o, const TrigScintQIEDigis &d)
Print ifo about the class.
void setElecID(const int elecid)
Store the electronics ID.
void setADC(const std::vector< int > adc)
Store adcs of all time samples.