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 {
35  s << "EcalSampleMask: EB " << sampleMaskEB_ << "; EE " << sampleMaskEE_ ;
36  }
37 
38  bool useSampleEB (const int sampleId) const ;
39  bool useSampleEE (const int sampleId) const ;
40  bool useSample (const int sampleId, DetId &theCrystal) const;
41 
42  private:
43  unsigned int sampleMaskEB_;
44  unsigned int sampleMaskEE_;
45 
46 
48 };
49 
50 
51 #endif
void setEcalSampleMaskRecordEE(const unsigned int mask)
unsigned int sampleMaskEB_
bool useSample(const int sampleId, DetId &theCrystal) const
bool useSampleEB(const int sampleId) const
unsigned int sampleMaskEE_
float getEcalSampleMaskRecordEE() const
Definition: DetId.h:18
void setEcalSampleMaskRecordEB(const unsigned int mask)
#define COND_SERIALIZABLE
Definition: Serializable.h:38
float getEcalSampleMaskRecordEB() const
void print(std::ostream &s) const
bool useSampleEE(const int sampleId) const