CMS 3D CMS Logo

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

#include <EcalErrorDictionary.h>

Classes

struct  errorDef_t
 

Static Public Member Functions

static void getDictionary (std::vector< errorDef_t > &dict)
 
static void getErrors (std::vector< errorDef_t > &errorVec, uint64_t bitcode)
 
static uint64_t getMask (std::string shortDesc)
 
static uint64_t hasError (std::string shortDesc, uint64_t bitcode)
 
static void printErrors (uint64_t bitcode)
 

Private Member Functions

 EcalErrorDictionary ()
 
 ~EcalErrorDictionary ()
 

Static Private Member Functions

static errorDef_t getDef (unsigned int i)
 

Static Private Attributes

const static unsigned int DICTSIZE = 55
 

Detailed Description

A dictionary of bitmasks for ECAL channel errors and their meaning This object is not meant to be stored in the offline DB, but the bits defined here are stored in EcalChannelStatus.

This class holds no dynamic data and all the methods are static.

Definition at line 15 of file EcalErrorDictionary.h.

Constructor & Destructor Documentation

◆ EcalErrorDictionary()

EcalErrorDictionary::EcalErrorDictionary ( )
inlineprivate

Definition at line 58 of file EcalErrorDictionary.h.

58 {}; // Hidden to force static use

◆ ~EcalErrorDictionary()

EcalErrorDictionary::~EcalErrorDictionary ( )
inlineprivate

Definition at line 59 of file EcalErrorDictionary.h.

59 {}; // Hidden to force static use

Member Function Documentation

◆ getDef()

static errorDef_t EcalErrorDictionary::getDef ( unsigned int  i)
inlinestaticprivate

Definition at line 63 of file EcalErrorDictionary.h.

63  {
64  const static errorDef_t ERRORDICT[DICTSIZE] = {
65 
66  {((uint64_t)1 << 0), "CH_ID_WARNING", "Channel id warning"},
67  {((uint64_t)1 << 1), "CH_GAIN_ZERO_WARNING", "Channel gain zero warning"},
68  {((uint64_t)1 << 2), "CH_GAIN_SWITCH_WARNING", "Channel gain switch warning"},
69  {((uint64_t)1 << 3), "CH_ID_ERROR", "Channel id error"},
70  {((uint64_t)1 << 4), "CH_GAIN_ZERO_ERROR", "Channel gain zero error"},
71  {((uint64_t)1 << 5), "CH_GAIN_SWITCH_ERROR", "Channel gain switch error"},
72 
73  {((uint64_t)1 << 6), "TT_ID_WARNING", "TT id warning"},
74  {((uint64_t)1 << 7), "TT_SIZE_WARNING", "TT size warning"},
75  {((uint64_t)1 << 8), "TT_LV1_WARNING", "TT LV1 warning"},
76  {((uint64_t)1 << 9), "TT_BUNCH_X_WARNING", "TT bunch-x warning"},
77  {((uint64_t)1 << 10), "TT_ID_ERROR", "TT id error"},
78  {((uint64_t)1 << 11), "TT_SIZE_ERROR", "TT size error"},
79  {((uint64_t)1 << 12), "TT_LV1_ERROR", "TT LV1 error"},
80  {((uint64_t)1 << 13), "TT_BUNCH_X_ERROR", "TT bunch-x error"},
81 
82  {((uint64_t)1 << 16), "PEDESTAL_LOW_GAIN_MEAN_WARNING", "Pedestal low gain mean amplitude outside range"},
83  {((uint64_t)1 << 17), "PEDESTAL_MIDDLE_GAIN_MEAN_WARNING", "Pedestal middle gain mean amplitude outside range"},
84  {((uint64_t)1 << 18), "PEDESTAL_HIGH_GAIN_MEAN_WARNING", "Pedestal high gain mean amplitude outside range"},
85  {((uint64_t)1 << 19), "PEDESTAL_LOW_GAIN_MEAN_ERROR", "Pedestal low gain mean amplitude error"},
86  {((uint64_t)1 << 20), "PEDESTAL_MIDDLE_GAIN_MEAN_ERROR", "Pedestal middle gain mean amplitude error"},
87  {((uint64_t)1 << 21), "PEDESTAL_HIGH_GAIN_MEAN_ERROR", "Pedestal high gain mean amplitude error"},
88 
89  {((uint64_t)1 << 22), "PEDESTAL_LOW_GAIN_RMS_WARNING", "Pedestal low gain rms amplitude outside range"},
90  {((uint64_t)1 << 23), "PEDESTAL_MIDDLE_GAIN_RMS_WARNING", "Pedestal middle gain rms amplitude outside range"},
91  {((uint64_t)1 << 24), "PEDESTAL_HIGH_GAIN_RMS_WARNING", "Pedestal high gain rms amplitude outside range"},
92  {((uint64_t)1 << 25), "PEDESTAL_LOW_GAIN_RMS_ERROR", "Pedestal low gain rms amplitude error"},
93  {((uint64_t)1 << 26), "PEDESTAL_MIDDLE_GAIN_RMS_ERROR", "Pedestal middle gain rms amplitude error"},
94  {((uint64_t)1 << 27), "PEDESTAL_HIGH_GAIN_RMS_ERROR", "Pedestal high gain rms amplitude error"},
95 
96  {((uint64_t)1 << 28),
97  "PEDESTAL_ONLINE_HIGH_GAIN_MEAN_WARNING",
98  "Pedestal online high gain mean amplitude outside range"},
99  {((uint64_t)1 << 29),
100  "PEDESTAL_ONLINE_HIGH_GAIN_RMS_WARNING",
101  "Pedestal online high gain rms amplitude outside range"},
102  {((uint64_t)1 << 30), "PEDESTAL_ONLINE_HIGH_GAIN_MEAN_ERROR", "Pedestal online high gain mean amplitude error"},
103  {((uint64_t)1 << 31), "PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR", "Pedestal online high gain rms amplitude error"},
104 
105  {((uint64_t)1 << 32), "TESTPULSE_LOW_GAIN_MEAN_WARNING", "Testpulse low gain mean amplitude outside range"},
106  {((uint64_t)1 << 33),
107  "TESTPULSE_MIDDLE_GAIN_MEAN_WARNING",
108  "Testpulse middle gain mean amplitude outside range"},
109  {((uint64_t)1 << 34), "TESTPULSE_HIGH_GAIN_MEAN_WARNING", "Testpulse high gain mean amplitude outside range"},
110  {((uint64_t)1 << 35), "TESTPULSE_LOW_GAIN_RMS_WARNING", "Testpulse low gain rms amplitude outside range"},
111  {((uint64_t)1 << 36), "TESTPULSE_MIDDLE_GAIN_RMS_WARNING", "Testpulse middle gain rms amplitude outside range"},
112  {((uint64_t)1 << 37), "TESTPULSE_HIGH_GAIN_RMS_WARNING", "Testpulse high gain rms amplitude outside range"},
113 
114  {((uint64_t)1 << 38), "LASER_MEAN_WARNING", "Laser mean amplitude outside range"},
115  {((uint64_t)1 << 39), "LASER_RMS_WARNING", "Laser rms amplitude outside range"},
116 
117  {((uint64_t)1 << 40), "LASER_MEAN_OVER_PN_WARNING", "Laser mean amplitude over PN outside range"},
118  {((uint64_t)1 << 41), "LASER_RMS_OVER_PN_WARNING", "Laser rms amplitude over PN outside range"},
119 
120  {((uint64_t)1 << 42), "LASER_MEAN_TIMING_WARNING", "Laser channel mean timing outside range"},
121  {((uint64_t)1 << 43), "LASER_RMS_TIMING_WARNING", "Laser channel rms timing outside range"},
122 
123  {((uint64_t)1 << 44), "LASER_MEAN_TT_TIMING_WARNING", "Laser tower mean timing outside range"},
124  {((uint64_t)1 << 45), "LASER_RMS_TT_TIMING_WARNING", "Laser tower rms timing outside range"},
125 
126  {((uint64_t)1 << 46), "PHYSICS_MEAN_TIMING_WARNING", "Channel mean timing outside range for physics events"},
127  {((uint64_t)1 << 47), "PHYSICS_RMS_TIMING_WARNING", "Channel rms timing outside range for physics events"},
128 
129  {((uint64_t)1 << 48), "PHYSICS_MEAN_TT_TIMING_WARNING", "TT mean timing outside range for physics events"},
130  {((uint64_t)1 << 49), "PHYSICS_RMS_TT_TIMING_WARNING", "TT rms timing outside range for physics events"},
131 
132  {((uint64_t)1 << 50), "PHYSICS_BAD_CHANNEL_WARNING", "Bad signal for physics events"},
133  {((uint64_t)1 << 51), "PHYSICS_BAD_CHANNEL_ERROR", "No signal for physics events"},
134 
135  {((uint64_t)1 << 52), "STATUS_FLAG_ERROR", "Readout tower front end error (any type)"},
136 
137  {((uint64_t)1 << 53), "LED_MEAN_WARNING", "Led mean amplitude outside range"},
138  {((uint64_t)1 << 54), "LED_RMS_WARNING", "Led rms amplitude outside range"}
139 
140  };
141 
142  return ERRORDICT[i];
143  }

References DICTSIZE, and mps_fire::i.

Referenced by getDictionary(), getErrors(), getMask(), and printErrors().

◆ getDictionary()

static void EcalErrorDictionary::getDictionary ( std::vector< errorDef_t > &  dict)
inlinestatic

Definition at line 50 of file EcalErrorDictionary.h.

50  {
51  dict.clear();
52  for (unsigned int i = 0; i < DICTSIZE; i++) {
53  dict.push_back(getDef(i));
54  }
55  }

References DICTSIZE, getDef(), and mps_fire::i.

◆ getErrors()

static void EcalErrorDictionary::getErrors ( std::vector< errorDef_t > &  errorVec,
uint64_t  bitcode 
)
inlinestatic

Definition at line 41 of file EcalErrorDictionary.h.

41  {
42  errorVec.clear();
43  for (unsigned int i = 0; i < DICTSIZE; i++) {
44  if (bitcode & getDef(i).bitmask) {
45  errorVec.push_back(getDef(i));
46  }
47  }
48  }

References DICTSIZE, getDef(), and mps_fire::i.

◆ getMask()

static uint64_t EcalErrorDictionary::getMask ( std::string  shortDesc)
inlinestatic

Definition at line 25 of file EcalErrorDictionary.h.

25  {
26  for (unsigned int i = 0; i < DICTSIZE; i++) {
27  if (getDef(i).shortDesc == shortDesc) {
28  return getDef(i).bitmask;
29  }
30  }
31  return 0;
32  }

References EcalErrorDictionary::errorDef_t::bitmask, DICTSIZE, getDef(), and mps_fire::i.

Referenced by hasError(), popcon::EcalChannelStatusHandler::laserMasking(), popcon::EcalChannelStatusHandler::pedMasking(), popcon::EcalChannelStatusHandler::pedOnlineMasking(), and popcon::EcalChannelStatusHandler::physicsMasking().

◆ hasError()

static uint64_t EcalErrorDictionary::hasError ( std::string  shortDesc,
uint64_t  bitcode 
)
inlinestatic

Definition at line 23 of file EcalErrorDictionary.h.

23 { return getMask(shortDesc) & bitcode; }

References getMask().

◆ printErrors()

static void EcalErrorDictionary::printErrors ( uint64_t  bitcode)
inlinestatic

Definition at line 34 of file EcalErrorDictionary.h.

34  {
35  for (unsigned int i = 0; i < DICTSIZE; i++) {
36  if (bitcode & getDef(i).bitmask) {
37  }
38  }
39  }

References DICTSIZE, getDef(), and mps_fire::i.

Member Data Documentation

◆ DICTSIZE

const static unsigned int EcalErrorDictionary::DICTSIZE = 55
staticprivate

Definition at line 61 of file EcalErrorDictionary.h.

Referenced by getDef(), getDictionary(), getErrors(), getMask(), and printErrors().

mps_fire.i
i
Definition: mps_fire.py:428
EcalErrorDictionary::errorDef_t::bitmask
uint64_t bitmask
Definition: EcalErrorDictionary.h:18
EcalErrorDictionary::DICTSIZE
const static unsigned int DICTSIZE
Definition: EcalErrorDictionary.h:61
EcalErrorDictionary::getDef
static errorDef_t getDef(unsigned int i)
Definition: EcalErrorDictionary.h:63
EcalErrorDictionary::getMask
static uint64_t getMask(std::string shortDesc)
Definition: EcalErrorDictionary.h:25
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13