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 
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
mps_fire.i
i
Definition: mps_fire.py:428
EcalEBTriggerPrimitiveDigi::size_
int size_
Definition: EcalEBTriggerPrimitiveDigi.h:57
EBDetId
Definition: EBDetId.h:17
EBDetId.h
EcalEBTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition: EcalEBTriggerPrimitiveDigi.cc:59
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
EcalEBTriggerPrimitiveDigi::key_type
EBDetId key_type
For the sorted collection.
Definition: EcalEBTriggerPrimitiveDigi.h:17
EcalEBTriggerPrimitiveDigi::id_
EBDetId id_
Definition: EcalEBTriggerPrimitiveDigi.h:56
EcalEBTriggerPrimitiveDigi::size
int size() const
Definition: EcalEBTriggerPrimitiveDigi.h:29
EcalEBTriggerPrimitiveSample
Definition: EcalEBTriggerPrimitiveSample.h:12
EcalEBTriggerPrimitiveDigi::sample
const EcalEBTriggerPrimitiveSample & sample(int i) const
Definition: EcalEBTriggerPrimitiveDigi.h:32
operator<<
std::ostream & operator<<(std::ostream &s, const EcalEBTriggerPrimitiveDigi &digi)
Definition: EcalEBTriggerPrimitiveDigi.cc:68
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalEBTriggerPrimitiveDigi::EcalEBTriggerPrimitiveDigi
EcalEBTriggerPrimitiveDigi()
Definition: EcalEBTriggerPrimitiveDigi.cc:4
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
EcalEBTriggerPrimitiveDigi::setSample
void setSample(int i, const EcalEBTriggerPrimitiveSample &sam)
Definition: EcalEBTriggerPrimitiveDigi.cc:11
EcalEBTriggerPrimitiveDigi::setSampleValue
void setSampleValue(int i, uint16_t value)
Definition: EcalEBTriggerPrimitiveDigi.h:36
EcalEBTriggerPrimitiveDigi::time
int time() const
Time info.
Definition: EcalEBTriggerPrimitiveDigi.cc:43
EcalEBTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: EcalEBTriggerPrimitiveDigi.h:38
EcalEBTriggerPrimitiveDigi::swap
void swap(EcalEBTriggerPrimitiveDigi &rh)
Definition: EcalEBTriggerPrimitiveDigi.h:22
swap
void swap(EcalEBTriggerPrimitiveDigi &lh, EcalEBTriggerPrimitiveDigi &rh)
Definition: EcalEBTriggerPrimitiveDigi.h:61
value
Definition: value.py:1
EcalEBTriggerPrimitiveDigi::data_
std::vector< EcalEBTriggerPrimitiveSample > data_
Definition: EcalEBTriggerPrimitiveDigi.h:58
EcalEBTriggerPrimitiveDigi::sampleOfInterest
int sampleOfInterest() const
Gets the interesting sample.
Definition: EcalEBTriggerPrimitiveDigi.cc:17
EcalEBTriggerPrimitiveDigi
Definition: EcalEBTriggerPrimitiveDigi.h:15
EcalEBTriggerPrimitiveDigi::l1aSpike
bool l1aSpike() const
Spike flag.
Definition: EcalEBTriggerPrimitiveDigi.cc:35
EcalEBTriggerPrimitiveSample.h
EcalEBTriggerPrimitiveDigi::id
const EBDetId & id() const
Definition: EcalEBTriggerPrimitiveDigi.h:28
EcalEBTriggerPrimitiveDigi::encodedEt
int encodedEt() const
get the 10 bits Et of interesting sample
Definition: EcalEBTriggerPrimitiveDigi.cc:27
EcalEBTriggerPrimitiveDigi::isDebug
bool isDebug() const
True if debug mode (# of samples > 1)
Definition: EcalEBTriggerPrimitiveDigi.cc:51
EcalEBTriggerPrimitiveDigi::operator[]
const EcalEBTriggerPrimitiveSample & operator[](int i) const
Definition: EcalEBTriggerPrimitiveDigi.h:31