Belle II Software development
PXDDAQDHEStatus Class Referencefinal

The PXD DAQ DHE Status class. More...

#include <PXDDAQDHEStatus.h>

Public Member Functions

 PXDDAQDHEStatus ()
 Default constructor for the ROOT IO.
 
 PXDDAQDHEStatus (VxdID id, int dheid, const PXDErrorFlags &mask, unsigned short tg, unsigned short fn)
 constructor setting the error mask, dheid, raw and reduced data counters, ...
 
virtual ~PXDDAQDHEStatus ()
 destructor
 
bool isUsable () const
 Return Usability of data.
 
void markUnusable ()
 Mark Data in DHE as Unusable.
 
void setErrorMask (const PXDErrorFlags &mask)
 Set Error bit mask.
 
PXDErrorFlags getErrorMask (void) const
 Return Error bit mask.
 
void setCritErrorMask (const PXDErrorFlags &mask)
 Set Critical Error bit mask.
 
PXDErrorFlags getCritErrorMask (void) const
 Return Critical Error bit mask.
 
void Decide (void)
 Calculate the usability decision If any of the critical bits is set in the error mask the PXD data from this DHE is not usable for analysis TODO Maybe this decision needs improvement.
 
void setDHEID (VxdID id, int dheid)
 Set VxdID and DHE ID of sensor.
 
unsigned short getDHEID (void) const
 Get DHE ID of sensor.
 
VxdID getSensorID (void) const
 Get VxdID of sensor.
 
void setCounters (uint32_t raw, uint32_t red)
 Set Data counters for reduction calculation.
 
void getCounters (uint32_t &raw, uint32_t &red) const
 Get Data counters for reduction calculation.
 
uint32_t getRawCnt (void) const
 Set Raw Data counter for reduction calculation.
 
uint32_t getRedCnt (void) const
 Set Reduced Data counter for reduction calculation.
 
void setTriggerGate (unsigned int tg)
 set Trigger Gate
 
unsigned short getTriggerGate (void) const
 get Trigger Gate
 
unsigned short getStartRow (void) const
 get Trigger Start Row
 
void setFrameNr (unsigned int fn)
 set Readout Frame number
 
unsigned short getFrameNr (void) const
 get Readout Frame number
 
unsigned short getDHPFoundMask (void)
 get Mask for found DHPs with valid data
 
void setDHPFoundMask (unsigned short dhpmask)
 set Mask for found DHPs with valid data
 
void setEndErrorInfo (uint32_t e)
 set erroinfo from the DHE END
 
uint32_t getEndErrorInfo (void) const
 get erroinfo from the DHE END
 
void addDHP (PXDDAQDHPStatus &daqdhp)
 Add DHP information.
 
template<class ... Args>
PXDDAQDHPStatusnewDHP (Args &&... params)
 New DHP information.
 
std::vector< PXDDAQDHPStatus >::iterator begin ()
 iterator-based iteration for DHPs
 
std::vector< PXDDAQDHPStatus >::iterator end ()
 iterator-based iteration for DHPs
 
std::vector< PXDDAQDHPStatus >::const_iterator cbegin () const
 const iterator-based iteration for DHPs
 
std::vector< PXDDAQDHPStatus >::const_iterator cend () const
 const iterator-based iteration for DHPs
 
PXDDAQDHPStatusdhp_back ()
 Returns PXDDAQDHPStatus for the last DHP.
 
size_t dhp_size () const
 Returns number of DHPs.
 
auto addCM (PXDDAQDHPComMode &daqcm)
 Add Common Mode information.
 
std::vector< PXDDAQDHPComMode >::iterator cm_begin ()
 iterator-based iteration for Common Mode
 
std::vector< PXDDAQDHPComMode >::iterator cm_end ()
 iterator-based iteration for Common Mode
 
PXDDAQDHPComModecm_back ()
 Returns last Common Mode for this event.
 
size_t cm_size () const
 Returns number of Common Mode blocks in this event.
 
int get_cm_dhp (int i) const
 Returns CM DHP ID at position i.
 
int get_cm_row (int i) const
 Returns CM row at position i.
 
int get_cm_value (int i) const
 Returns CM value at position i.
 

Private Member Functions

 ClassDef (PXDDAQDHEStatus, 8)
 necessary for ROOT
 

Private Attributes

PXDErrorFlags m_errorMask
 errors found in this DHE/sensor
 
PXDErrorFlags m_critErrorMask
 critical error mask
 
bool m_usable
 data is useable.
 
unsigned short m_sensorID
 Sensor ID.
 
unsigned short m_dheID
 DHE ID as delivered by DAQ.
 
unsigned short m_triggerGate
 Trigger Gate ("Startrow") from DHE header.
 
unsigned short m_frameNr
 Frame number (low bits) from DHE header.
 
unsigned short m_dhp_found_mask
 Mask for DHP with valid data.
 
uint32_t m_rawCount
 raw byte count for monitoring
 
uint32_t m_redCount
 reduced byte count for monitoring
 
uint32_t m_errorinfo
 erroinfo from the DHE END
 
std::vector< PXDDAQDHPStatusm_pxdDHP
 Vector of DHP informations belonging to this event.
 
std::vector< PXDDAQDHPComModem_commode
 Vector of Common Mode informations belonging to this event.
 

Detailed Description

The PXD DAQ DHE Status class.

This is a small class that records information about PXD DAQ DHE status It will record if the data of this sensor (readout by this DHE) is useable.

Definition at line 34 of file PXDDAQDHEStatus.h.

Constructor & Destructor Documentation

◆ PXDDAQDHEStatus() [1/2]

PXDDAQDHEStatus ( )
inline

Default constructor for the ROOT IO.

Definition at line 38 of file PXDDAQDHEStatus.h.

PXDErrorFlags m_critErrorMask
critical error mask
unsigned short m_sensorID
Sensor ID.
uint32_t m_redCount
reduced byte count for monitoring
PXDErrorFlags m_errorMask
errors found in this DHE/sensor
unsigned short m_dheID
DHE ID as delivered by DAQ.
uint32_t m_errorinfo
erroinfo from the DHE END
uint32_t m_rawCount
raw byte count for monitoring
unsigned short m_dhp_found_mask
Mask for DHP with valid data.
unsigned short m_triggerGate
Trigger Gate ("Startrow") from DHE header.
unsigned short m_frameNr
Frame number (low bits) from DHE header.
bool m_usable
data is useable.

◆ PXDDAQDHEStatus() [2/2]

PXDDAQDHEStatus ( VxdID  id,
int  dheid,
const PXDErrorFlags &  mask,
unsigned short  tg,
unsigned short  fn 
)
inline

constructor setting the error mask, dheid, raw and reduced data counters, ...

Parameters
idVxdID of sensor
dheidDHEID of sensor
maskError mask
tgTrigger Gate (Start Row, Trigger Offset)
fn(absolute) Readout Frame Number, lower bits only

Definition at line 49 of file PXDDAQDHEStatus.h.

50 : m_errorMask(mask), m_critErrorMask(0), m_usable(true), m_sensorID(id), m_dheID(dheid),
52 {}

◆ ~PXDDAQDHEStatus()

virtual ~PXDDAQDHEStatus ( )
inlinevirtual

destructor

Definition at line 55 of file PXDDAQDHEStatus.h.

55{};

Member Function Documentation

◆ addCM()

auto addCM ( PXDDAQDHPComMode daqcm)
inline

Add Common Mode information.

Parameters
daqcmDHP Common Mode object

Definition at line 161 of file PXDDAQDHEStatus.h.

161{ return m_commode.push_back(daqcm);};
std::vector< PXDDAQDHPComMode > m_commode
Vector of Common Mode informations belonging to this event.

◆ addDHP()

void addDHP ( PXDDAQDHPStatus daqdhp)
inline

Add DHP information.

Parameters
daqdhpDHP Status Object

Definition at line 132 of file PXDDAQDHEStatus.h.

132{ m_pxdDHP.push_back(daqdhp);};
std::vector< PXDDAQDHPStatus > m_pxdDHP
Vector of DHP informations belonging to this event.

◆ begin()

std::vector< PXDDAQDHPStatus >::iterator begin ( )
inline

iterator-based iteration for DHPs

Definition at line 145 of file PXDDAQDHEStatus.h.

145{ return m_pxdDHP.begin(); };

◆ cbegin()

std::vector< PXDDAQDHPStatus >::const_iterator cbegin ( ) const
inline

const iterator-based iteration for DHPs

Definition at line 150 of file PXDDAQDHEStatus.h.

150{ return m_pxdDHP.cbegin(); };

◆ cend()

std::vector< PXDDAQDHPStatus >::const_iterator cend ( ) const
inline

const iterator-based iteration for DHPs

Definition at line 152 of file PXDDAQDHEStatus.h.

152{ return m_pxdDHP.cend(); };

◆ cm_back()

PXDDAQDHPComMode & cm_back ( )
inline

Returns last Common Mode for this event.

Definition at line 168 of file PXDDAQDHEStatus.h.

168{ return m_commode.back(); };

◆ cm_begin()

std::vector< PXDDAQDHPComMode >::iterator cm_begin ( )
inline

iterator-based iteration for Common Mode

Definition at line 164 of file PXDDAQDHEStatus.h.

164{ return m_commode.begin(); };

◆ cm_end()

std::vector< PXDDAQDHPComMode >::iterator cm_end ( )
inline

iterator-based iteration for Common Mode

Definition at line 166 of file PXDDAQDHEStatus.h.

166{ return m_commode.end(); };

◆ cm_size()

size_t cm_size ( ) const
inline

Returns number of Common Mode blocks in this event.

Definition at line 170 of file PXDDAQDHEStatus.h.

170{ return m_commode.size(); };

◆ Decide()

void Decide ( void  )
inline

Calculate the usability decision If any of the critical bits is set in the error mask the PXD data from this DHE is not usable for analysis TODO Maybe this decision needs improvement.

Definition at line 90 of file PXDDAQDHEStatus.h.

90{m_usable = (m_errorMask & m_critErrorMask) == PXDErrorFlags(0) && !m_errorMask[EPXDErrNr::c_nrUNUSABLE_DATA];}

◆ dhp_back()

PXDDAQDHPStatus & dhp_back ( )
inline

Returns PXDDAQDHPStatus for the last DHP.

Definition at line 154 of file PXDDAQDHEStatus.h.

154{ return m_pxdDHP.back(); };

◆ dhp_size()

size_t dhp_size ( ) const
inline

Returns number of DHPs.

Definition at line 156 of file PXDDAQDHEStatus.h.

156{ return m_pxdDHP.size(); };

◆ end()

std::vector< PXDDAQDHPStatus >::iterator end ( )
inline

iterator-based iteration for DHPs

Definition at line 147 of file PXDDAQDHEStatus.h.

147{ return m_pxdDHP.end(); };

◆ get_cm_dhp()

int get_cm_dhp ( int  i) const
inline

Returns CM DHP ID at position i.

Definition at line 172 of file PXDDAQDHEStatus.h.

172{ return std::get<0>(m_commode[i]); };

◆ get_cm_row()

int get_cm_row ( int  i) const
inline

Returns CM row at position i.

Definition at line 174 of file PXDDAQDHEStatus.h.

174{ return std::get<1>(m_commode[i]); };

◆ get_cm_value()

int get_cm_value ( int  i) const
inline

Returns CM value at position i.

Definition at line 176 of file PXDDAQDHEStatus.h.

176{ return std::get<2>(m_commode[i]); };

◆ getCounters()

void getCounters ( uint32_t &  raw,
uint32_t &  red 
) const
inline

Get Data counters for reduction calculation.

Definition at line 102 of file PXDDAQDHEStatus.h.

102{ raw = m_rawCount; red = m_redCount;};

◆ getCritErrorMask()

PXDErrorFlags getCritErrorMask ( void  ) const
inline

Return Critical Error bit mask.

Returns
bit mask

Definition at line 83 of file PXDDAQDHEStatus.h.

83{ return m_critErrorMask; }

◆ getDHEID()

unsigned short getDHEID ( void  ) const
inline

Get DHE ID of sensor.

Definition at line 95 of file PXDDAQDHEStatus.h.

95{ return m_dheID;};

◆ getDHPFoundMask()

unsigned short getDHPFoundMask ( void  )
inline

get Mask for found DHPs with valid data

Definition at line 120 of file PXDDAQDHEStatus.h.

120{ return m_dhp_found_mask;};

◆ getEndErrorInfo()

uint32_t getEndErrorInfo ( void  ) const
inline

get erroinfo from the DHE END

Definition at line 127 of file PXDDAQDHEStatus.h.

127{ return m_errorinfo;};

◆ getErrorMask()

PXDErrorFlags getErrorMask ( void  ) const
inline

Return Error bit mask.

Returns
bit mask

Definition at line 73 of file PXDDAQDHEStatus.h.

73{ return m_errorMask; }

◆ getFrameNr()

unsigned short getFrameNr ( void  ) const
inline

get Readout Frame number

Definition at line 116 of file PXDDAQDHEStatus.h.

116{ return m_frameNr;};

◆ getRawCnt()

uint32_t getRawCnt ( void  ) const
inline

Set Raw Data counter for reduction calculation.

Definition at line 104 of file PXDDAQDHEStatus.h.

104{ return m_rawCount;};

◆ getRedCnt()

uint32_t getRedCnt ( void  ) const
inline

Set Reduced Data counter for reduction calculation.

Definition at line 106 of file PXDDAQDHEStatus.h.

106{ return m_redCount;};

◆ getSensorID()

VxdID getSensorID ( void  ) const
inline

Get VxdID of sensor.

Definition at line 97 of file PXDDAQDHEStatus.h.

97{ return m_sensorID;};

◆ getStartRow()

unsigned short getStartRow ( void  ) const
inline

get Trigger Start Row

Definition at line 112 of file PXDDAQDHEStatus.h.

112{ return m_triggerGate * 4;};

◆ getTriggerGate()

unsigned short getTriggerGate ( void  ) const
inline

get Trigger Gate

Definition at line 110 of file PXDDAQDHEStatus.h.

110{ return m_triggerGate;};

◆ isUsable()

bool isUsable ( ) const
inline

Return Usability of data.

Returns
conclusion if data is useable

Definition at line 60 of file PXDDAQDHEStatus.h.

60{ return m_usable; }

◆ markUnusable()

void markUnusable ( )
inline

Mark Data in DHE as Unusable.

Definition at line 64 of file PXDDAQDHEStatus.h.

64{ m_usable = false; m_errorMask[EPXDErrNr::c_nrUNUSABLE_DATA] = true;}

◆ newDHP()

PXDDAQDHPStatus & newDHP ( Args &&...  params)
inline

New DHP information.

Parameters
paramsconstructor parameter
Returns
new DHP Status Object

Definition at line 138 of file PXDDAQDHEStatus.h.

139 {
140 /*return*/ m_pxdDHP.emplace_back(std::forward<Args>(params)...);
141 return m_pxdDHP.back();
142 }

◆ setCounters()

void setCounters ( uint32_t  raw,
uint32_t  red 
)
inline

Set Data counters for reduction calculation.

Definition at line 100 of file PXDDAQDHEStatus.h.

100{m_rawCount = raw; m_redCount = red;};

◆ setCritErrorMask()

void setCritErrorMask ( const PXDErrorFlags &  mask)
inline

Set Critical Error bit mask.

Parameters
maskBit Mask to set

Definition at line 78 of file PXDDAQDHEStatus.h.

78{ m_critErrorMask = mask; }

◆ setDHEID()

void setDHEID ( VxdID  id,
int  dheid 
)
inline

Set VxdID and DHE ID of sensor.

Definition at line 93 of file PXDDAQDHEStatus.h.

93{ m_sensorID = id; m_dheID = dheid;};

◆ setDHPFoundMask()

void setDHPFoundMask ( unsigned short  dhpmask)
inline

set Mask for found DHPs with valid data

Definition at line 122 of file PXDDAQDHEStatus.h.

122{ m_dhp_found_mask = dhpmask;};

◆ setEndErrorInfo()

void setEndErrorInfo ( uint32_t  e)
inline

set erroinfo from the DHE END

Definition at line 125 of file PXDDAQDHEStatus.h.

125{ m_errorinfo = e;};

◆ setErrorMask()

void setErrorMask ( const PXDErrorFlags &  mask)
inline

Set Error bit mask.

Parameters
maskBit Mask to set

Definition at line 69 of file PXDDAQDHEStatus.h.

69{ m_errorMask = mask; }

◆ setFrameNr()

void setFrameNr ( unsigned int  fn)
inline

set Readout Frame number

Definition at line 114 of file PXDDAQDHEStatus.h.

114{ m_frameNr = fn;};

◆ setTriggerGate()

void setTriggerGate ( unsigned int  tg)
inline

set Trigger Gate

Definition at line 108 of file PXDDAQDHEStatus.h.

108{ m_triggerGate = tg;};

Member Data Documentation

◆ m_commode

std::vector< PXDDAQDHPComMode> m_commode
private

Vector of Common Mode informations belonging to this event.

Definition at line 196 of file PXDDAQDHEStatus.h.

◆ m_critErrorMask

PXDErrorFlags m_critErrorMask
private

critical error mask

Definition at line 180 of file PXDDAQDHEStatus.h.

◆ m_dheID

unsigned short m_dheID
private

DHE ID as delivered by DAQ.

Definition at line 184 of file PXDDAQDHEStatus.h.

◆ m_dhp_found_mask

unsigned short m_dhp_found_mask
private

Mask for DHP with valid data.

Definition at line 187 of file PXDDAQDHEStatus.h.

◆ m_errorinfo

uint32_t m_errorinfo
private

erroinfo from the DHE END

Definition at line 190 of file PXDDAQDHEStatus.h.

◆ m_errorMask

PXDErrorFlags m_errorMask
private

errors found in this DHE/sensor

Definition at line 179 of file PXDDAQDHEStatus.h.

◆ m_frameNr

unsigned short m_frameNr
private

Frame number (low bits) from DHE header.

Definition at line 186 of file PXDDAQDHEStatus.h.

◆ m_pxdDHP

std::vector< PXDDAQDHPStatus> m_pxdDHP
private

Vector of DHP informations belonging to this event.

Definition at line 193 of file PXDDAQDHEStatus.h.

◆ m_rawCount

uint32_t m_rawCount
private

raw byte count for monitoring

Definition at line 188 of file PXDDAQDHEStatus.h.

◆ m_redCount

uint32_t m_redCount
private

reduced byte count for monitoring

Definition at line 189 of file PXDDAQDHEStatus.h.

◆ m_sensorID

unsigned short m_sensorID
private

Sensor ID.

Definition at line 183 of file PXDDAQDHEStatus.h.

◆ m_triggerGate

unsigned short m_triggerGate
private

Trigger Gate ("Startrow") from DHE header.

Definition at line 185 of file PXDDAQDHEStatus.h.

◆ m_usable

bool m_usable
private

data is useable.

Definition at line 181 of file PXDDAQDHEStatus.h.


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