CMS 3D CMS Logo

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 }
EcalTriggerPrimitiveDigi::size
int size() const
Definition: EcalTriggerPrimitiveDigi.h:30
mps_fire.i
i
Definition: mps_fire.py:428
EcalTriggerPrimitiveDigi::sFGVB
int sFGVB() const
Definition: EcalTriggerPrimitiveDigi.cc:44
EcalTriggerPrimitiveDigi::data_
std::vector< EcalTriggerPrimitiveSample > data_
Definition: EcalTriggerPrimitiveDigi.h:70
EcalTriggerPrimitiveDigi::sampleOfInterest
int sampleOfInterest() const
Gets the interesting sample.
Definition: EcalTriggerPrimitiveDigi.cc:9
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalTriggerPrimitiveDigi::ttFlag
int ttFlag() const
get the Trigger tower Flag of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:36
EcalTriggerPrimitiveDigi.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalTriggerPrimitiveDigi::EcalTriggerPrimitiveDigi
EcalTriggerPrimitiveDigi()
Definition: EcalTriggerPrimitiveDigi.cc:4
operator<<
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveDigi &digi)
Definition: EcalTriggerPrimitiveDigi.cc:69
EcalTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: EcalTriggerPrimitiveDigi.h:39
EcalTriggerPrimitiveDigi::sample
const EcalTriggerPrimitiveSample & sample(int i) const
Definition: EcalTriggerPrimitiveDigi.h:33
EcalTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition: EcalTriggerPrimitiveDigi.cc:60
EcalTriggerPrimitiveDigi::id
const EcalTrigTowerDetId & id() const
Definition: EcalTriggerPrimitiveDigi.h:29
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
EcalTriggerPrimitiveDigi
Definition: EcalTriggerPrimitiveDigi.h:16
EcalTriggerPrimitiveDigi::isDebug
bool isDebug() const
True if debug mode (# of samples > 1)
Definition: EcalTriggerPrimitiveDigi.cc:52
EcalTriggerPrimitiveDigi::compressedEt
int compressedEt() const
get the encoded/compressed Et of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:19
EcalTriggerPrimitiveDigi::fineGrain
bool fineGrain() const
get the fine-grain bit of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:28
EcalTriggerPrimitiveDigi::size_
int size_
Definition: EcalTriggerPrimitiveDigi.h:69
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443