CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/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