CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h

Go to the documentation of this file.
00001 #ifndef ECALTRIGGERPRIMITIVESAMPLE_H
00002 #define ECALTRIGGERPRIMITIVESAMPLE_H 1
00003 
00004 #include <boost/cstdint.hpp>
00005 #include <ostream>
00006 
00007 
00008 
00015 class EcalTriggerPrimitiveSample {
00016  public:
00017   EcalTriggerPrimitiveSample();
00018   EcalTriggerPrimitiveSample(uint16_t data);
00019   EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
00020   EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int triggerFlag);
00021 
00023   void setValue(uint16_t data){ theSample = data;}
00025   uint16_t raw() const { return theSample; }
00027   int compressedEt() const { return theSample&0xFF; }
00029   bool fineGrain() const { return (theSample&0x100)!=0; }
00031   int ttFlag() const { return (theSample>>9)&0x7; }
00032 
00037   int l1aSpike() const { return (theSample >>12) & 0x1; }
00038 
00042   int sFGVB() const { return (theSample >>12) & 0x1; }
00043   
00045   uint16_t operator()() { return theSample; }
00046 
00047  private:
00048   uint16_t theSample;
00049 };
00050 
00051 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp);
00052   
00053 
00054 
00055 
00056 #endif