CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/HcalDigi/src/HcalTriggerPrimitiveSample.cc

Go to the documentation of this file.
00001 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveSample.h"
00002 
00003 
00004 HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample() : theSample(0) { }
00005 HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample(uint16_t data) : theSample(data) { }
00006 
00007 HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample(int encodedEt, bool fineGrain, int slb, int slbchan) { 
00008   theSample=(((slb)&0x7)<<13)|((slbchan&0x3)<<11)|(encodedEt&0xFF)|
00009     ((fineGrain)?(0x100):(0));
00010 }
00011 
00012 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveSample& samp) {
00013   return s << "Value=" << samp.compressedEt() << ", FG=" << samp.fineGrain();
00014 }
00015 
00016