CMS 3D CMS Logo

EcalSampleMask.h
Go to the documentation of this file.
1 #ifndef CondFormats_EcalObjects_EcalSampleMask_H
2 #define CondFormats_EcalObjects_EcalSampleMask_H
3 
10 
11 #include <iostream>
12 #include <vector>
15 
17 public:
19 
20  // construct from pre-organized binary words
21  EcalSampleMask(const unsigned int ebmask, const unsigned int eemask);
22  // constructor from an ordered set of switches, one per sample
23  EcalSampleMask(const std::vector<unsigned int> &ebmask, const std::vector<unsigned int> &eemask);
24 
26 
27  void setEcalSampleMaskRecordEB(const unsigned int mask) { sampleMaskEB_ = mask; }
28  void setEcalSampleMaskRecordEE(const unsigned int mask) { sampleMaskEE_ = mask; }
29  void setEcalSampleMaskRecordEB(const std::vector<unsigned int> &ebmask);
30  void setEcalSampleMaskRecordEE(const std::vector<unsigned int> &eemask);
31 
32  float getEcalSampleMaskRecordEB() const { return sampleMaskEB_; }
33  float getEcalSampleMaskRecordEE() const { return sampleMaskEE_; }
34  void print(std::ostream &s) const { s << "EcalSampleMask: EB " << sampleMaskEB_ << "; EE " << sampleMaskEE_; }
35 
36  bool useSampleEB(const int sampleId) const;
37  bool useSampleEE(const int sampleId) const;
38  bool useSample(const int sampleId, DetId &theCrystal) const;
39 
40 private:
41  unsigned int sampleMaskEB_;
42  unsigned int sampleMaskEE_;
43 
45 };
46 
47 #endif
EBDetId.h
EcalSampleMask
Definition: EcalSampleMask.h:16
EEDetId.h
EcalSampleMask::print
void print(std::ostream &s) const
Definition: EcalSampleMask.h:34
EcalSampleMask::setEcalSampleMaskRecordEB
void setEcalSampleMaskRecordEB(const unsigned int mask)
Definition: EcalSampleMask.h:27
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
EcalSampleMask::setEcalSampleMaskRecordEE
void setEcalSampleMaskRecordEE(const unsigned int mask)
Definition: EcalSampleMask.h:28
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalSampleMask::useSampleEE
bool useSampleEE(const int sampleId) const
Definition: EcalSampleMask.cc:103
EcalSampleMask::sampleMaskEE_
unsigned int sampleMaskEE_
Definition: EcalSampleMask.h:42
EcalSampleMask::EcalSampleMask
EcalSampleMask()
Definition: EcalSampleMask.cc:14
EcalSampleMask::getEcalSampleMaskRecordEB
float getEcalSampleMaskRecordEB() const
Definition: EcalSampleMask.h:32
Serializable.h
EcalSampleMask::useSample
bool useSample(const int sampleId, DetId &theCrystal) const
Definition: EcalSampleMask.cc:116
EcalSampleMask::~EcalSampleMask
~EcalSampleMask()
Definition: EcalSampleMask.cc:30
EcalSampleMask::getEcalSampleMaskRecordEE
float getEcalSampleMaskRecordEE() const
Definition: EcalSampleMask.h:33
EcalSampleMask::useSampleEB
bool useSampleEB(const int sampleId) const
Definition: EcalSampleMask.cc:90
EcalSampleMask::sampleMaskEB_
unsigned int sampleMaskEB_
Definition: EcalSampleMask.h:41