LDMX Software
trigscint::ZCCMOutput Class Reference

class for storing ZCCM output as a binary output More...

#include <ZCCMOutput.h>

Public Member Functions

 ZCCMOutput ()=default
 Default constructor.
 
virtual ~ZCCMOutput ()=default
 Default destructor.
 
void clear (Option_t *option="")
 A dummy function.
 
bool operator< (const ZCCMOutput &rhs) const
 A dummy operator overloading.
 
int getChannelID () const
 Get channel ID.
 
uint8_t getElectronicsID () const
 Get electronics ID.
 
std::vector< int > getADC () const
 Get ADCs of all time samples.
 
std::vector< int > getTDC () const
 Get TDCs of all time samples.
 
std::vector< int > getCID () const
 Get Cap IDs of all time samples.
 
void setChannelID (const int chanid)
 Store the channel ID.
 
void setElectronicsID (const int elecid)
 Store the electronics ID.
 
void setADC (const std::vector< int > adc)
 Store adcs of all time samples.
 
void setTDC (const std::vector< int > tdc)
 Store tdcs of all time samples.
 
void setCID (const std::vector< int > cid)
 Store cids of all time samples.
 

Static Public Attributes

static const int DAQHEADER_POS {0}
 
static const int DAQHEADER_LEN_BYTES {16}
 
static const int TIMESTAMP_POS {DAQHEADER_POS + DAQHEADER_LEN_BYTES}
 
static const int TIMESTAMP_LEN_BYTES {8}
 
static const int EMPTY_HEADER_WORD_POS {TIMESTAMP_POS + TIMESTAMP_LEN_BYTES}
 
static const int EMPTY_HEADER_WORD_LEN_BYTES {8}
 
static const int EVENTDATA_POS
 
static const int NUM_CHAN_PER_LANE {6}
 
static const int ADC_SAMPLE_WORD_POS {0}
 
static const int ADC_LEN_BYTES {1 * NUM_CHAN_PER_LANE}
 
static const int EMPTY_WORD_SAMPLE_WORD_POS
 
static const int EMPTY_WORD_LEN_BYTES {2}
 
static const int TDC_SAMPLE_WORD_POS
 
static const int TDC_LEN_BYTES {1 * NUM_CHAN_PER_LANE}
 
static const int FLAGS_SAMPLE_WORD_POS {TDC_SAMPLE_WORD_POS + TDC_LEN_BYTES}
 
static const int FLAGS_LEN_BYTES {1}
 
static const int LANE_SAMPLE_WORD_POS
 
static const int LANE_LEN_BYTES {1}
 
static const int CAPID_POS_IN_FLAG {0}
 
static const int CAPID_LEN_BITS {2}
 
static const int CE_POS_IN_FLAG {CAPID_POS_IN_FLAG + CAPID_LEN_BITS}
 
static const int CE_LEN_BITS {1}
 
static const int BC0_POS_IN_FLAG {CE_POS_IN_FLAG + CE_LEN_BITS}
 
static const int BC0_LEN_BITS {1}
 
static const int EMPTY_FLAG_WORD_POS_IN_FLAG {BC0_POS_IN_FLAG + BC0_LEN_BITS}
 
static const int EMPTY_FLAG_WORD_LEN_BITS {4}
 
static const int SAMPLE_WORD_LEN_BYTES
 

Private Member Functions

 ClassDef (ZCCMOutput, 1)
 

Private Attributes

int lane_
 detector lane ID (aka fiber)
 
int module_
 detector module ID (aka pad)
 
int chan_id_
 detector channel ID (bar nb)
 
int electronics_id_
 electronics ID
 
std::vector< int > adcs_
 Analog to Digital counts.
 
std::vector< int > tdcs_
 Time to Digital counts.
 
std::vector< int > cids_
 Capacitor IDs.
 

Friends

std::ostream & operator<< (std::ostream &o, const ZCCMOutput &d)
 Print ifo about the class.
 

Detailed Description

class for storing ZCCM output as a binary output

Definition at line 15 of file ZCCMOutput.h.

Member Function Documentation

◆ clear()

void trigscint::ZCCMOutput::clear ( Option_t * option = "")

A dummy function.

Note
required by Event/include/Event/EventDef.h

◆ getADC()

std::vector< int > trigscint::ZCCMOutput::getADC ( ) const
inline

Get ADCs of all time samples.

Definition at line 55 of file ZCCMOutput.h.

55{ return adcs_; }
std::vector< int > adcs_
Analog to Digital counts.
Definition ZCCMOutput.h:162

References adcs_.

◆ getChannelID()

int trigscint::ZCCMOutput::getChannelID ( ) const
inline

Get channel ID.

Definition at line 45 of file ZCCMOutput.h.

45{ return chan_id_; }
int chan_id_
detector channel ID (bar nb)
Definition ZCCMOutput.h:158

References chan_id_.

◆ getCID()

std::vector< int > trigscint::ZCCMOutput::getCID ( ) const
inline

Get Cap IDs of all time samples.

Definition at line 65 of file ZCCMOutput.h.

65{ return cids_; }
std::vector< int > cids_
Capacitor IDs.
Definition ZCCMOutput.h:166

References cids_.

◆ getElectronicsID()

uint8_t trigscint::ZCCMOutput::getElectronicsID ( ) const
inline

Get electronics ID.

Definition at line 50 of file ZCCMOutput.h.

50{ return electronics_id_; }
int electronics_id_
electronics ID
Definition ZCCMOutput.h:160

References electronics_id_.

◆ getTDC()

std::vector< int > trigscint::ZCCMOutput::getTDC ( ) const
inline

Get TDCs of all time samples.

Definition at line 60 of file ZCCMOutput.h.

60{ return tdcs_; }
std::vector< int > tdcs_
Time to Digital counts.
Definition ZCCMOutput.h:164

References tdcs_.

◆ operator<()

bool trigscint::ZCCMOutput::operator< ( const ZCCMOutput & rhs) const
inline

A dummy operator overloading.

Note
required for declaring std::vector<> in EventDef.h

Definition at line 38 of file ZCCMOutput.h.

38 {
39 return this->chan_id_ < rhs.chan_id_;
40 }

References chan_id_.

◆ setADC()

void trigscint::ZCCMOutput::setADC ( const std::vector< int > adc)
inline

Store adcs of all time samples.

Parameters
adc_array of adcs

Definition at line 81 of file ZCCMOutput.h.

81{ adcs_ = adc; }

References adcs_.

◆ setChannelID()

void trigscint::ZCCMOutput::setChannelID ( const int chanid)
inline

Store the channel ID.

Definition at line 70 of file ZCCMOutput.h.

70{ chan_id_ = chanid; }

References chan_id_.

◆ setCID()

void trigscint::ZCCMOutput::setCID ( const std::vector< int > cid)
inline

Store cids of all time samples.

Parameters
cid_array of cids

Definition at line 93 of file ZCCMOutput.h.

93{ cids_ = cid; }

References cids_.

◆ setElectronicsID()

void trigscint::ZCCMOutput::setElectronicsID ( const int elecid)
inline

Store the electronics ID.

Definition at line 75 of file ZCCMOutput.h.

75{ electronics_id_ = elecid; }

References electronics_id_.

◆ setTDC()

void trigscint::ZCCMOutput::setTDC ( const std::vector< int > tdc)
inline

Store tdcs of all time samples.

Parameters
tdc_array of tdcs

Definition at line 87 of file ZCCMOutput.h.

87{ tdcs_ = tdc; }

References tdcs_.

Member Data Documentation

◆ ADC_LEN_BYTES

const int trigscint::ZCCMOutput::ADC_LEN_BYTES {1 * NUM_CHAN_PER_LANE}
static

Definition at line 123 of file ZCCMOutput.h.

123{1 * NUM_CHAN_PER_LANE};

◆ ADC_SAMPLE_WORD_POS

const int trigscint::ZCCMOutput::ADC_SAMPLE_WORD_POS {0}
static

Definition at line 122 of file ZCCMOutput.h.

122{0};

◆ adcs_

std::vector<int> trigscint::ZCCMOutput::adcs_
private

Analog to Digital counts.

Definition at line 162 of file ZCCMOutput.h.

Referenced by getADC(), and setADC().

◆ BC0_LEN_BITS

const int trigscint::ZCCMOutput::BC0_LEN_BITS {1}
static

Definition at line 141 of file ZCCMOutput.h.

141{1};

◆ BC0_POS_IN_FLAG

const int trigscint::ZCCMOutput::BC0_POS_IN_FLAG {CE_POS_IN_FLAG + CE_LEN_BITS}
static

Definition at line 140 of file ZCCMOutput.h.

140{CE_POS_IN_FLAG + CE_LEN_BITS};

◆ CAPID_LEN_BITS

const int trigscint::ZCCMOutput::CAPID_LEN_BITS {2}
static

Definition at line 137 of file ZCCMOutput.h.

137{2};

◆ CAPID_POS_IN_FLAG

const int trigscint::ZCCMOutput::CAPID_POS_IN_FLAG {0}
static

Definition at line 136 of file ZCCMOutput.h.

136{0};

◆ CE_LEN_BITS

const int trigscint::ZCCMOutput::CE_LEN_BITS {1}
static

Definition at line 139 of file ZCCMOutput.h.

139{1};

◆ CE_POS_IN_FLAG

const int trigscint::ZCCMOutput::CE_POS_IN_FLAG {CAPID_POS_IN_FLAG + CAPID_LEN_BITS}
static

Definition at line 138 of file ZCCMOutput.h.

138{CAPID_POS_IN_FLAG + CAPID_LEN_BITS};

◆ chan_id_

int trigscint::ZCCMOutput::chan_id_
private

detector channel ID (bar nb)

Definition at line 158 of file ZCCMOutput.h.

Referenced by getChannelID(), operator<(), and setChannelID().

◆ cids_

std::vector<int> trigscint::ZCCMOutput::cids_
private

Capacitor IDs.

Definition at line 166 of file ZCCMOutput.h.

Referenced by getCID(), and setCID().

◆ DAQHEADER_LEN_BYTES

const int trigscint::ZCCMOutput::DAQHEADER_LEN_BYTES {16}
static

Definition at line 107 of file ZCCMOutput.h.

107{16};

◆ DAQHEADER_POS

const int trigscint::ZCCMOutput::DAQHEADER_POS {0}
static

Definition at line 106 of file ZCCMOutput.h.

106{0};

◆ electronics_id_

int trigscint::ZCCMOutput::electronics_id_
private

electronics ID

Definition at line 160 of file ZCCMOutput.h.

Referenced by getElectronicsID(), and setElectronicsID().

◆ EMPTY_FLAG_WORD_LEN_BITS

const int trigscint::ZCCMOutput::EMPTY_FLAG_WORD_LEN_BITS {4}
static

Definition at line 143 of file ZCCMOutput.h.

143{4};

◆ EMPTY_FLAG_WORD_POS_IN_FLAG

const int trigscint::ZCCMOutput::EMPTY_FLAG_WORD_POS_IN_FLAG {BC0_POS_IN_FLAG + BC0_LEN_BITS}
static

Definition at line 142 of file ZCCMOutput.h.

142{BC0_POS_IN_FLAG + BC0_LEN_BITS};

◆ EMPTY_HEADER_WORD_LEN_BYTES

const int trigscint::ZCCMOutput::EMPTY_HEADER_WORD_LEN_BYTES {8}
static

Definition at line 111 of file ZCCMOutput.h.

111{8};

◆ EMPTY_HEADER_WORD_POS

const int trigscint::ZCCMOutput::EMPTY_HEADER_WORD_POS {TIMESTAMP_POS + TIMESTAMP_LEN_BYTES}
static

Definition at line 110 of file ZCCMOutput.h.

110{TIMESTAMP_POS + TIMESTAMP_LEN_BYTES};

◆ EMPTY_WORD_LEN_BYTES

const int trigscint::ZCCMOutput::EMPTY_WORD_LEN_BYTES {2}
static

Definition at line 126 of file ZCCMOutput.h.

126{2};

◆ EMPTY_WORD_SAMPLE_WORD_POS

const int trigscint::ZCCMOutput::EMPTY_WORD_SAMPLE_WORD_POS
static
Initial value:
{ADC_SAMPLE_WORD_POS +
ADC_LEN_BYTES}

Definition at line 124 of file ZCCMOutput.h.

124 {ADC_SAMPLE_WORD_POS +
125 ADC_LEN_BYTES};

◆ EVENTDATA_POS

const int trigscint::ZCCMOutput::EVENTDATA_POS
static
Initial value:
{EMPTY_HEADER_WORD_POS +
EMPTY_HEADER_WORD_LEN_BYTES}

Definition at line 113 of file ZCCMOutput.h.

113 {EMPTY_HEADER_WORD_POS +
114 EMPTY_HEADER_WORD_LEN_BYTES};

◆ FLAGS_LEN_BYTES

const int trigscint::ZCCMOutput::FLAGS_LEN_BYTES {1}
static

Definition at line 131 of file ZCCMOutput.h.

131{1};

◆ FLAGS_SAMPLE_WORD_POS

const int trigscint::ZCCMOutput::FLAGS_SAMPLE_WORD_POS {TDC_SAMPLE_WORD_POS + TDC_LEN_BYTES}
static

Definition at line 130 of file ZCCMOutput.h.

130{TDC_SAMPLE_WORD_POS + TDC_LEN_BYTES};

◆ lane_

int trigscint::ZCCMOutput::lane_
private

detector lane ID (aka fiber)

Definition at line 154 of file ZCCMOutput.h.

◆ LANE_LEN_BYTES

const int trigscint::ZCCMOutput::LANE_LEN_BYTES {1}
static

Definition at line 134 of file ZCCMOutput.h.

134{1};

◆ LANE_SAMPLE_WORD_POS

const int trigscint::ZCCMOutput::LANE_SAMPLE_WORD_POS
static
Initial value:
{FLAGS_SAMPLE_WORD_POS +
FLAGS_LEN_BYTES}

Definition at line 132 of file ZCCMOutput.h.

132 {FLAGS_SAMPLE_WORD_POS +
133 FLAGS_LEN_BYTES};

◆ module_

int trigscint::ZCCMOutput::module_
private

detector module ID (aka pad)

Definition at line 156 of file ZCCMOutput.h.

◆ NUM_CHAN_PER_LANE

const int trigscint::ZCCMOutput::NUM_CHAN_PER_LANE {6}
static

Definition at line 121 of file ZCCMOutput.h.

121{6};

◆ SAMPLE_WORD_LEN_BYTES

const int trigscint::ZCCMOutput::SAMPLE_WORD_LEN_BYTES
static
Initial value:
= ADC_LEN_BYTES + TDC_LEN_BYTES +
EMPTY_WORD_LEN_BYTES +
FLAGS_LEN_BYTES + LANE_LEN_BYTES

Definition at line 148 of file ZCCMOutput.h.

◆ TDC_LEN_BYTES

const int trigscint::ZCCMOutput::TDC_LEN_BYTES {1 * NUM_CHAN_PER_LANE}
static

Definition at line 129 of file ZCCMOutput.h.

129{1 * NUM_CHAN_PER_LANE};

◆ TDC_SAMPLE_WORD_POS

const int trigscint::ZCCMOutput::TDC_SAMPLE_WORD_POS
static
Initial value:
{EMPTY_WORD_SAMPLE_WORD_POS +
EMPTY_WORD_LEN_BYTES}

Definition at line 127 of file ZCCMOutput.h.

127 {EMPTY_WORD_SAMPLE_WORD_POS +
128 EMPTY_WORD_LEN_BYTES};

◆ tdcs_

std::vector<int> trigscint::ZCCMOutput::tdcs_
private

Time to Digital counts.

Definition at line 164 of file ZCCMOutput.h.

Referenced by getTDC(), and setTDC().

◆ TIMESTAMP_LEN_BYTES

const int trigscint::ZCCMOutput::TIMESTAMP_LEN_BYTES {8}
static

Definition at line 109 of file ZCCMOutput.h.

109{8};

◆ TIMESTAMP_POS

const int trigscint::ZCCMOutput::TIMESTAMP_POS {DAQHEADER_POS + DAQHEADER_LEN_BYTES}
static

Definition at line 108 of file ZCCMOutput.h.

108{DAQHEADER_POS + DAQHEADER_LEN_BYTES};

The documentation for this class was generated from the following file: