CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 
3 
4 
6 }
8  size_(0), data_(MAXSAMPLES) {
9 }
10 
12 {
13  if (size_ == 1)
14  return 0;
15  else if (size_ == 5)
16  return 2;
17  else
18  return -1;
19 }
20 
23 {
24  int sample = sampleOfInterest();
25  if (sample != -1)
26  return data_[sample].compressedEt();
27  else
28  return -1;
29 }
30 
33 {
34  int sample = sampleOfInterest();
35  if (sample != -1)
36  return data_[sample].fineGrain();
37  else
38  return false;
39 }
42 {
43  int sample = sampleOfInterest();
44  if (sample != -1)
45  return data_[sample].ttFlag();
46  else
47  return -1;
48 }
49 
51 {
52  int sample = sampleOfInterest();
53  if (sample != -1)
54  return data_[sample].l1aSpike();
55  else
56  return -1;
57 }
58 
60 {
61  if (size_ == 1)
62  return false;
63  else if (size_ > 1)
64  return true;
65  return false;
66 }
67 
69  if (size<0) size_=0;
70  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
71  else size_=size;
72 }
73 
74 
75 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi) {
76  s << digi.id() << " " << digi.size() << " samples " << std::endl;
77  for (int i=0; i<digi.size(); i++)
78  s << " " << digi.sample(i) << std::endl;
79  return s;
80 }
81 
int i
Definition: DBlmapReader.cc:9
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
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
size_(0)
Definition: OwnArray.h:181
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.