CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
16 public:
17  typedef EBDetId key_type;
18 
19  EcalEBTriggerPrimitiveDigi(); // 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 EcalEBTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
32  const EcalEBTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
33 
34  void setSize(int size);
35  void setSample(int i, const EcalEBTriggerPrimitiveSample& sam);
36  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
37 
38  static const int MAXSAMPLES = 20;
39 
41  int encodedEt() const;
42 
44  bool l1aSpike() const;
45 
47  int time() const;
48 
50  bool isDebug() const;
51 
53  int sampleOfInterest() const;
54 
55 private:
57  int size_;
58  std::vector<EcalEBTriggerPrimitiveSample> data_;
59 };
60 
62 
63 std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveDigi& digi);
64 
65 #endif
void swap(EcalEBTriggerPrimitiveDigi &rh)
bool l1aSpike() const
Spike flag.
std::vector< EcalEBTriggerPrimitiveSample > data_
bool int lh
Definition: SIMDVec.h:20
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
void setSample(int i, const EcalEBTriggerPrimitiveSample &sam)
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
void setSampleValue(int i, uint16_t value)
EBDetId key_type
For the sorted collection.
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
const EcalEBTriggerPrimitiveSample & operator[](int i) const
bool isDebug() const
True if debug mode (# of samples &gt; 1)
int sampleOfInterest() const
Gets the interesting sample.