CMS 3D CMS Logo

EcalTriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef ECALTRIGGERPRIMITIVEDIGI_H
2 #define ECALTRIGGERPRIMITIVEDIGI_H 1
3 
4 #include <ostream>
5 #include <vector>
6 
9 
17 public:
19 
20  EcalTriggerPrimitiveDigi(); // for persistence
21  explicit EcalTriggerPrimitiveDigi(const EcalTrigTowerDetId& id);
22 
24  std::swap(id_, rh.id_);
25  std::swap(size_, rh.size_);
26  std::swap(data_, rh.data_);
27  }
28 
29  const EcalTrigTowerDetId& id() const { return id_; }
30  int size() const { return size_; }
31 
32  const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
33  const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
34 
35  void setSize(int size);
36  void setSample(int i, const EcalTriggerPrimitiveSample& sam) { data_[i] = sam; }
37  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
38 
39  static const int MAXSAMPLES = 20;
40 
42  int compressedEt() const;
43 
45  bool fineGrain() const;
46 
48  int ttFlag() const;
49 
53  int sFGVB() const;
54 
59  int l1aSpike() const { return sFGVB(); }
60 
62  bool isDebug() const;
63 
65  int sampleOfInterest() const;
66 
67 private:
69  int size_;
70  std::vector<EcalTriggerPrimitiveSample> data_;
71 };
72 
74 
75 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi);
76 
77 #endif
EcalTriggerPrimitiveDigi::size
int size() const
Definition: EcalTriggerPrimitiveDigi.h:30
mps_fire.i
i
Definition: mps_fire.py:355
EcalTriggerPrimitiveDigi::sFGVB
int sFGVB() const
Definition: EcalTriggerPrimitiveDigi.cc:44
EcalTriggerPrimitiveDigi::key_type
EcalTrigTowerDetId key_type
For the sorted collection.
Definition: EcalTriggerPrimitiveDigi.h:18
EcalTriggerPrimitiveDigi::data_
std::vector< EcalTriggerPrimitiveSample > data_
Definition: EcalTriggerPrimitiveDigi.h:70
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
EcalTriggerPrimitiveDigi::sampleOfInterest
int sampleOfInterest() const
Gets the interesting sample.
Definition: EcalTriggerPrimitiveDigi.cc:9
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalTriggerPrimitiveDigi::id_
EcalTrigTowerDetId id_
Definition: EcalTriggerPrimitiveDigi.h:68
EcalTriggerPrimitiveDigi::ttFlag
int ttFlag() const
get the Trigger tower Flag of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:36
EcalTriggerPrimitiveDigi::setSampleValue
void setSampleValue(int i, uint16_t value)
Definition: EcalTriggerPrimitiveDigi.h:37
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi
EcalTriggerPrimitiveDigi()
Definition: EcalTriggerPrimitiveDigi.cc:4
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
EcalTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: EcalTriggerPrimitiveDigi.h:39
EcalTrigTowerDetId.h
EcalTriggerPrimitiveDigi::sample
const EcalTriggerPrimitiveSample & sample(int i) const
Definition: EcalTriggerPrimitiveDigi.h:33
EcalTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition: EcalTriggerPrimitiveDigi.cc:60
EcalTriggerPrimitiveDigi::setSample
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
Definition: EcalTriggerPrimitiveDigi.h:36
operator<<
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveDigi &digi)
Definition: EcalTriggerPrimitiveDigi.cc:69
value
Definition: value.py:1
EcalTriggerPrimitiveDigi::l1aSpike
int l1aSpike() const
Definition: EcalTriggerPrimitiveDigi.h:59
EcalTriggerPrimitiveDigi::operator[]
const EcalTriggerPrimitiveSample & operator[](int i) const
Definition: EcalTriggerPrimitiveDigi.h:32
EcalTriggerPrimitiveDigi::swap
void swap(EcalTriggerPrimitiveDigi &rh)
Definition: EcalTriggerPrimitiveDigi.h:23
EcalTriggerPrimitiveSample.h
swap
void swap(EcalTriggerPrimitiveDigi &lh, EcalTriggerPrimitiveDigi &rh)
Definition: EcalTriggerPrimitiveDigi.h:73
EcalTriggerPrimitiveDigi::id
const EcalTrigTowerDetId & id() const
Definition: EcalTriggerPrimitiveDigi.h:29
EcalTriggerPrimitiveDigi
Definition: EcalTriggerPrimitiveDigi.h:16
EcalTriggerPrimitiveDigi::isDebug
bool isDebug() const
True if debug mode (# of samples > 1)
Definition: EcalTriggerPrimitiveDigi.cc:52
EcalTriggerPrimitiveDigi::compressedEt
int compressedEt() const
get the encoded/compressed Et of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:19
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
EcalTriggerPrimitiveDigi::fineGrain
bool fineGrain() const
get the fine-grain bit of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:28
EcalTriggerPrimitiveDigi::size_
int size_
Definition: EcalTriggerPrimitiveDigi.h:69