CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/EcalDigi/src/EcalTriggerPrimitiveSample.cc

Go to the documentation of this file.
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 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int ttFlag)
00014 {
00015    theSample=((ttFlag&0x7)<<9)|(encodedEt&0xFF)|
00016     ((finegrain)?(0x100):(0))|((stripFGVB&0x1)<<12);
00017 }
00018 
00019 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp) {
00020   return s << "ET=" << samp.compressedEt() << ", FG=" << samp.fineGrain()
00021      << ", sFGVB=" << samp.sFGVB() << ", TTF=" << samp.ttFlag();
00022 }
00023 
00024