CMS 3D CMS Logo

EcalSrFlag.h
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
2 
3 #ifndef ECALSRFLAG
4 #define ECALSRFLAG
5 
7 
10 class EcalSrFlag {
11 public:
15  static const int SRF_SUPPRESS = 0;
18  static const int SRF_ZS1 = 1;
21  static const int SRF_ZS2 = 2;
24  static const int SRF_FULL = 3;
29  static const int SRF_FORCED_MASK = 0x4;
30 
31 public:
34  virtual ~EcalSrFlag(){};
35 
39  virtual const DetId& id() const = 0;
40 
44  int value() const { return flag_; }
45 
49  void setValue(const int& flag) { flag_ = (unsigned char)flag; }
50 
54  operator int() const { return flag_; }
55 
60  static std::string flagName(const int& flag) { return (flag == (flag & 0x7)) ? srfNames[flag] : "Invalid"; }
61 
65  std::string flagName() const { return flagName(flag_); }
66 
67 protected:
70  unsigned char flag_;
71 
72 private:
75  static const char* const srfNames[];
76 };
77 
78 #endif //ECALSRFLAG not defined
EcalSrFlag::~EcalSrFlag
virtual ~EcalSrFlag()
Definition: EcalSrFlag.h:34
EcalSrFlag::value
int value() const
Definition: EcalSrFlag.h:44
EcalSrFlag::SRF_SUPPRESS
static const int SRF_SUPPRESS
Definition: EcalSrFlag.h:15
DetId
Definition: DetId.h:17
EcalSrFlag::SRF_ZS1
static const int SRF_ZS1
Definition: EcalSrFlag.h:18
EcalSrFlag::flag_
unsigned char flag_
Definition: EcalSrFlag.h:70
EcalSrFlag::SRF_ZS2
static const int SRF_ZS2
Definition: EcalSrFlag.h:21
EcalSrFlag::srfNames
static const char *const srfNames[]
Definition: EcalSrFlag.h:75
EcalSrFlag::id
virtual const DetId & id() const =0
EcalSrFlag
Definition: EcalSrFlag.h:10
EcalSrFlag::flagName
std::string flagName() const
Definition: EcalSrFlag.h:65
createfilelist.int
int
Definition: createfilelist.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSrFlag::setValue
void setValue(const int &flag)
Definition: EcalSrFlag.h:49
EcalSrFlag::SRF_FULL
static const int SRF_FULL
Definition: EcalSrFlag.h:24
DetId.h
EcalSrFlag::flagName
static std::string flagName(const int &flag)
Definition: EcalSrFlag.h:60
EcalSrFlag::SRF_FORCED_MASK
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:29
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117