CMS 3D CMS Logo

EcalEBTriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef ECALEBTRIGGERPRIMITIVEDIGI_H
2 #define ECALEBTRIGGERPRIMITIVEDIGI_H 1
3 
4 #include <ostream>
5 #include <vector>
8 
9 
10 
18  public:
19  typedef EBDetId key_type;
20 
21  EcalEBTriggerPrimitiveDigi(); // for persistence
23 
24 
26  std::swap(id_,rh.id_);
27  std::swap(size_,rh.size_);
28  std::swap(data_,rh.data_);
29  }
30 
31  const EBDetId& id() const { return id_; }
32  int size() const { return size_; }
33 
34  const EcalEBTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
35  const EcalEBTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
36 
37  void setSize(int size);
38  void setSample(int i, const EcalEBTriggerPrimitiveSample& sam);
39  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
40 
41  static const int MAXSAMPLES = 20;
42 
44  int encodedEt() const;
45 
47  bool l1aSpike() const;
48 
50  int time() const;
51 
53  bool isDebug() const;
54 
56  int sampleOfInterest() const;
57 
58 private:
60  int size_;
61  std::vector<EcalEBTriggerPrimitiveSample> data_;
62 
63 };
64 
65 
67  lh.swap(rh);
68 }
69 
70 std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveDigi& digi);
71 
72 
73 
74 #endif
void swap(EcalEBTriggerPrimitiveDigi &rh)
bool l1aSpike() const
Spike flag.
std::vector< EcalEBTriggerPrimitiveSample > data_
bool int lh
Definition: SIMDVec.h:20
void setSample(int i, const EcalEBTriggerPrimitiveSample &sam)
void setSampleValue(int i, uint16_t value)
EBDetId key_type
For the sorted collection.
std::ostream & operator<<(std::ostream &s, const EcalEBTriggerPrimitiveDigi &digi)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const EcalEBTriggerPrimitiveSample & sample(int i) const
int encodedEt() const
get the 10 bits Et of interesting sample
Definition: value.py:1
const EcalEBTriggerPrimitiveSample & operator[](int i) const
bool isDebug() const
True if debug mode (# of samples > 1)
int sampleOfInterest() const
Gets the interesting sample.