CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
TotemVFATStatus Class Reference

#include <TotemVFATStatus.h>

Public Member Functions

uint8_t chipPosition () const
 Chip position. More...
 
uint8_t ec () const
 event Counter More...
 
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
 No channels are masked out. More...
 
bool isNumberOfClustersSpecified () const
 number of clusters More...
 
bool isOK () const
 
bool isPartiallyMaskedOut () const
 Some channels from VFAT ale masked out, but not all. More...
 
uint8_t numberOfClusters () const
 
bool operator< (const TotemVFATStatus &cmp) const
 
void setBCProgressError (bool val=true)
 
void setChipPosition (uint8_t cp)
 
void setCRCError (bool val=true)
 
void setEC (const uint8_t ec)
 
void setECProgressError (bool val=true)
 
void setFootprintError (bool val=true)
 
void setFullyMaskedOut ()
 
void setIDMismatch (bool val=true)
 
void setMissing (bool val=true)
 
void setNotMasked ()
 
void setNumberOfClusters (uint8_t v)
 
void setNumberOfClustersSpecified (bool v)
 
void setPartiallyMaskedOut ()
 
 TotemVFATStatus (uint8_t cp=0)
 

Private Attributes

uint8_t chipPosition_
 describes placement of the VFAT within the detector More...
 
uint8_t eventCounter
 event counter in the VFAT frame More...
 
uint8_t numberOfClusters_
 
bool numberOfClustersSpecified
 the number of hit clusters before DAQ trimming 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 20 of file TotemVFATStatus.h.

Constructor & Destructor Documentation

◆ TotemVFATStatus()

TotemVFATStatus::TotemVFATStatus ( uint8_t  cp = 0)
inline

Definition at line 28 of file TotemVFATStatus.h.

28  { chipPosition_ = cp; }
29 

References chipPosition_, and CommonMethods::cp().

Member Function Documentation

◆ chipPosition()

uint8_t TotemVFATStatus::chipPosition ( ) const
inline

Chip position.

Definition at line 32 of file TotemVFATStatus.h.

32 { status[0] = val; }

References status, and heppy_batch::val.

◆ ec()

uint8_t TotemVFATStatus::ec ( ) const
inline

event Counter

Definition at line 85 of file TotemVFATStatus.h.

◆ isBCProgressError()

bool TotemVFATStatus::isBCProgressError ( ) const
inline

BC number is incorrect.

Definition at line 56 of file TotemVFATStatus.h.

56 { status[6] = true; }

References status.

◆ isCRCError()

bool TotemVFATStatus::isCRCError ( ) const
inline

CRC error.

Definition at line 48 of file TotemVFATStatus.h.

48 { status[4] = val; }

References status, and heppy_batch::val.

◆ isECProgressError()

bool TotemVFATStatus::isECProgressError ( ) const
inline

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

Definition at line 52 of file TotemVFATStatus.h.

52 { status[5] = val; }

References status, and heppy_batch::val.

◆ isFootprintError()

bool TotemVFATStatus::isFootprintError ( ) const
inline

Footprint error.

Definition at line 44 of file TotemVFATStatus.h.

44 { status[3] = val; }

References status, and heppy_batch::val.

◆ isFullyMaskedOut()

bool TotemVFATStatus::isFullyMaskedOut ( ) const
inline

All channels from that VFAT are not taken into account.

Definition at line 60 of file TotemVFATStatus.h.

60 { status[7] = true; }

References status.

◆ isIDMismatch()

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 40 of file TotemVFATStatus.h.

40 { status[2] = val; }

References status, and heppy_batch::val.

◆ isMissing()

bool TotemVFATStatus::isMissing ( ) const
inline

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

Definition at line 36 of file TotemVFATStatus.h.

36 { status[1] = val; }

References status, and heppy_batch::val.

◆ isNotMasked()

bool TotemVFATStatus::isNotMasked ( ) const
inline

No channels are masked out.

Definition at line 68 of file TotemVFATStatus.h.

69 { return numberOfClustersSpecified; }

◆ isNumberOfClustersSpecified()

bool TotemVFATStatus::isNumberOfClustersSpecified ( ) const
inline

number of clusters

Definition at line 74 of file TotemVFATStatus.h.

75 { return (status.to_ulong() < cmp.status.to_ulong()); }

◆ isOK()

bool TotemVFATStatus::isOK ( ) const
inline

Definition at line 71 of file TotemVFATStatus.h.

72 { return numberOfClusters_; }

References numberOfClusters_.

◆ isPartiallyMaskedOut()

bool TotemVFATStatus::isPartiallyMaskedOut ( ) const
inline

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

Definition at line 64 of file TotemVFATStatus.h.

64 { status[6] = status[7] = false; }

References status.

◆ numberOfClusters()

uint8_t TotemVFATStatus::numberOfClusters ( ) const
inline

Definition at line 77 of file TotemVFATStatus.h.

80 { return eventCounter; }

◆ operator<()

bool TotemVFATStatus::operator< ( const TotemVFATStatus cmp) const
inline

Definition at line 80 of file TotemVFATStatus.h.

80 { return eventCounter; }

References eventCounter.

◆ setBCProgressError()

void TotemVFATStatus::setBCProgressError ( bool  val = true)
inline

Definition at line 57 of file TotemVFATStatus.h.

59 { return status[7]; }

References status.

◆ setChipPosition()

void TotemVFATStatus::setChipPosition ( uint8_t  cp)
inline

Definition at line 33 of file TotemVFATStatus.h.

35 { return status[1]; }

References status.

◆ setCRCError()

void TotemVFATStatus::setCRCError ( bool  val = true)
inline

Definition at line 49 of file TotemVFATStatus.h.

51 { return status[5]; }

References status.

◆ setEC()

void TotemVFATStatus::setEC ( const uint8_t  ec)
inline

Definition at line 86 of file TotemVFATStatus.h.

◆ setECProgressError()

void TotemVFATStatus::setECProgressError ( bool  val = true)
inline

Definition at line 53 of file TotemVFATStatus.h.

55 { return status[6]; }

References status.

◆ setFootprintError()

void TotemVFATStatus::setFootprintError ( bool  val = true)
inline

Definition at line 45 of file TotemVFATStatus.h.

47 { return status[4]; }

References status.

◆ setFullyMaskedOut()

void TotemVFATStatus::setFullyMaskedOut ( )
inline

Definition at line 61 of file TotemVFATStatus.h.

63 { return !(status[6] || status[7]); }

References status.

◆ setIDMismatch()

void TotemVFATStatus::setIDMismatch ( bool  val = true)
inline

Definition at line 41 of file TotemVFATStatus.h.

43 { return status[3]; }

References status.

◆ setMissing()

void TotemVFATStatus::setMissing ( bool  val = true)
inline

Definition at line 37 of file TotemVFATStatus.h.

39 { return status[2]; }

References status.

Referenced by RawToDigiConverter::runCommon().

◆ setNotMasked()

void TotemVFATStatus::setNotMasked ( )
inline

Definition at line 69 of file TotemVFATStatus.h.

69 { return numberOfClustersSpecified; }

References numberOfClustersSpecified.

◆ setNumberOfClusters()

void TotemVFATStatus::setNumberOfClusters ( uint8_t  v)
inline

Definition at line 78 of file TotemVFATStatus.h.

80 { return eventCounter; }

◆ setNumberOfClustersSpecified()

void TotemVFATStatus::setNumberOfClustersSpecified ( bool  v)
inline

Definition at line 75 of file TotemVFATStatus.h.

75 { return (status.to_ulong() < cmp.status.to_ulong()); }

References fileCollector::cmp, and status.

◆ setPartiallyMaskedOut()

void TotemVFATStatus::setPartiallyMaskedOut ( )
inline

Definition at line 65 of file TotemVFATStatus.h.

66 { return !(status[0] || status[1] || status[2] || status[3] || status[4] || status[5]); }

References status.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 13 of file TotemVFATStatus.cc.

14  {
15  return s << "miss=" << st.status[0] << ",ID=" << st.status[1] << ",foot=" << st.status[2] << ",CRC=" << st.status[3]
16  << ",EC=" << st.status[4] << ",BC=" << st.status[5] << ",fm=" << st.status[6] << ",pm=" << st.status[7];

Member Data Documentation

◆ chipPosition_

uint8_t TotemVFATStatus::chipPosition_
private

describes placement of the VFAT within the detector

Definition at line 90 of file TotemVFATStatus.h.

Referenced by TotemVFATStatus().

◆ eventCounter

uint8_t TotemVFATStatus::eventCounter
private

event counter in the VFAT frame

Definition at line 100 of file TotemVFATStatus.h.

Referenced by operator<().

◆ numberOfClusters_

uint8_t TotemVFATStatus::numberOfClusters_
private

Definition at line 97 of file TotemVFATStatus.h.

Referenced by isOK().

◆ numberOfClustersSpecified

bool TotemVFATStatus::numberOfClustersSpecified
private

the number of hit clusters before DAQ trimming

Definition at line 96 of file TotemVFATStatus.h.

Referenced by setNotMasked().

◆ status

std::bitset<8> TotemVFATStatus::status
private
alignCSCRings.s
s
Definition: alignCSCRings.py:92
TotemVFATStatus::numberOfClustersSpecified
bool numberOfClustersSpecified
the number of hit clusters before DAQ trimming
Definition: TotemVFATStatus.h:96
TotemVFATStatus::numberOfClusters_
uint8_t numberOfClusters_
Definition: TotemVFATStatus.h:97
TotemVFATStatus::eventCounter
uint8_t eventCounter
event counter in the VFAT frame
Definition: TotemVFATStatus.h:100
TotemVFATStatus::status
std::bitset< 8 > status
the status bits
Definition: TotemVFATStatus.h:93
heppy_batch.val
val
Definition: heppy_batch.py:351
fileCollector.cmp
cmp
Definition: fileCollector.py:125
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
TotemVFATStatus::chipPosition_
uint8_t chipPosition_
describes placement of the VFAT within the detector
Definition: TotemVFATStatus.h:90