00001 #include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h" 00002 00003 00004 00005 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample() : theSample(0) { } 00006 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(uint16_t data) : theSample(data) { } 00007 00008 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(int encodedEt, bool fineGrain, int ttFlag) { 00009 theSample=((ttFlag&0x7)<<9)|(encodedEt&0xFF)| 00010 ((fineGrain)?(0x100):(0)); 00011 } 00012 00013 00014 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp) { 00015 return s << "ET=" << samp.compressedEt() << ", FG=" << samp.fineGrain() << ", TTF=" << samp.ttFlag(); 00016 } 00017 00018