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
void setEcalSampleMaskRecordEE(const unsigned int mask)
bool useSampleEB(const int sampleId) const
bool useSampleEE(const int sampleId) const
void print(std::ostream &s) const
unsigned int sampleMaskEB_
constexpr uint32_t mask
Definition: gpuClustering.h:26
bool useSample(const int sampleId, DetId &theCrystal) const
float getEcalSampleMaskRecordEB() const
unsigned int sampleMaskEE_
Definition: DetId.h:17
void setEcalSampleMaskRecordEB(const unsigned int mask)
#define COND_SERIALIZABLE
Definition: Serializable.h:39
float getEcalSampleMaskRecordEE() const