test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
HcalTTPDigi.cc File Reference
#include "DataFormats/HcalDigi/interface/HcalTTPDigi.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const HcalTTPDigi &digi)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const HcalTTPDigi digi 
)

Definition at line 79 of file HcalTTPDigi.cc.

References HcalTTPDigi::algorithm(), HcalTTPDigi::algorithmWord(), HcalTTPDigi::fwVersion(), i, HcalTTPDigi::id(), HcalTTPDigi::inputPattern(), j, GenerateHcalLaserBadRunList::out, HcalTTPDigi::pipelineLength(), HcalTTPDigi::presamples(), HcalTTPDigi::size(), and HcalTTPDigi::triggerOutput().

79  {
80 
81  out << "HcalTTPDigi " << digi.id()
82  << " with " << digi.size() << " samples, "
83  << digi.presamples() << " presamples. "
84  << std::endl ;
85  out << "Firmware version " << digi.fwVersion() << " and flavor/algo " << digi.algorithm() ;
86  out << "; pipeline length " << digi.pipelineLength() << std::endl ;
87  int relativeSize = digi.size() - digi.presamples() ;
88  for (int i=-digi.presamples(); i<relativeSize; i++) {
89  for (unsigned int j=digi.inputPattern(i).size(); j>0; j--) {
90  if ( !(j%16) ) out << " " ;
91  out << digi.inputPattern(i).at(j-1) ;
92  }
93  if (i < 0) out << " (PRE)" ; // Indicates presamples
94  out << std::endl ;
95  out << "ALGO: " ;
96  for (int j=19; j>=0; j--) out << bool((digi.algorithmWord(i))&(1<<j)) ;
97 
98  out << " TRIG: " ;
99  for (int j=3; j>=0; j--) out << bool((digi.triggerOutput(i))&(1<<j)) ;
100  out << std::endl ;
101  }
102 
103  return out ;
104 }
int i
Definition: DBlmapReader.cc:9
int size() const
Definition: HcalTTPDigi.h:32
unsigned int pipelineLength() const
Definition: HcalTTPDigi.h:36
uint32_t algorithmWord(int relativeSample=0) const
Definition: HcalTTPDigi.cc:61
int presamples() const
Definition: HcalTTPDigi.h:33
uint8_t triggerOutput(int relativeSample=0) const
Definition: HcalTTPDigi.cc:55
int j
Definition: DBlmapReader.cc:9
unsigned int fwVersion() const
Definition: HcalTTPDigi.h:35
std::vector< bool > inputPattern(int relativeSample=0) const
Definition: HcalTTPDigi.cc:42
int algorithm() const
Definition: HcalTTPDigi.h:34
int id() const
Definition: HcalTTPDigi.h:31