CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi() : size_(0), data_(MAXSAMPLES) {}
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 }
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
bool isDebug() const
True if debug mode (# of samples &gt; 1)
int compressedEt() const
get the encoded/compressed Et of interesting sample
const EcalTriggerPrimitiveSample & sample(int i) const
const EcalTrigTowerDetId & id() const
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_
tuple size
Write out results.