Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:37

0001 #include "DataFormats/HcalDigi/interface/QIE11DataFrame.h"
0002 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
0003 
0004 std::ostream& operator<<(std::ostream& s, const QIE11DataFrame& digi) {
0005   if (digi.detid().det() == DetId::Hcal) {
0006     s << "DetID=" << HcalGenericDetId(digi.detid()) << " flavor=" << digi.flavor();
0007   } else {
0008     s << "DetId(" << digi.detid().rawId() << ")";
0009   }
0010   s << " " << digi.samples() << " samples";
0011   if (digi.linkError())
0012     s << " LinkError ";
0013   if (digi.capidError())
0014     s << " CapIdError ";
0015   if (digi.zsMarkAndPass())
0016     s << " M&P ";
0017   s << std::endl;
0018   for (int i = 0; i < digi.samples(); i++) {
0019     QIE11DataFrame::Sample sam = digi[i];
0020     s << "  ADC=" << sam.adc() << " TDC=" << sam.tdc() << " CAPID=" << sam.capid();
0021     if (sam.soi())
0022       s << " SOI ";
0023     s << std::endl;
0024   }
0025   return s;
0026 }