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.

Member Function Documentation

◆ errorFlag()

unsigned short HPTDCErrorFlags::errorFlag ( ) const
inline

Definition at line 72 of file HPTDCErrorFlags.h.

References error_flags.

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

72 { return error_flags; }
unsigned short error_flags

◆ errorId()

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

Definition at line 19 of file HPTDCErrorFlags.h.

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

Referenced by CTPPSDiamondDQMSource::analyze().

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  }
bool hitLostL1OverflowGroup2() const
bool internalFatalChipError() const
bool hitLostL1OverflowGroup3() const
bool hitLostROFifoOverflowGroup0() const
bool hitLostL1OverflowGroup1() const
bool hitLostL1OverflowGroup0() const
bool hitRejectedByEventSizeLimit() const
bool hitLostROFifoOverflowGroup3() const
bool eventLost() const
bool hitErrorGroup3() const
bool hitErrorGroup0() const
bool hitErrorGroup2() const
bool hitLostROFifoOverflowGroup2() const
bool hitErrorGroup1() const
bool hitLostROFifoOverflowGroup1() const

◆ eventLost()

bool HPTDCErrorFlags::eventLost ( ) const
inline

Definition at line 57 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitErrorGroup0()

bool HPTDCErrorFlags::hitErrorGroup0 ( ) const
inline

Definition at line 68 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitErrorGroup1()

bool HPTDCErrorFlags::hitErrorGroup1 ( ) const
inline

Definition at line 65 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitErrorGroup2()

bool HPTDCErrorFlags::hitErrorGroup2 ( ) const
inline

Definition at line 62 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitErrorGroup3()

bool HPTDCErrorFlags::hitErrorGroup3 ( ) const
inline

Definition at line 59 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostL1OverflowGroup0()

bool HPTDCErrorFlags::hitLostL1OverflowGroup0 ( ) const
inline

Definition at line 69 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostL1OverflowGroup1()

bool HPTDCErrorFlags::hitLostL1OverflowGroup1 ( ) const
inline

Definition at line 66 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostL1OverflowGroup2()

bool HPTDCErrorFlags::hitLostL1OverflowGroup2 ( ) const
inline

Definition at line 63 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostL1OverflowGroup3()

bool HPTDCErrorFlags::hitLostL1OverflowGroup3 ( ) const
inline

Definition at line 60 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostROFifoOverflowGroup0()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup0 ( ) const
inline

Definition at line 70 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostROFifoOverflowGroup1()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup1 ( ) const
inline

Definition at line 67 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostROFifoOverflowGroup2()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup2 ( ) const
inline

Definition at line 64 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitLostROFifoOverflowGroup3()

bool HPTDCErrorFlags::hitLostROFifoOverflowGroup3 ( ) const
inline

Definition at line 61 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hitRejectedByEventSizeLimit()

bool HPTDCErrorFlags::hitRejectedByEventSizeLimit ( ) const
inline

Definition at line 58 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

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

◆ hptdcErrorName()

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

Definition at line 74 of file HPTDCErrorFlags.h.

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

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  }

◆ internalFatalChipError()

bool HPTDCErrorFlags::internalFatalChipError ( ) const
inline

Definition at line 56 of file HPTDCErrorFlags.h.

References error_flags.

Referenced by errorId().

56 { return error_flags & 0x1; }
unsigned short error_flags

Member Data Documentation

◆ error_flags

unsigned short HPTDCErrorFlags::error_flags
private