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 
10 
11 
19  public:
21 
22 
23  EcalTriggerPrimitiveDigi(); // for persistence
24  explicit EcalTriggerPrimitiveDigi(const EcalTrigTowerDetId& id);
25 
26 
27 
29  std::swap(id_,rh.id_);
30  std::swap(size_,rh.size_);
31  std::swap(data_,rh.data_);
32  }
33 
34 
35  const EcalTrigTowerDetId& id() const { return id_; }
36  int size() const { return size_; }
37 
38  const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
39  const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
40 
41  void setSize(int size);
42  void setSample(int i, const EcalTriggerPrimitiveSample& sam) { data_[i]=sam;}
43  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
44 
45  static const int MAXSAMPLES = 20;
46 
48  int compressedEt() const;
49 
50 
52  bool fineGrain() const;
53 
55  int ttFlag() const;
56 
60  int sFGVB() const;
61 
66  int l1aSpike() const { return sFGVB(); }
67 
69  bool isDebug() const;
70 
72  int sampleOfInterest() const;
73 
74 private:
76  int size_;
77  std::vector<EcalTriggerPrimitiveSample> data_;
78 };
79 
80 
82  lh.swap(rh);
83 }
84 
85 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi);
86 
87 
88 
89 #endif
void swap(EcalTriggerPrimitiveDigi &rh)
const EcalTriggerPrimitiveSample & operator[](int i) const
bool int lh
Definition: SIMDVec.h:21
bool isDebug() const
True if debug mode (# of samples > 1)
int compressedEt() const
get the encoded/compressed Et of interesting sample
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveDigi &digi)
EcalTrigTowerDetId key_type
For the sorted collection.
const EcalTriggerPrimitiveSample & sample(int i) const
Definition: value.py:1
const EcalTrigTowerDetId & id() const
void setSampleValue(int i, uint16_t value)
bool fineGrain() const
get the fine-grain bit of interesting sample
int sampleOfInterest() const
Gets the interesting sample.
int ttFlag() const
get the Trigger tower Flag of interesting sample
std::vector< EcalTriggerPrimitiveSample > data_