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 
19  public:
21 
22  EcalTriggerPrimitiveDigi(); // for persistence
23  explicit EcalTriggerPrimitiveDigi(const EcalTrigTowerDetId& id);
24 
25 
27  std::swap(id_,rh.id_);
28  std::swap(size_,rh.size_);
29  std::swap(data_,rh.data_);
30  }
31 
32  const EcalTrigTowerDetId& id() const { return id_; }
33  int size() const { return size_; }
34 
35  const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
36  const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
37 
38  void setSize(int size);
39  void setSample(int i, const EcalTriggerPrimitiveSample& sam) { data_[i]=sam; }
40  void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
41 
42  static const int MAXSAMPLES = 20;
43 
45  int compressedEt() const;
46 
47 
49  bool fineGrain() const;
50 
52  int ttFlag() const;
53 
57  int sFGVB() const;
58 
63  int l1aSpike() const { return sFGVB(); }
64 
66  bool isDebug() const;
67 
69  int sampleOfInterest() const;
70 
71 private:
72 
74  int size_;
75  std::vector<EcalTriggerPrimitiveSample> data_;
76 };
77 
78 
80  lh.swap(rh);
81 }
82 
83 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi);
84 
85 
86 
87 #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: SSEVec.h:55
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_