CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DataFormats/EcalDigi/interface/EESrFlag.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
00002 //$Id: EESrFlag.h,v 1.2 2007/03/27 09:55:00 meridian Exp $
00003 
00004 #ifndef EESRFLAG_H
00005 #define EESRFLAG_H
00006 
00007 #include "DataFormats/EcalDetId/interface/EcalScDetId.h"
00008 #include "DataFormats/EcalDigi/interface/EcalSrFlag.h"
00009 #include "FWCore/Utilities/interface/Exception.h"
00010 
00014 class EESrFlag: public EcalSrFlag {
00015 public:
00016 
00017 public:
00018   typedef EcalScDetId key_type; //key for edm::SortedCollection
00019 
00020 public:
00023   EESrFlag() {}; 
00024   
00029   EESrFlag(const EcalScDetId& sc, const int& flag): scId_(sc){
00030     //SRP flag is coded on 3 bits:
00031     if(flag<0  || flag>0x7) throw cms::Exception("InvalidValue", "srp flag greater than 0x7 or negative.");
00032     flag_ = (unsigned char) flag;
00033   }
00034   
00038   const EcalScDetId& id() const { return scId_;}
00039   
00040 private:
00043   EcalScDetId scId_;  
00044 };
00045 
00046 
00047 std::ostream& operator<<(std::ostream& s, const EESrFlag& digi);
00048 
00049 #endif //EESRFLAG_H not defined