1#ifndef TRIGSCINT_EVENT_ZCCMOUTPUT_H
2#define TRIGSCINT_EVENT_ZCCMOUTPUT_H
7#include "TrigScint/Event/TrigScintQIEDigis.h"
32 void clear(Option_t *option =
"");
106 const static int DAQHEADER_POS{0};
107 const static int DAQHEADER_LEN_BYTES{16};
108 const static int TIMESTAMP_POS{DAQHEADER_POS + DAQHEADER_LEN_BYTES};
109 const static int TIMESTAMP_LEN_BYTES{8};
110 const static int EMPTY_HEADER_WORD_POS{TIMESTAMP_POS + TIMESTAMP_LEN_BYTES};
111 const static int EMPTY_HEADER_WORD_LEN_BYTES{8};
113 const static int EVENTDATA_POS{EMPTY_HEADER_WORD_POS +
114 EMPTY_HEADER_WORD_LEN_BYTES};
121 const static int NUM_CHAN_PER_LANE{6};
122 const static int ADC_SAMPLE_WORD_POS{0};
123 const static int ADC_LEN_BYTES{1 * NUM_CHAN_PER_LANE};
124 const static int EMPTY_WORD_SAMPLE_WORD_POS{ADC_SAMPLE_WORD_POS +
126 const static int EMPTY_WORD_LEN_BYTES{2};
127 const static int TDC_SAMPLE_WORD_POS{EMPTY_WORD_SAMPLE_WORD_POS +
128 EMPTY_WORD_LEN_BYTES};
129 const static int TDC_LEN_BYTES{1 * NUM_CHAN_PER_LANE};
130 const static int FLAGS_SAMPLE_WORD_POS{TDC_SAMPLE_WORD_POS + TDC_LEN_BYTES};
131 const static int FLAGS_LEN_BYTES{1};
132 const static int LANE_SAMPLE_WORD_POS{FLAGS_SAMPLE_WORD_POS +
134 const static int LANE_LEN_BYTES{1};
136 const static int CAPID_POS_IN_FLAG{0};
137 const static int CAPID_LEN_BITS{2};
138 const static int CE_POS_IN_FLAG{CAPID_POS_IN_FLAG + CAPID_LEN_BITS};
139 const static int CE_LEN_BITS{1};
140 const static int BC0_POS_IN_FLAG{CE_POS_IN_FLAG + CE_LEN_BITS};
141 const static int BC0_LEN_BITS{1};
142 const static int EMPTY_FLAG_WORD_POS_IN_FLAG{BC0_POS_IN_FLAG + BC0_LEN_BITS};
143 const static int EMPTY_FLAG_WORD_LEN_BITS{4};
148 const static int SAMPLE_WORD_LEN_BYTES = ADC_LEN_BYTES + TDC_LEN_BYTES +
149 EMPTY_WORD_LEN_BYTES +
150 FLAGS_LEN_BYTES + LANE_LEN_BYTES;
class for storing ZCCM output as a binary output
virtual ~ZCCMOutput()=default
Default destructor.
int getChannelID() const
Get channel ID.
void setElectronicsID(const int elecid)
Store the electronics ID.
friend std::ostream & operator<<(std::ostream &o, const ZCCMOutput &d)
Print ifo about the class.
std::vector< int > getTDC() const
Get TDCs of all time samples.
void clear(Option_t *option="")
A dummy function.
void setTDC(const std::vector< int > tdc)
Store tdcs of all time samples.
ZCCMOutput()=default
Default constructor.
uint8_t getElectronicsID() const
Get electronics ID.
int lane_
detector lane ID (aka fiber)
int chan_id_
detector channel ID (bar nb)
void setChannelID(const int chanid)
Store the channel ID.
std::vector< int > cids_
Capacitor IDs.
std::vector< int > tdcs_
Time to Digital counts.
std::vector< int > getCID() const
Get Cap IDs of all time samples.
void setCID(const std::vector< int > cid)
Store cids of all time samples.
int electronics_id_
electronics ID
void setADC(const std::vector< int > adc)
Store adcs of all time samples.
int module_
detector module ID (aka pad)
std::vector< int > adcs_
Analog to Digital counts.
bool operator<(const ZCCMOutput &rhs) const
A dummy operator overloading.
std::vector< int > getADC() const
Get ADCs of all time samples.