CMS 3D CMS Logo

HcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 
3 
4 HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi() : size_(0), hcalPresamples_(0) {
5 }
7  size_(0), hcalPresamples_(0) {
8 }
9 
11  if (size<0) size_=0;
12  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
13  else size_=size;
14 }
16  if (ps<0) hcalPresamples_&=0xFFFFFF0;
17  // else if (ps>=size_) hcalPresamples_=size_-1;
18  else hcalPresamples_|=ps&0xF;
19 }
20 
21 void HcalTriggerPrimitiveDigi::setZSInfo(bool unsuppressed, bool markAndPass) {
22  if (markAndPass) hcalPresamples_|=0x10;
23  if (unsuppressed) hcalPresamples_|=0x20;
24 }
25 
26 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveDigi& digi) {
27  s << digi.id() << " " << digi.size() << " samples "<< digi.presamples() << " presamples";
28  if (digi.zsUnsuppressed()) s << " zsUS";
29  if (digi.zsMarkAndPass()) s << " zsM&P";
30  s << std::endl;
31  for (int i=0; i<digi.size(); i++)
32  s << " " << digi.sample(i) << std::endl;
33  return s;
34 }
35 
36 
int i
Definition: DBlmapReader.cc:9
std::ostream & operator<<(std::ostream &s, const HcalTriggerPrimitiveDigi &digi)
void setZSInfo(bool unsuppressed, bool markAndPass)
bool zsMarkAndPass() const
was ZS MarkAndPass?
bool zsUnsuppressed() const
was ZS unsuppressed?
const HcalTriggerPrimitiveSample & sample(int i) const
const HcalTrigTowerDetId & id() const