File indexing completed on 2024-09-10 02:58:36
0001
0002
0003 #ifndef EESRFLAG_H
0004 #define EESRFLAG_H
0005
0006 #include "DataFormats/EcalDetId/interface/EcalScDetId.h"
0007 #include "DataFormats/EcalDigi/interface/EcalSrFlag.h"
0008 #include "FWCore/Utilities/interface/Exception.h"
0009
0010
0011
0012
0013 class EESrFlag : public EcalSrFlag {
0014 public:
0015 public:
0016 typedef EcalScDetId key_type;
0017
0018 public:
0019
0020
0021 EESrFlag() {}
0022
0023
0024
0025
0026
0027 EESrFlag(const EcalScDetId& sc, const int& flag) : scId_(sc) {
0028
0029 if (flag < 0 || flag > 0x7)
0030 throw cms::Exception("InvalidValue", "srp flag greater than 0x7 or negative.");
0031 flag_ = (unsigned char)flag;
0032 }
0033
0034
0035
0036
0037 const EcalScDetId& id() const override { return scId_; }
0038
0039 private:
0040
0041
0042 EcalScDetId scId_;
0043 };
0044
0045 std::ostream& operator<<(std::ostream& s, const EESrFlag& digi);
0046
0047 #endif