CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalCaloFlagLabels.h
Go to the documentation of this file.
1 #ifndef GUARD_HCALCALOFLAGLABELS_H
2 #define GUARD_HCALCALOFLAGLABELS_H
3 
5 #include <string>
6 
7 // Create alias names for all status bits
8 // These aliases are valid for only the _current release_
9 // Use the HcalCaloFlagTool (below) for full interpretation
10 namespace HcalCaloFlagLabels
11 {
12  //subdetector-specific bits defined here (bits 0-15)
19  HBHETimingTrustBits=6, // 2-bit counter; not yet in use
20  HBHETimingShapedCutsBits=8, // 3-bit counter
26  };
27 
29 
31 
34  HFInTimeWindow=2, // requires hit be within certain time window
37  };
38 
39 
41 
43 
44  // Bit definitions that apply to all subdetectors (bits 16-31)
45  enum CommonFlag {TimingSubtractedBit=16, // latency shift correction, recovered
46  TimingAddedBit=17, // latency shift correction, recovered
47  TimingErrorBit=18, // latency shift error, unrecovered
49  Fraction2TS=20, // should deprecate this at some point
50  PresampleADC=20, // uses 7 bits to store ADC from presample
51  // The following bits are all user-defined; reverse-order them so that UserDefinedBit0 will be the last removed
55 };
56 
57 }
58 
63 public:
64  HcalCaloFlagTool(const std::string& releaseName);
65  std::string getFieldName(HcalSubdetector sd, int bit) const;
66  int getFieldWidth(HcalSubdetector sd, int bit) const;
67  int getFieldStart(HcalSubdetector sd, const std::string& field) const;
68  int getFieldWidth(HcalSubdetector sd, const std::string& field) const;
69  bool hasField(HcalSubdetector sd, const std::string& field) const;
70  bool hasField(HcalSubdetector sd, int bit) const;
71 private:
72  std::string releaseName_;
75 };
76 
77 #endif
HcalCaloFlagTool(const std::string &releaseName)
Provides interpretation of flag bits with understanding of CMSSW version dependence.
std::string getFieldName(HcalSubdetector sd, int bit) const
int getFieldStart(HcalSubdetector sd, const std::string &field) const
HcalSubdetector
Definition: HcalAssistant.h:32
std::string releaseName_
bool hasField(HcalSubdetector sd, const std::string &field) const
int getFieldWidth(HcalSubdetector sd, int bit) const
double sd