CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalSrFlag.h
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
2 //$Id: EcalSrFlag.h,v 1.4 2007/03/27 09:55:01 meridian Exp $
3 
4 #ifndef ECALSRFLAG
5 #define ECALSRFLAG
6 
8 
11 class EcalSrFlag {
12 public:
16  static const int SRF_SUPPRESS = 0;
19  static const int SRF_ZS1 = 1;
22  static const int SRF_ZS2 = 2;
25  static const int SRF_FULL = 3;
30  static const int SRF_FORCED_MASK = 0x4;
31 
32 public:
35  virtual ~EcalSrFlag() {};
36 
40  virtual const DetId& id() const=0;
41 
45  int value() const{ return flag_;}
46 
50  void setValue(const int& flag) { flag_ = (unsigned char) flag; }
51 
55  operator int() const{
56  return flag_;
57  }
58 
63  static std::string flagName(const int& flag){
64  return (flag==(flag&0x7))?srfNames[flag]:"Invalid";
65  }
66 
70  std::string flagName() const{
71  return flagName(flag_);
72  }
73 
74 protected:
77  unsigned char flag_;
78 
79 private:
82  static const char* srfNames[];
83 };
84 
85 #endif //ECALSRFLAG not defined
86 
static const int SRF_SUPPRESS
Definition: EcalSrFlag.h:16
long int flag
Definition: mlp_lapack.h:47
int value() const
Definition: EcalSrFlag.h:45
unsigned char flag_
Definition: EcalSrFlag.h:77
static const int SRF_ZS2
Definition: EcalSrFlag.h:22
static const int SRF_FORCED_MASK
Definition: EcalSrFlag.h:30
virtual const DetId & id() const =0
static std::string flagName(const int &flag)
Definition: EcalSrFlag.h:63
virtual ~EcalSrFlag()
Definition: EcalSrFlag.h:35
void setValue(const int &flag)
Definition: EcalSrFlag.h:50
static const int SRF_FULL
Definition: EcalSrFlag.h:25
static const int SRF_ZS1
Definition: EcalSrFlag.h:19
Definition: DetId.h:20
static const char * srfNames[]
Definition: EcalSrFlag.h:82
std::string flagName() const
Definition: EcalSrFlag.h:70