test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
8 
9 
10 
18  public:
20 
21  EcalTriggerPrimitiveDigi(); // for persistence
22  explicit EcalTriggerPrimitiveDigi(const EcalTrigTowerDetId& id);
23 
24 
26  std::swap(id_,rh.id_);
27  std::swap(size_,rh.size_);
28  std::swap(data_,rh.data_);
29  }
30 
31  const EcalTrigTowerDetId& id() const { return id_; }
32  int size() const { return size_; }
33 
34  const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
35  const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
36 
37  void setSize(int size);
38  void setSample(int i, const EcalTriggerPrimitiveSample& sam) { data_[i]=sam; }
39  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
40 
41  static const int MAXSAMPLES = 20;
42 
44  int compressedEt() const;
45 
46 
48  bool fineGrain() const;
49 
51  int ttFlag() const;
52 
56  int sFGVB() const;
57 
62  int l1aSpike() const { return sFGVB(); }
63 
65  bool isDebug() const;
66 
68  int sampleOfInterest() const;
69 
70 private:
71 
73  int size_;
74  std::vector<EcalTriggerPrimitiveSample> data_;
75 };
76 
77 
79  lh.swap(rh);
80 }
81 
82 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi);
83 
84 
85 
86 #endif
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
int i
Definition: DBlmapReader.cc:9
void swap(EcalTriggerPrimitiveDigi &rh)
const EcalTriggerPrimitiveSample & operator[](int i) const
bool int lh
Definition: SIMDVec.h:21
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool isDebug() const
True if debug mode (# of samples &gt; 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)
EcalTrigTowerDetId key_type
For the sorted collection.
const EcalTriggerPrimitiveSample & sample(int i) const
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_