1#ifndef TRIGSCINT_EVENT_QIESTREAM_H
2#define TRIGSCINT_EVENT_QIESTREAM_H
6#include "TrigScint/Event/TrigScintQIEDigis.h"
10 static const uint32_t one{1};
11 static const uint32_t m = (one << N) - one;
15 static const uint8_t one{1};
16 static const uint8_t m = (one << n) - one;
37 void Print(Option_t *option =
"")
const;
43 void Clear(Option_t *option =
"");
112 const static int TIMESTAMP_POS{0};
113 const static int TIMESTAMP_LEN_BYTES{4};
114 const static int TIMESTAMPCLOCK_POS{TIMESTAMP_POS + TIMESTAMP_LEN_BYTES};
115 const static int TIMESTAMPCLOCK_LEN_BYTES{4};
116 const static int TIMESINCESPILL_POS{TIMESTAMPCLOCK_POS +
117 TIMESTAMPCLOCK_LEN_BYTES};
118 const static int TIMESINCESPILL_LEN_BYTES{4};
119 const static int TRIGID_POS{TIMESINCESPILL_POS + TIMESINCESPILL_LEN_BYTES};
120 const static int TRIGID_LEN_BYTES{3};
121 const static int ERROR_POS{TRIGID_POS + TRIGID_LEN_BYTES};
122 const static int ERROR_LEN_BYTES{1};
124 const static int FLAG_SIZE_BITS{1};
125 const static int CRC0_ERR_POS{0};
126 const static int CRC1_ERR_POS{1};
127 const static int CID_UNSYNC_POS{2};
128 const static int CID_SKIP_POS{3};
129 const static int CHECKSUM_POS{
132 const static int CHECKSUM_SIZE_BITS{
135 const static int NUM_SAMPLES{5};
class for storing QIE output as a binary stream
QIEStream()=default
Default constructor.
void setADC(const std::vector< int > adc)
Store adcs of all time samples.
void Clear(Option_t *option="")
A dummy function.
std::vector< int > cids_
Capacitor IDs.
std::vector< int > getTDC() const
Get TDCs of all time samples.
int electronicsID_
electronics ID
std::vector< int > getCID() const
Get Cap IDs of all time samples.
int getChannelID() const
Get channel ID.
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.
std::vector< int > tdcs_
Time to Digital counts.
int chanID_
detector channel ID (bar nb)
void setTDC(const std::vector< int > tdc)
Store tdcs of all time samples.
void Print(Option_t *option="") const
Print ifo about the class.