Belle II Software development
PXDDAQPacketStatus Class Referencefinal

The PXD DAQ Packet Status class. More...

#include <PXDDAQPacketStatus.h>

Public Member Functions

 PXDDAQPacketStatus ()
 Default constructor for the ROOT IO.
 
 PXDDAQPacketStatus (unsigned short inx)
 constructor setting the error mask and packet index.
 
virtual ~PXDDAQPacketStatus ()
 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 packet is not usable for analysis TODO Maybe this decision needs improvement.
 
void setPktIndex (unsigned short inx)
 Set Packet index.
 
unsigned short getPktIndex (void) const
 Return Packet index.
 
void addDHC (PXDDAQDHCStatus &daqdhcstat)
 Add DHC information including its DHE tree.
 
template<class ... Args>
PXDDAQDHCStatusnewDHC (Args &&... params)
 Add new DHC information.
 
std::vector< PXDDAQDHCStatus >::iterator begin ()
 iterator-based iteration for DHCs
 
std::vector< PXDDAQDHCStatus >::iterator end ()
 iterator-based iteration for DHCs
 
std::vector< PXDDAQDHCStatus >::const_iterator cbegin () const
 const iterator-based iteration for DHCs
 
std::vector< PXDDAQDHCStatus >::const_iterator cend () const
 const iterator-based iteration for DHCs
 
PXDDAQDHCStatusdhc_back ()
 Returns PXDDAQDHCStatus for last DHC.
 
size_t dhc_size () const
 Returns number of DHCs.
 

Private Member Functions

 ClassDef (PXDDAQPacketStatus, 3)
 necessary for ROOT
 

Private Attributes

PXDErrorFlags m_errorMask
 errors found in this packets sensors
 
PXDErrorFlags m_critErrorMask
 critical error mask
 
bool m_usable
 data is useable.
 
unsigned short m_index
 Packet index as delivered by DAQ.
 
std::vector< PXDDAQDHCStatusm_pxdDHC
 Vector of DHC informations beloning to this event.
 

Detailed Description

The PXD DAQ Packet Status class.

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

Definition at line 30 of file PXDDAQPacketStatus.h.

Constructor & Destructor Documentation

◆ PXDDAQPacketStatus() [1/2]

PXDDAQPacketStatus ( )
inline

Default constructor for the ROOT IO.

Definition at line 34 of file PXDDAQPacketStatus.h.

34: m_errorMask(0), m_critErrorMask(0), m_usable(true), m_index(0) {}
unsigned short m_index
Packet index as delivered by DAQ.
PXDErrorFlags m_critErrorMask
critical error mask
PXDErrorFlags m_errorMask
errors found in this packets sensors
bool m_usable
data is useable.

◆ PXDDAQPacketStatus() [2/2]

PXDDAQPacketStatus ( unsigned short  inx)
inlineexplicit

constructor setting the error mask and packet index.

Parameters
inxpacket index

Definition at line 39 of file PXDDAQPacketStatus.h.

39: m_errorMask(0), m_critErrorMask(0), m_usable(true), m_index(inx) {}

◆ ~PXDDAQPacketStatus()

virtual ~PXDDAQPacketStatus ( )
inlinevirtual

destructor

Definition at line 42 of file PXDDAQPacketStatus.h.

42{};

Member Function Documentation

◆ addDHC()

void addDHC ( PXDDAQDHCStatus daqdhcstat)
inline

Add DHC information including its DHE tree.

Parameters
daqdhcstatDHC Status Object

Definition at line 91 of file PXDDAQPacketStatus.h.

91{m_pxdDHC.push_back(daqdhcstat);};
std::vector< PXDDAQDHCStatus > m_pxdDHC
Vector of DHC informations beloning to this event.

◆ begin()

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

iterator-based iteration for DHCs

Definition at line 104 of file PXDDAQPacketStatus.h.

104{ return m_pxdDHC.begin(); };

◆ cbegin()

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

const iterator-based iteration for DHCs

Definition at line 109 of file PXDDAQPacketStatus.h.

109{ return m_pxdDHC.cbegin(); };

◆ cend()

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

const iterator-based iteration for DHCs

Definition at line 111 of file PXDDAQPacketStatus.h.

111{ return m_pxdDHC.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 packet is not usable for analysis TODO Maybe this decision needs improvement.

Definition at line 76 of file PXDDAQPacketStatus.h.

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

◆ dhc_back()

PXDDAQDHCStatus & dhc_back ( )
inline

Returns PXDDAQDHCStatus for last DHC.

Definition at line 113 of file PXDDAQPacketStatus.h.

113{ return m_pxdDHC.back(); };

◆ dhc_size()

size_t dhc_size ( ) const
inline

Returns number of DHCs.

Definition at line 115 of file PXDDAQPacketStatus.h.

115{ return m_pxdDHC.size(); };

◆ end()

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

iterator-based iteration for DHCs

Definition at line 106 of file PXDDAQPacketStatus.h.

106{ return m_pxdDHC.end(); };

◆ getCritErrorMask()

PXDErrorFlags getCritErrorMask ( void  ) const
inline

Return Critical Error bit mask.

Returns
bit mask

Definition at line 69 of file PXDDAQPacketStatus.h.

69{ return m_critErrorMask; }

◆ 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 59 of file PXDDAQPacketStatus.h.

59{ return m_errorMask; }

◆ getPktIndex()

unsigned short getPktIndex ( void  ) const
inline

Return Packet index.

Returns
packet index

Definition at line 86 of file PXDDAQPacketStatus.h.

86{ return m_index;};

◆ isUsable()

bool isUsable ( ) const
inline

Return Usability of data.

Returns
conclusion if data is useable

Definition at line 47 of file PXDDAQPacketStatus.h.

47{ return m_usable; }

◆ newDHC()

PXDDAQDHCStatus & newDHC ( Args &&...  params)
inline

Add new DHC information.

Parameters
paramsconstructor parameter
Returns
ref to new DHC Status Object

Definition at line 97 of file PXDDAQPacketStatus.h.

98 {
99 /*return*/ m_pxdDHC.emplace_back(std::forward<Args>(params)...);
100 return m_pxdDHC.back();
101 }

◆ setCritErrorMask()

void setCritErrorMask ( const PXDErrorFlags &  mask)
inline

Set Critical Error bit mask.

Parameters
maskBit Mask to set

Definition at line 64 of file PXDDAQPacketStatus.h.

64{ m_critErrorMask = mask; }

◆ 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 53 of file PXDDAQPacketStatus.h.

53{ m_errorMask = mask; }

◆ setPktIndex()

void setPktIndex ( unsigned short  inx)
inline

Set Packet index.

Parameters
inxpacket index

Definition at line 81 of file PXDDAQPacketStatus.h.

81{ m_index = inx;};

Member Data Documentation

◆ m_critErrorMask

PXDErrorFlags m_critErrorMask
private

critical error mask

Definition at line 119 of file PXDDAQPacketStatus.h.

◆ m_errorMask

PXDErrorFlags m_errorMask
private

errors found in this packets sensors

Definition at line 118 of file PXDDAQPacketStatus.h.

◆ m_index

unsigned short m_index
private

Packet index as delivered by DAQ.

Definition at line 122 of file PXDDAQPacketStatus.h.

◆ m_pxdDHC

std::vector<PXDDAQDHCStatus> m_pxdDHC
private

Vector of DHC informations beloning to this event.

Definition at line 125 of file PXDDAQPacketStatus.h.

◆ m_usable

bool m_usable
private

data is useable.

Definition at line 120 of file PXDDAQPacketStatus.h.


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