CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/EcalDigi/interface/EBSrFlag.h

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