Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:49:42

0001 #include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h"
0002 
0003 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample() : theSample(0) {}
0004 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(uint16_t data) : theSample(data) {}
0005 
0006 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(int encodedEt, bool fineGrain, int ttFlag) {
0007   theSample = ((ttFlag & 0x7) << 9) | (encodedEt & 0xFF) | ((fineGrain) ? (0x100) : (0));
0008 }
0009 
0010 EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int ttFlag) {
0011   theSample = ((ttFlag & 0x7) << 9) | (encodedEt & 0xFF) | ((finegrain) ? (0x100) : (0)) | ((stripFGVB & 0x1) << 12);
0012 }
0013 
0014 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp) {
0015   return s << "ET=" << samp.compressedEt() << ", FG=" << samp.fineGrain() << ", sFGVB=" << samp.sFGVB()
0016            << ", TTF=" << samp.ttFlag();
0017 }