CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
TotemVFATStatus Class Reference

#include <TotemVFATStatus.h>

Public Member Functions

bool isBCProgressError () const
 BC number is incorrect. More...
 
bool isCRCError () const
 CRC error. More...
 
bool isECProgressError () const
 VFATFrame event number doesn't follow the number derived from DAQ. More...
 
bool isFootprintError () const
 Footprint error. More...
 
bool isFullyMaskedOut () const
 All channels from that VFAT are not taken into account. More...
 
bool isIDMismatch () const
 12-bit hw id from the header of the vfat frame is diffrent from the 16-bit one from hw mapping. More...
 
bool isMissing () const
 VFAT is present in mapping but no data is present int raw event. More...
 
bool isNotMasked () const
 None channels are masked out. More...
 
bool isOK () const
 
bool isPartiallyMaskedOut () const
 Some channels from VFAT ale masked out, but not all. More...
 
bool operator< (const TotemVFATStatus &cmp) const
 
void setBCProgressError ()
 
void setChipPosition (uint8_t _cp)
 
void setCRCError ()
 
void setECProgressError ()
 
void setFootprintError ()
 
void setFullyMaskedOut ()
 
void setIDMismatch ()
 
void setMissing ()
 
void setNotMasked ()
 
void setPartiallyMaskedOut ()
 
 TotemVFATStatus (uint8_t _cp=0)
 

Private Attributes

uint8_t chipPosition
 describes placement of the VFAT within the detector More...
 
std::bitset< 8 > status
 the status bits More...
 

Friends

std::ostream & operator<< (std::ostream &s, const TotemVFATStatus &st)
 

Detailed Description

Class which contains information about conversion from RAW to DIGI for a single read-out chip (VFAT).

Definition at line 21 of file TotemVFATStatus.h.

Constructor & Destructor Documentation

TotemVFATStatus::TotemVFATStatus ( uint8_t  _cp = 0)
inline

Definition at line 24 of file TotemVFATStatus.h.

24 : chipPosition(_cp), status(0) {}
uint8_t chipPosition
describes placement of the VFAT within the detector
std::bitset< 8 > status
the status bits

Member Function Documentation

bool TotemVFATStatus::isBCProgressError ( ) const
inline

BC number is incorrect.

Definition at line 42 of file TotemVFATStatus.h.

References status.

42 { return status[5]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isCRCError ( ) const
inline

CRC error.

Definition at line 36 of file TotemVFATStatus.h.

References status.

36 { return status[3]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isECProgressError ( ) const
inline

VFATFrame event number doesn't follow the number derived from DAQ.

Definition at line 39 of file TotemVFATStatus.h.

References status.

39 { return status[4]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isFootprintError ( ) const
inline

Footprint error.

Definition at line 33 of file TotemVFATStatus.h.

References status.

33 { return status[2]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isFullyMaskedOut ( ) const
inline

All channels from that VFAT are not taken into account.

Definition at line 45 of file TotemVFATStatus.h.

References status.

45 { return status[6]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isIDMismatch ( ) const
inline

12-bit hw id from the header of the vfat frame is diffrent from the 16-bit one from hw mapping.

Definition at line 30 of file TotemVFATStatus.h.

References status.

30 { return status[1]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isMissing ( ) const
inline

VFAT is present in mapping but no data is present int raw event.

Definition at line 27 of file TotemVFATStatus.h.

References status.

27 { return status[0]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isNotMasked ( ) const
inline

None channels are masked out.

Definition at line 51 of file TotemVFATStatus.h.

References status.

51 { return !(status[6] || status[7]); }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isOK ( ) const
inline

Definition at line 65 of file TotemVFATStatus.h.

References status.

66  {
67  return !(status[0] || status[1] || status[2] || status[3] || status[4] || status[5]);
68  }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::isPartiallyMaskedOut ( ) const
inline

Some channels from VFAT ale masked out, but not all.

Definition at line 48 of file TotemVFATStatus.h.

References status.

48 { return status[7]; }
std::bitset< 8 > status
the status bits
bool TotemVFATStatus::operator< ( const TotemVFATStatus cmp) const
inline

Definition at line 70 of file TotemVFATStatus.h.

References status.

71  {
72  return (status.to_ulong() < cmp.status.to_ulong());
73  }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setBCProgressError ( )
inline

Definition at line 60 of file TotemVFATStatus.h.

References status.

60 { status[5] = true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setChipPosition ( uint8_t  _cp)
inline

Definition at line 53 of file TotemVFATStatus.h.

References chipPosition.

53 { chipPosition = _cp; }
uint8_t chipPosition
describes placement of the VFAT within the detector
void TotemVFATStatus::setCRCError ( )
inline

Definition at line 58 of file TotemVFATStatus.h.

References status.

58 { status[3]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setECProgressError ( )
inline

Definition at line 59 of file TotemVFATStatus.h.

References status.

59 { status[4]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setFootprintError ( )
inline

Definition at line 57 of file TotemVFATStatus.h.

References status.

57 { status[2]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setFullyMaskedOut ( )
inline

Definition at line 61 of file TotemVFATStatus.h.

References status.

61 { status[6]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setIDMismatch ( )
inline

Definition at line 56 of file TotemVFATStatus.h.

References status.

56 { status[1]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setMissing ( )
inline

Definition at line 55 of file TotemVFATStatus.h.

References status.

55 { status[0]=true; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setNotMasked ( )
inline

Definition at line 63 of file TotemVFATStatus.h.

References status.

63 { status[6]=status[7]=false; }
std::bitset< 8 > status
the status bits
void TotemVFATStatus::setPartiallyMaskedOut ( )
inline

Definition at line 62 of file TotemVFATStatus.h.

References status.

62 { status[7]=true; }
std::bitset< 8 > status
the status bits

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const TotemVFATStatus st 
)
friend

Definition at line 14 of file TotemVFATStatus.cc.

15 {
16  return s
17  << "miss=" << st.status[0]
18  << ",ID=" << st.status[1]
19  << ",foot=" << st.status[2]
20  << ",CRC=" << st.status[3]
21  << ",EC=" << st.status[4]
22  << ",BC=" << st.status[5]
23  << ",fm=" << st.status[6]
24  << ",pm=" << st.status[7];
25 }
std::bitset< 8 > status
the status bits

Member Data Documentation

uint8_t TotemVFATStatus::chipPosition
private

describes placement of the VFAT within the detector

Definition at line 79 of file TotemVFATStatus.h.

Referenced by setChipPosition().

std::bitset<8> TotemVFATStatus::status
private