CMS 3D CMS Logo

EcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5 
7  : id_(id), size_(0), data_(MAXSAMPLES) {}
8 
10  if (size_ == 1)
11  return 0;
12  else if (size_ == 5)
13  return 2;
14  else
15  return -1;
16 }
17 
20  int sample = sampleOfInterest();
21  if (sample != -1)
22  return data_[sample].compressedEt();
23  else
24  return -1;
25 }
26 
29  int sample = sampleOfInterest();
30  if (sample != -1)
31  return data_[sample].fineGrain();
32  else
33  return false;
34 }
37  int sample = sampleOfInterest();
38  if (sample != -1)
39  return data_[sample].ttFlag();
40  else
41  return -1;
42 }
43 
45  int sample = sampleOfInterest();
46  if (sample != -1)
47  return data_[sample].l1aSpike();
48  else
49  return -1;
50 }
51 
53  if (size_ == 1)
54  return false;
55  else if (size_ > 1)
56  return true;
57  return false;
58 }
59 
61  if (size < 0)
62  size_ = 0;
63  else if (size > MAXSAMPLES)
64  size_ = MAXSAMPLES;
65  else
66  size_ = size;
67 }
68 
69 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi) {
70  s << digi.id() << " " << digi.size() << " samples " << std::endl;
71  for (int i = 0; i < digi.size(); i++)
72  s << " " << digi.sample(i) << std::endl;
73  return s;
74 }
size
Write out results.
bool fineGrain() const
get the fine-grain bit of interesting sample
const EcalTrigTowerDetId & id() const
bool isDebug() const
True if debug mode (# of samples > 1)
int sampleOfInterest() const
Gets the interesting sample.
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveDigi &digi)
static constexpr int MAXSAMPLES
int compressedEt() const
get the encoded/compressed Et of interesting sample
int ttFlag() const
get the Trigger tower Flag of interesting sample
std::vector< EcalTriggerPrimitiveSample > data_
const EcalTriggerPrimitiveSample & sample(int i) const