CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EcalEBPhase2TriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef DataFormats_EcalDigi_EcalEBPhase2TriggerPrimitiveDigi_h
2 #define DataFormats_EcalDigi_EcalEBPhase2TriggerPrimitiveDigi_h
3 
4 #include <ostream>
5 #include <vector>
8 
16 public:
17  typedef EBDetId key_type;
18 
19  EcalEBPhase2TriggerPrimitiveDigi(); // for persistence
21 
23  std::swap(id_, rh.id_);
24  std::swap(size_, rh.size_);
25  std::swap(data_, rh.data_);
26  }
27 
28  const EBDetId& id() const { return id_; }
29  int size() const { return size_; }
30 
31  const EcalEBPhase2TriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
32  const EcalEBPhase2TriggerPrimitiveSample& sample(int i) const { return data_[i]; }
33 
34  void setSize(int size);
35  void setSample(int i, const EcalEBPhase2TriggerPrimitiveSample& sam);
36  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
37 
39  int encodedEt() const;
40 
42  bool l1aSpike() const;
43 
45  int time() const;
46 
48  bool isDebug() const;
49 
51  int sampleOfInterest() const;
52 
53 private:
55  int size_;
56  std::vector<EcalEBPhase2TriggerPrimitiveSample> data_;
57 };
58 
60 
61 std::ostream& operator<<(std::ostream& s, const EcalEBPhase2TriggerPrimitiveDigi& digi);
62 
63 #endif
const EcalEBPhase2TriggerPrimitiveSample & operator[](int i) const
EBDetId key_type
For the sorted collection.
void setSample(int i, const EcalEBPhase2TriggerPrimitiveSample &sam)
bool int lh
Definition: SIMDVec.h:20
void swap(EcalEBPhase2TriggerPrimitiveDigi &lh, EcalEBPhase2TriggerPrimitiveDigi &rh)
int sampleOfInterest() const
Gets the interesting sample.
int encodedEt() const
get the 12 bits Et of interesting sample
const EcalEBPhase2TriggerPrimitiveSample & sample(int i) const
Definition: value.py:1
std::vector< EcalEBPhase2TriggerPrimitiveSample > data_
bool isDebug() const
True if debug mode (# of samples > 1)
void swap(EcalEBPhase2TriggerPrimitiveDigi &rh)
std::ostream & operator<<(std::ostream &s, const EcalEBPhase2TriggerPrimitiveDigi &digi)