Belle II Software development
PXDDAQDHCStatus Class Referencefinal

The PXD DAQ DHC Status class. More...

#include <PXDDAQDHCStatus.h>

Public Member Functions

 PXDDAQDHCStatus ()
 Default constructor for the ROOT IO.
 
 PXDDAQDHCStatus (int dhcid, PXDErrorFlags &mask)
 constructor setting the error mask, dhcid, raw and reduced data counters
 
virtual ~PXDDAQDHCStatus ()
 destructor
 
bool isUsable () const
 Return Usability of data.
 
void setErrorMask (const PXDErrorFlags &mask)
 Set Error bit mask This should be the OR of error masks of all sub-objects (DHC, DHE)
 
PXDErrorFlags getErrorMask (void) const
 Return Error bit mask This is the OR of error masks of all sub-objects (DHC, DHE)
 
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 DHC is not usable for analysis TODO Maybe this decision needs improvement.
 
unsigned short getDHCID (void) const
 Get DHC ID.
 
void setDHCID (int dhcid)
 Set DHC ID.
 
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 setEndErrorInfo (uint32_t e)
 set errorinfo from the DHC END
 
uint32_t getEndErrorInfo (void) const
 get errorinfo from the DHC END
 
void setGatedFlag (bool gm)
 set gating info from the DHC END
 
bool getGatedFlag (void) const
 get gating info from the DHC END
 
void setGatedHER (bool isher)
 set HER/LER gating info from the DHC END
 
bool getGatedHER (void) const
 get HER/LER gating info from the DHC END
 
void addDHE (PXDDAQDHEStatus &daqdhe)
 Add DHE information.
 
template<class ... Args>
PXDDAQDHEStatusnewDHE (Args &&... params)
 Add new DHE information.
 
std::vector< PXDDAQDHEStatus >::iterator begin ()
 iterator-based iteration for DHEs
 
std::vector< PXDDAQDHEStatus >::iterator end ()
 iterator-based iteration for DHEs
 
std::vector< PXDDAQDHEStatus >::const_iterator cbegin () const
 const iterator-based iteration for DHEs
 
std::vector< PXDDAQDHEStatus >::const_iterator cend () const
 const iterator-based iteration for DHEs
 
PXDDAQDHEStatusdhe_back ()
 Returns PXDDAQDHEStatus for last DHE.
 
size_t dhe_size () const
 Returns number of DHEs.
 

Private Member Functions

 ClassDef (PXDDAQDHCStatus, 5)
 necessary for ROOT
 

Private Attributes

PXDErrorFlags m_errorMask
 errors found in this DHC/sensor
 
PXDErrorFlags m_critErrorMask
 critical error mask
 
bool m_usable
 data is useable.
 
unsigned short m_dhcID
 DHC ID as delivered by DAQ.
 
uint32_t m_rawCount
 raw byte count for monitoring
 
uint32_t m_redCount
 reduced byte count for monitoring
 
uint32_t m_errorinfo
 errorinfo from the DHC END
 
bool m_gated_mode {false}
 gated info from the DHC START
 
bool m_gated_her {false}
 gated info from the DHC START - true HER, 0 LER
 
std::vector< PXDDAQDHEStatusm_pxdDHE
 Vector of DHE informations belonging to this event.
 

Detailed Description

The PXD DAQ DHC Status class.

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

Definition at line 31 of file PXDDAQDHCStatus.h.

Constructor & Destructor Documentation

◆ PXDDAQDHCStatus() [1/2]

PXDDAQDHCStatus ( )
inline

Default constructor for the ROOT IO.

Definition at line 35 of file PXDDAQDHCStatus.h.

PXDErrorFlags m_critErrorMask
critical error mask
uint32_t m_redCount
reduced byte count for monitoring
PXDErrorFlags m_errorMask
errors found in this DHC/sensor
uint32_t m_errorinfo
errorinfo from the DHC END
uint32_t m_rawCount
raw byte count for monitoring
unsigned short m_dhcID
DHC ID as delivered by DAQ.
bool m_usable
data is useable.

◆ PXDDAQDHCStatus() [2/2]

PXDDAQDHCStatus ( int  dhcid,
PXDErrorFlags &  mask 
)
inlineexplicit

constructor setting the error mask, dhcid, raw and reduced data counters

Parameters
dhcidDHC id
maskerror mask

Definition at line 41 of file PXDDAQDHCStatus.h.

41 : m_errorMask(mask),
42 m_critErrorMask(0), m_usable(true), m_dhcID(dhcid), m_rawCount(0), m_redCount(0), m_errorinfo(0) {}

◆ ~PXDDAQDHCStatus()

virtual ~PXDDAQDHCStatus ( )
inlinevirtual

destructor

Definition at line 45 of file PXDDAQDHCStatus.h.

45{};

Member Function Documentation

◆ addDHE()

void addDHE ( PXDDAQDHEStatus daqdhe)
inline

Add DHE information.

Parameters
daqdheDHE Status Object

Definition at line 112 of file PXDDAQDHCStatus.h.

112{ m_pxdDHE.push_back(daqdhe);};
std::vector< PXDDAQDHEStatus > m_pxdDHE
Vector of DHE informations belonging to this event.

◆ begin()

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

iterator-based iteration for DHEs

Definition at line 125 of file PXDDAQDHCStatus.h.

125{ return m_pxdDHE.begin(); };

◆ cbegin()

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

const iterator-based iteration for DHEs

Definition at line 130 of file PXDDAQDHCStatus.h.

130{ return m_pxdDHE.cbegin(); };

◆ cend()

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

const iterator-based iteration for DHEs

Definition at line 132 of file PXDDAQDHCStatus.h.

132{ return m_pxdDHE.cend(); };

◆ 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 DHC is not usable for analysis TODO Maybe this decision needs improvement.

Definition at line 79 of file PXDDAQDHCStatus.h.

79{m_usable = (m_errorMask & m_critErrorMask) == PXDErrorFlags(0);}

◆ dhe_back()

PXDDAQDHEStatus & dhe_back ( )
inline

Returns PXDDAQDHEStatus for last DHE.

Definition at line 134 of file PXDDAQDHCStatus.h.

134{ return m_pxdDHE.back(); };

◆ dhe_size()

size_t dhe_size ( ) const
inline

Returns number of DHEs.

Definition at line 136 of file PXDDAQDHCStatus.h.

136{ return m_pxdDHE.size(); };

◆ end()

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

iterator-based iteration for DHEs

Definition at line 127 of file PXDDAQDHCStatus.h.

127{ return m_pxdDHE.end(); };

◆ getCounters()

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

Get Data counters for reduction calculation.

Definition at line 89 of file PXDDAQDHCStatus.h.

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

◆ getCritErrorMask()

PXDErrorFlags getCritErrorMask ( void  ) const
inline

Return Critical Error bit mask.

Returns
bit mask

Definition at line 72 of file PXDDAQDHCStatus.h.

72{ return m_critErrorMask; }

◆ getDHCID()

unsigned short getDHCID ( void  ) const
inline

Get DHC ID.

Definition at line 82 of file PXDDAQDHCStatus.h.

82{ return m_dhcID;};

◆ getEndErrorInfo()

uint32_t getEndErrorInfo ( void  ) const
inline

get errorinfo from the DHC END

Definition at line 97 of file PXDDAQDHCStatus.h.

97{ return m_errorinfo;};

◆ getErrorMask()

PXDErrorFlags getErrorMask ( void  ) const
inline

Return Error bit mask This is the OR of error masks of all sub-objects (DHC, DHE)

Returns
bit mask

Definition at line 62 of file PXDDAQDHCStatus.h.

62{ return m_errorMask; }

◆ getGatedFlag()

bool getGatedFlag ( void  ) const
inline

get gating info from the DHC END

Definition at line 102 of file PXDDAQDHCStatus.h.

102{ return m_gated_mode;};
bool m_gated_mode
gated info from the DHC START

◆ getGatedHER()

bool getGatedHER ( void  ) const
inline

get HER/LER gating info from the DHC END

Definition at line 106 of file PXDDAQDHCStatus.h.

106{ return m_gated_her;};
bool m_gated_her
gated info from the DHC START - true HER, 0 LER

◆ getRawCnt()

uint32_t getRawCnt ( void  ) const
inline

Set Raw Data counter for reduction calculation.

Definition at line 91 of file PXDDAQDHCStatus.h.

91{ return m_rawCount;};

◆ getRedCnt()

uint32_t getRedCnt ( void  ) const
inline

Set Reduced Data counter for reduction calculation.

Definition at line 93 of file PXDDAQDHCStatus.h.

93{ return m_redCount;};

◆ isUsable()

bool isUsable ( ) const
inline

Return Usability of data.

Returns
conclusion if data is useable

Definition at line 50 of file PXDDAQDHCStatus.h.

50{ return m_usable; }

◆ newDHE()

PXDDAQDHEStatus & newDHE ( Args &&...  params)
inline

Add new DHE information.

Parameters
paramsconstructor parameter
Returns
new DHE Status Object

Definition at line 118 of file PXDDAQDHCStatus.h.

119 {
120 /*return*/ m_pxdDHE.emplace_back(std::forward<Args>(params)...);
121 return m_pxdDHE.back();
122 }

◆ setCounters()

void setCounters ( uint32_t  raw,
uint32_t  red 
)
inline

Set Data counters for reduction calculation.

Definition at line 87 of file PXDDAQDHCStatus.h.

87{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 67 of file PXDDAQDHCStatus.h.

67{ m_critErrorMask = mask; }

◆ setDHCID()

void setDHCID ( int  dhcid)
inline

Set DHC ID.

Definition at line 84 of file PXDDAQDHCStatus.h.

84{m_dhcID = dhcid;};

◆ setEndErrorInfo()

void setEndErrorInfo ( uint32_t  e)
inline

set errorinfo from the DHC END

Definition at line 95 of file PXDDAQDHCStatus.h.

95{ m_errorinfo = e;};

◆ setErrorMask()

void setErrorMask ( const PXDErrorFlags &  mask)
inline

Set Error bit mask This should be the OR of error masks of all sub-objects (DHC, DHE)

Parameters
maskBit Mask to set

Definition at line 56 of file PXDDAQDHCStatus.h.

56{ m_errorMask = mask; }

◆ setGatedFlag()

void setGatedFlag ( bool  gm)
inline

set gating info from the DHC END

Definition at line 100 of file PXDDAQDHCStatus.h.

100{ m_gated_mode = gm;};

◆ setGatedHER()

void setGatedHER ( bool  isher)
inline

set HER/LER gating info from the DHC END

Definition at line 104 of file PXDDAQDHCStatus.h.

104{ m_gated_her = isher;};

Member Data Documentation

◆ m_critErrorMask

PXDErrorFlags m_critErrorMask
private

critical error mask

Definition at line 140 of file PXDDAQDHCStatus.h.

◆ m_dhcID

unsigned short m_dhcID
private

DHC ID as delivered by DAQ.

Definition at line 143 of file PXDDAQDHCStatus.h.

◆ m_errorinfo

uint32_t m_errorinfo
private

errorinfo from the DHC END

Definition at line 146 of file PXDDAQDHCStatus.h.

◆ m_errorMask

PXDErrorFlags m_errorMask
private

errors found in this DHC/sensor

Definition at line 139 of file PXDDAQDHCStatus.h.

◆ m_gated_her

bool m_gated_her {false}
private

gated info from the DHC START - true HER, 0 LER

Definition at line 148 of file PXDDAQDHCStatus.h.

◆ m_gated_mode

bool m_gated_mode {false}
private

gated info from the DHC START

Definition at line 147 of file PXDDAQDHCStatus.h.

◆ m_pxdDHE

std::vector<PXDDAQDHEStatus> m_pxdDHE
private

Vector of DHE informations belonging to this event.

Definition at line 151 of file PXDDAQDHCStatus.h.

◆ m_rawCount

uint32_t m_rawCount
private

raw byte count for monitoring

Definition at line 144 of file PXDDAQDHCStatus.h.

◆ m_redCount

uint32_t m_redCount
private

reduced byte count for monitoring

Definition at line 145 of file PXDDAQDHCStatus.h.

◆ m_usable

bool m_usable
private

data is useable.

Definition at line 141 of file PXDDAQDHCStatus.h.


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