CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 
3 HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi() : size_(0), hcalPresamples_(0) {}
5  : id_(id), size_(0), hcalPresamples_(0) {}
6 
8  if (size < 0)
9  size_ = 0;
10  else if (size > MAXSAMPLES)
11  size_ = MAXSAMPLES;
12  else
13  size_ = size;
14 }
16  if (ps < 0)
17  hcalPresamples_ &= 0xFFFFFF0;
18  // else if (ps>=size_) hcalPresamples_=size_-1;
19  else
20  hcalPresamples_ |= ps & 0xF;
21 }
22 
23 void HcalTriggerPrimitiveDigi::setZSInfo(bool unsuppressed, bool markAndPass) {
24  if (markAndPass)
25  hcalPresamples_ |= 0x10;
26  if (unsuppressed)
27  hcalPresamples_ |= 0x20;
28 }
29 
30 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveDigi& digi) {
31  s << digi.id() << " " << digi.size() << " samples " << digi.presamples() << " presamples";
32  if (digi.zsUnsuppressed())
33  s << " zsUS";
34  if (digi.zsMarkAndPass())
35  s << " zsM&P";
36  s << std::endl;
37  for (int i = 0; i < digi.size(); i++)
38  s << " " << digi.sample(i) << std::endl;
39  return s;
40 }
void setZSInfo(bool unsuppressed, bool markAndPass)
bool zsMarkAndPass() const
was ZS MarkAndPass?
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
bool zsUnsuppressed() const
was ZS unsuppressed?
const HcalTriggerPrimitiveSample & sample(int i) const
tuple size
Write out results.
const HcalTrigTowerDetId & id() const