LDMX Software
trigscint::QIEStream Class Reference

class for storing QIE output as a binary stream More...

#include <QIEStream.h>

Public Member Functions

 QIEStream ()=default
 Default constructor.
 
virtual ~QIEStream ()=default
 Default destructor.
 
void clear (Option_t *option="")
 A dummy function.
 
bool operator< (const QIEStream &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 TIMESTAMP_POS {0}
 
static const int TIMESTAMP_LEN_BYTES {4}
 
static const int TIMESTAMPCLOCK_POS {TIMESTAMP_POS + TIMESTAMP_LEN_BYTES}
 
static const int TIMESTAMPCLOCK_LEN_BYTES {4}
 
static const int TIMESINCESPILL_POS
 
static const int TIMESINCESPILL_LEN_BYTES {4}
 
static const int TRIGID_POS {TIMESINCESPILL_POS + TIMESINCESPILL_LEN_BYTES}
 
static const int TRIGID_LEN_BYTES {3}
 
static const int ERROR_POS {TRIGID_POS + TRIGID_LEN_BYTES}
 
static const int ERROR_LEN_BYTES {1}
 
static const int FLAG_SIZE_BITS {1}
 
static const int CRC0_ERR_POS {0}
 
static const int CRC1_ERR_POS {1}
 
static const int CID_UNSYNC_POS {2}
 
static const int CID_SKIP_POS {3}
 
static const int CHECKSUM_POS {CID_SKIP_POS + FLAG_SIZE_BITS}
 
static const int CHECKSUM_SIZE_BITS {4}
 
static const int NUM_SAMPLES {5}
 

Private Member Functions

 ClassDef (QIEStream, 2)
 

Private Attributes

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 QIEStream &d)
 Print ifo about the class.
 

Detailed Description

class for storing QIE output as a binary stream

Definition at line 25 of file QIEStream.h.

Member Function Documentation

◆ clear()

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

A dummy function.

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

◆ getADC()

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

Get ADCs of all time samples.

Definition at line 65 of file QIEStream.h.

65{ return adcs_; }
std::vector< int > adcs_
Analog to Digital counts.
Definition QIEStream.h:141

References adcs_.

◆ getChannelID()

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

Get channel ID.

Definition at line 55 of file QIEStream.h.

55{ return chan_id_; }
int chan_id_
detector channel ID (bar nb)
Definition QIEStream.h:137

References chan_id_.

◆ getCID()

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

Get Cap IDs of all time samples.

Definition at line 75 of file QIEStream.h.

75{ return cids_; }
std::vector< int > cids_
Capacitor IDs.
Definition QIEStream.h:145

References cids_.

◆ getElectronicsID()

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

Get electronics ID.

Definition at line 60 of file QIEStream.h.

60{ return electronics_id_; }
int electronics_id_
electronics ID
Definition QIEStream.h:139

References electronics_id_.

◆ getTDC()

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

Get TDCs of all time samples.

Definition at line 70 of file QIEStream.h.

70{ return tdcs_; }
std::vector< int > tdcs_
Time to Digital counts.
Definition QIEStream.h:143

References tdcs_.

◆ operator<()

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

A dummy operator overloading.

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

Definition at line 48 of file QIEStream.h.

48 {
49 return this->chan_id_ < rhs.chan_id_;
50 }

References chan_id_.

◆ setADC()

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

Store adcs of all time samples.

Parameters
adc_array of adcs

Definition at line 91 of file QIEStream.h.

91{ adcs_ = adc; }

References adcs_.

Referenced by trigscint::QIEEncoder::produce().

◆ setChannelID()

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

Store the channel ID.

Definition at line 80 of file QIEStream.h.

80{ chan_id_ = chanid; }

References chan_id_.

◆ setCID()

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

Store cids of all time samples.

Parameters
cid_array of cids

Definition at line 103 of file QIEStream.h.

103{ cids_ = cid; }

References cids_.

Referenced by trigscint::QIEEncoder::produce().

◆ setElectronicsID()

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

Store the electronics ID.

Definition at line 85 of file QIEStream.h.

85{ electronics_id_ = elecid; }

References electronics_id_.

Referenced by trigscint::QIEEncoder::produce().

◆ setTDC()

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

Store tdcs of all time samples.

Parameters
tdc_array of tdcs

Definition at line 97 of file QIEStream.h.

97{ tdcs_ = tdc; }

References tdcs_.

Referenced by trigscint::QIEEncoder::produce().

Member Data Documentation

◆ adcs_

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

Analog to Digital counts.

Definition at line 141 of file QIEStream.h.

Referenced by getADC(), and setADC().

◆ chan_id_

int trigscint::QIEStream::chan_id_
private

detector channel ID (bar nb)

Definition at line 137 of file QIEStream.h.

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

◆ CHECKSUM_POS

const int trigscint::QIEStream::CHECKSUM_POS {CID_SKIP_POS + FLAG_SIZE_BITS}
static

Definition at line 128 of file QIEStream.h.

128{CID_SKIP_POS + FLAG_SIZE_BITS};

◆ CHECKSUM_SIZE_BITS

const int trigscint::QIEStream::CHECKSUM_SIZE_BITS {4}
static

Definition at line 130 of file QIEStream.h.

130{4};

◆ CID_SKIP_POS

const int trigscint::QIEStream::CID_SKIP_POS {3}
static

Definition at line 127 of file QIEStream.h.

127{3};

◆ CID_UNSYNC_POS

const int trigscint::QIEStream::CID_UNSYNC_POS {2}
static

Definition at line 126 of file QIEStream.h.

126{2};

◆ cids_

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

Capacitor IDs.

Definition at line 145 of file QIEStream.h.

Referenced by getCID(), and setCID().

◆ CRC0_ERR_POS

const int trigscint::QIEStream::CRC0_ERR_POS {0}
static

Definition at line 124 of file QIEStream.h.

124{0};

◆ CRC1_ERR_POS

const int trigscint::QIEStream::CRC1_ERR_POS {1}
static

Definition at line 125 of file QIEStream.h.

125{1};

◆ electronics_id_

int trigscint::QIEStream::electronics_id_
private

electronics ID

Definition at line 139 of file QIEStream.h.

Referenced by getElectronicsID(), and setElectronicsID().

◆ ERROR_LEN_BYTES

const int trigscint::QIEStream::ERROR_LEN_BYTES {1}
static

Definition at line 121 of file QIEStream.h.

121{1};

◆ ERROR_POS

const int trigscint::QIEStream::ERROR_POS {TRIGID_POS + TRIGID_LEN_BYTES}
static

Definition at line 120 of file QIEStream.h.

120{TRIGID_POS + TRIGID_LEN_BYTES};

◆ FLAG_SIZE_BITS

const int trigscint::QIEStream::FLAG_SIZE_BITS {1}
static

Definition at line 123 of file QIEStream.h.

123{1};

◆ NUM_SAMPLES

const int trigscint::QIEStream::NUM_SAMPLES {5}
static

Definition at line 133 of file QIEStream.h.

133{5};

◆ tdcs_

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

Time to Digital counts.

Definition at line 143 of file QIEStream.h.

Referenced by getTDC(), and setTDC().

◆ TIMESINCESPILL_LEN_BYTES

const int trigscint::QIEStream::TIMESINCESPILL_LEN_BYTES {4}
static

Definition at line 117 of file QIEStream.h.

117{4};

◆ TIMESINCESPILL_POS

const int trigscint::QIEStream::TIMESINCESPILL_POS
static
Initial value:
{TIMESTAMPCLOCK_POS +
TIMESTAMPCLOCK_LEN_BYTES}

Definition at line 115 of file QIEStream.h.

115 {TIMESTAMPCLOCK_POS +
116 TIMESTAMPCLOCK_LEN_BYTES};

◆ TIMESTAMP_LEN_BYTES

const int trigscint::QIEStream::TIMESTAMP_LEN_BYTES {4}
static

Definition at line 112 of file QIEStream.h.

112{4};

◆ TIMESTAMP_POS

const int trigscint::QIEStream::TIMESTAMP_POS {0}
static

Definition at line 111 of file QIEStream.h.

111{0};

◆ TIMESTAMPCLOCK_LEN_BYTES

const int trigscint::QIEStream::TIMESTAMPCLOCK_LEN_BYTES {4}
static

Definition at line 114 of file QIEStream.h.

114{4};

◆ TIMESTAMPCLOCK_POS

const int trigscint::QIEStream::TIMESTAMPCLOCK_POS {TIMESTAMP_POS + TIMESTAMP_LEN_BYTES}
static

Definition at line 113 of file QIEStream.h.

113{TIMESTAMP_POS + TIMESTAMP_LEN_BYTES};

◆ TRIGID_LEN_BYTES

const int trigscint::QIEStream::TRIGID_LEN_BYTES {3}
static

Definition at line 119 of file QIEStream.h.

119{3};

◆ TRIGID_POS

const int trigscint::QIEStream::TRIGID_POS {TIMESINCESPILL_POS + TIMESINCESPILL_LEN_BYTES}
static

Definition at line 118 of file QIEStream.h.

118{TIMESINCESPILL_POS + TIMESINCESPILL_LEN_BYTES};

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