CMS 3D CMS Logo

Classes | Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/DataFormats/HcalDigi/interface/HcalTTPDigi.h File Reference

#include <stdint.h>
#include <vector>
#include <ostream>

Go to the source code of this file.

Classes

class  HcalTTPDigi

Functions

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

Function Documentation

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

Definition at line 79 of file HcalTTPDigi.cc.

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

                                                                 {

    out << "HcalTTPDigi " << digi.id() 
        << " with " << digi.size() << " samples, "
        << digi.presamples() << " presamples. "
        << std::endl ;
    out << "Firmware version " << digi.fwVersion() << " and flavor/algo " << digi.algorithm() ; 
    out << "; pipeline length " << digi.pipelineLength() << std::endl ;  
    int relativeSize = digi.size() - digi.presamples() ; 
    for (int i=-digi.presamples(); i<relativeSize; i++) {
        for (unsigned int j=digi.inputPattern(i).size(); j>0; j--) {
            if ( !(j%16) ) out << " " ;
            out << digi.inputPattern(i).at(j-1) ;
        }
        if (i < 0) out << " (PRE)" ; // Indicates presamples 
        out << std::endl ; 
        out << "ALGO: " ; 
        for (int j=19; j>=0; j--) out << bool((digi.algorithmWord(i))&(1<<j)) ;

        out << "  TRIG: " ;
        for (int j=3; j>=0; j--) out << bool((digi.triggerOutput(i))&(1<<j)) ; 
        out << std::endl ; 
    }

    return out ; 
}