CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorTriggerPrimitiveDigi.cc
Go to the documentation of this file.
2 
3 
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 CastorTriggerPrimitiveDigi::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 CastorTriggerPrimitiveDigi& 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  s << " SOI tpchannel="<< digi.SOI_tpchannel() <<" tpdata 0x" << std::hex << digi.SOI_tpdata() << std::dec << std::endl;
32  for (int i=0; i<digi.size(); i++) {
33  s << " 0x" << std::hex << digi.sample(i).raw() << " tpdata 0x" << digi.tpdata(i) << std::dec << " channel=" << digi.tpchannel(i) ;
34  if ( digi.isSOI(i) ) s << " SOI" ;
35  s << std::endl;
36  }
37  return s;
38 }
int i
Definition: DBlmapReader.cc:9
bool zsUnsuppressed() const
was ZS unsuppressed?
const HcalCastorDetId & id() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool zsMarkAndPass() const
was ZS MarkAndPass?
uint16_t raw() const
get the raw word
void setZSInfo(bool unsuppressed, bool markAndPass)
const HcalTriggerPrimitiveSample & sample(int i) const
size_(0)
Definition: OwnArray.h:181
tuple size
Write out results.