CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HPTDCErrorFlags Class Reference

#include <HPTDCErrorFlags.h>

Public Member Functions

unsigned short errorFlag () const
 
bool errorId (unsigned short id) const
 
bool eventLost () const
 
bool hitErrorGroup0 () const
 
bool hitErrorGroup1 () const
 
bool hitErrorGroup2 () const
 
bool hitErrorGroup3 () const
 
bool hitLostL1OverflowGroup0 () const
 
bool hitLostL1OverflowGroup1 () const
 
bool hitLostL1OverflowGroup2 () const
 
bool hitLostL1OverflowGroup3 () const
 
bool hitLostROFifoOverflowGroup0 () const
 
bool hitLostROFifoOverflowGroup1 () const
 
bool hitLostROFifoOverflowGroup2 () const
 
bool hitLostROFifoOverflowGroup3 () const
 
bool hitRejectedByEventSizeLimit () const
 
 HPTDCErrorFlags (unsigned short flags=0)
 
bool internalFatalChipError () const
 

Static Public Member Functions

static std::string hptdcErrorName (const unsigned short id)
 

Private Attributes

unsigned short error_flags
 

Detailed Description

HPTDC error flags container

Author
Seyed Mohsen Etesami
Laurent Forthomme July 2016

Definition at line 15 of file HPTDCErrorFlags.h.

Constructor & Destructor Documentation

◆ HPTDCErrorFlags()

HPTDCErrorFlags::HPTDCErrorFlags ( unsigned short  flags = 0)
inline

Definition at line 17 of file HPTDCErrorFlags.h.

17 : error_flags(flags) {}

Member Function Documentation

◆ errorFlag()

unsigned short HPTDCErrorFlags::errorFlag ( ) const
inline

Definition at line 72 of file HPTDCErrorFlags.h.

72 { return error_flags; }

References error_flags.

Referenced by operator<<(), and CTPPSDiamondDigi::operator==().

◆ errorId()

bool HPTDCErrorFlags::errorId ( unsigned short  id) const
inline

Definition at line 19 of file HPTDCErrorFlags.h.

19  {
20  switch (id) {
21  case 0:
22  return internalFatalChipError();
23  case 1:
24  return eventLost();
25  case 2:
27  case 3:
28  return hitErrorGroup3();
29  case 4:
30  return hitLostL1OverflowGroup3();
31  case 5:
33  case 6:
34  return hitErrorGroup2();
35  case 7:
36  return hitLostL1OverflowGroup2();
37  case 8:
39  case 9:
40  return hitErrorGroup1();
41  case 10:
42  return hitLostL1OverflowGroup1();
43  case 11:
45  case 12:
46  return hitErrorGroup0();
47  case 13:
48  return hitLostL1OverflowGroup0();
49  case 14:
51  default:
52  return true;
53  }
54  }

References eventLost(), hitErrorGroup0(), hitErrorGroup1(), hitErrorGroup2(), hitErrorGroup3(), hitLostL1OverflowGroup0(), hitLostL1OverflowGroup1(), hitLostL1OverflowGroup2(), hitLostL1OverflowGroup3(), hitLostROFifoOverflowGroup0(), hitLostROFifoOverflowGroup1(), hitLostROFifoOverflowGroup2(), hitLostROFifoOverflowGroup3(), hitRejectedByEventSizeLimit(), and internalFatalChipError().

Referenced by CTPPSDiamondDQMSource::analyze().

◆ eventLost()

bool HPTDCErrorFlags::eventLost ( ) const
inline

Definition at line 57 of file HPTDCErrorFlags.h.

57 { return (error_flags >> 1) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitErrorGroup0()

bool HPTDCErrorFlags::hitErrorGroup0 ( ) const
inline

Definition at line 68 of file HPTDCErrorFlags.h.

68 { return (error_flags >> 12) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitErrorGroup1()

bool HPTDCErrorFlags::hitErrorGroup1 ( ) const
inline

Definition at line 65 of file HPTDCErrorFlags.h.

65 { return (error_flags >> 9) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitErrorGroup2()

bool HPTDCErrorFlags::hitErrorGroup2 ( ) const
inline

Definition at line 62 of file HPTDCErrorFlags.h.

62 { return (error_flags >> 6) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitErrorGroup3()

bool HPTDCErrorFlags::hitErrorGroup3 ( ) const
inline

Definition at line 59 of file HPTDCErrorFlags.h.

59 { return (error_flags >> 3) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostL1OverflowGroup0()

bool HPTDCErrorFlags::hitLostL1OverflowGroup0 ( ) const
inline

Definition at line 69 of file HPTDCErrorFlags.h.

69 { return (error_flags >> 13) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostL1OverflowGroup1()

bool HPTDCErrorFlags::hitLostL1OverflowGroup1 ( ) const
inline

Definition at line 66 of file HPTDCErrorFlags.h.

66 { return (error_flags >> 10) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostL1OverflowGroup2()

bool HPTDCErrorFlags::hitLostL1OverflowGroup2 ( ) const
inline

Definition at line 63 of file HPTDCErrorFlags.h.

63 { return (error_flags >> 7) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostL1OverflowGroup3()

bool HPTDCErrorFlags::hitLostL1OverflowGroup3 ( ) const
inline

Definition at line 60 of file HPTDCErrorFlags.h.

60 { return (error_flags >> 4) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostROFifoOverflowGroup0()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup0 ( ) const
inline

Definition at line 70 of file HPTDCErrorFlags.h.

70 { return (error_flags >> 14) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostROFifoOverflowGroup1()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup1 ( ) const
inline

Definition at line 67 of file HPTDCErrorFlags.h.

67 { return (error_flags >> 11) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostROFifoOverflowGroup2()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup2 ( ) const
inline

Definition at line 64 of file HPTDCErrorFlags.h.

64 { return (error_flags >> 8) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitLostROFifoOverflowGroup3()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup3 ( ) const
inline

Definition at line 61 of file HPTDCErrorFlags.h.

61 { return (error_flags >> 5) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hitRejectedByEventSizeLimit()

bool HPTDCErrorFlags::hitRejectedByEventSizeLimit ( ) const
inline

Definition at line 58 of file HPTDCErrorFlags.h.

58 { return (error_flags >> 2) & 0x1; }

References error_flags.

Referenced by errorId().

◆ hptdcErrorName()

static std::string HPTDCErrorFlags::hptdcErrorName ( const unsigned short  id)
inlinestatic

Definition at line 74 of file HPTDCErrorFlags.h.

74  {
75  switch (id) {
76  case 0:
77  return "InternalFatalChipError";
78  case 1:
79  return "EventLost";
80  case 2:
81  return "HitRejectedByEventSizeLimit";
82  case 3:
83  return "HitErrorGroup3";
84  case 4:
85  return "HitLostL1OverflowGroup3";
86  case 5:
87  return "HitLostROFifoOverflowGroup3";
88  case 6:
89  return "HitErrorGroup2";
90  case 7:
91  return "HitLostL1OverflowGroup2";
92  case 8:
93  return "HitLostROFifoOverflowGroup2";
94  case 9:
95  return "HitErrorGroup1";
96  case 10:
97  return "HitLostL1OverflowGroup1";
98  case 11:
99  return "HitLostROFifoOverflowGroup1";
100  case 12:
101  return "HitErrorGroup0";
102  case 13:
103  return "HitLostL1OverflowGroup0";
104  case 14:
105  return "HitLostROFifoOverflowGroup0";
106  default:
107  return "NONE";
108  }
109  }

Referenced by CTPPSDiamondDQMSource::ChannelPlots::ChannelPlots(), and CTPPSDiamondDQMSource::PotPlots::PotPlots().

◆ internalFatalChipError()

bool HPTDCErrorFlags::internalFatalChipError ( ) const
inline

Definition at line 56 of file HPTDCErrorFlags.h.

56 { return error_flags & 0x1; }

References error_flags.

Referenced by errorId().

Member Data Documentation

◆ error_flags

unsigned short HPTDCErrorFlags::error_flags
private
HPTDCErrorFlags::hitErrorGroup0
bool hitErrorGroup0() const
Definition: HPTDCErrorFlags.h:68
HPTDCErrorFlags::error_flags
unsigned short error_flags
Definition: HPTDCErrorFlags.h:112
HPTDCErrorFlags::hitLostL1OverflowGroup3
bool hitLostL1OverflowGroup3() const
Definition: HPTDCErrorFlags.h:60
HPTDCErrorFlags::hitLostROFifoOverflowGroup3
bool hitLostROFifoOverflowGroup3() const
Definition: HPTDCErrorFlags.h:61
HPTDCErrorFlags::hitErrorGroup3
bool hitErrorGroup3() const
Definition: HPTDCErrorFlags.h:59
HPTDCErrorFlags::hitLostL1OverflowGroup0
bool hitLostL1OverflowGroup0() const
Definition: HPTDCErrorFlags.h:69
HPTDCErrorFlags::hitLostROFifoOverflowGroup2
bool hitLostROFifoOverflowGroup2() const
Definition: HPTDCErrorFlags.h:64
HPTDCErrorFlags::hitLostL1OverflowGroup1
bool hitLostL1OverflowGroup1() const
Definition: HPTDCErrorFlags.h:66
HPTDCErrorFlags::hitErrorGroup1
bool hitErrorGroup1() const
Definition: HPTDCErrorFlags.h:65
HPTDCErrorFlags::hitLostROFifoOverflowGroup1
bool hitLostROFifoOverflowGroup1() const
Definition: HPTDCErrorFlags.h:67
HPTDCErrorFlags::hitLostROFifoOverflowGroup0
bool hitLostROFifoOverflowGroup0() const
Definition: HPTDCErrorFlags.h:70
HPTDCErrorFlags::hitErrorGroup2
bool hitErrorGroup2() const
Definition: HPTDCErrorFlags.h:62
HPTDCErrorFlags::internalFatalChipError
bool internalFatalChipError() const
Definition: HPTDCErrorFlags.h:56
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13150
HPTDCErrorFlags::hitLostL1OverflowGroup2
bool hitLostL1OverflowGroup2() const
Definition: HPTDCErrorFlags.h:63
HPTDCErrorFlags::hitRejectedByEventSizeLimit
bool hitRejectedByEventSizeLimit() const
Definition: HPTDCErrorFlags.h:58
HPTDCErrorFlags::eventLost
bool eventLost() const
Definition: HPTDCErrorFlags.h:57