1#ifndef TRIGSCINT_EVENT_QIESTREAM_H
2#define TRIGSCINT_EVENT_QIESTREAM_H
9 static const uint32_t ONE{1};
10 static const uint32_t M = (ONE << N) - ONE;
14 static const uint8_t ONE{1};
15 static const uint8_t M = (ONE << n) - ONE;
41 void clear(Option_t* option =
"");
110 const static int TIMESTAMP_POS{0};
111 const static int TIMESTAMP_LEN_BYTES{4};
112 const static int TIMESTAMPCLOCK_POS{TIMESTAMP_POS + TIMESTAMP_LEN_BYTES};
113 const static int TIMESTAMPCLOCK_LEN_BYTES{4};
114 const static int TIMESINCESPILL_POS{TIMESTAMPCLOCK_POS +
115 TIMESTAMPCLOCK_LEN_BYTES};
116 const static int TIMESINCESPILL_LEN_BYTES{4};
117 const static int TRIGID_POS{TIMESINCESPILL_POS + TIMESINCESPILL_LEN_BYTES};
118 const static int TRIGID_LEN_BYTES{3};
119 const static int ERROR_POS{TRIGID_POS + TRIGID_LEN_BYTES};
120 const static int ERROR_LEN_BYTES{1};
122 const static int FLAG_SIZE_BITS{1};
123 const static int CRC0_ERR_POS{0};
124 const static int CRC1_ERR_POS{1};
125 const static int CID_UNSYNC_POS{2};
126 const static int CID_SKIP_POS{3};
127 const static int CHECKSUM_POS{CID_SKIP_POS + FLAG_SIZE_BITS};
129 const static int CHECKSUM_SIZE_BITS{4};
132 const static int NUM_SAMPLES{5};
class for storing QIE output as a binary stream
QIEStream()=default
Default constructor.
int electronics_id_
electronics ID
void setADC(const std::vector< int > adc)
Store adcs of all time samples.
std::vector< int > cids_
Capacitor IDs.
std::vector< int > getTDC() const
Get TDCs of all time samples.
std::vector< int > getCID() const
Get Cap IDs of all time samples.
int getChannelID() const
Get channel ID.
void clear(Option_t *option="")
A dummy function.
void setElectronicsID(const int elecid)
Store the electronics ID.
bool operator<(const QIEStream &rhs) const
A dummy operator overloading.
std::vector< int > getADC() const
Get ADCs of all time samples.
std::vector< int > adcs_
Analog to Digital counts.
void setCID(const std::vector< int > cid)
Store cids of all time samples.
uint8_t getElectronicsID() const
Get electronics ID.
void setChannelID(const int chanid)
Store the channel ID.
virtual ~QIEStream()=default
Default destructor.
friend std::ostream & operator<<(std::ostream &o, const QIEStream &d)
Print ifo about the class.
std::vector< int > tdcs_
Time to Digital counts.
int chan_id_
detector channel ID (bar nb)
void setTDC(const std::vector< int > tdc)
Store tdcs of all time samples.