CMS 3D CMS Logo

EcalEBTriggerPrimitiveSample.h
Go to the documentation of this file.
1 #ifndef ECALEBTRIGGERPRIMITIVESAMPLE_H
2 #define ECALEBTRIGGERPRIMITIVESAMPLE_H 1
3 
4 #include <boost/cstdint.hpp>
5 #include <ostream>
6 
7 
8 
15  public:
19  EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike);
20  EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike, int timing);
21 
23  void setValue(uint16_t data){ theSample = data;}
24  // The sample is a 16 bit word defined as:
25  //
26  // o o o o o o o o o o o o o o o o
27  // |________| |____________________|
28  // ~60ps res spike Et
29  // time info flag
30  //
31 
32 
34  uint16_t raw() const { return theSample; }
35 
37  int encodedEt() const { return theSample&0x3FF; }
38 
39  bool l1aSpike() const { return (theSample&0x400)!=0; }
40 
41  int time() const { return theSample>>11; }
42 
44  uint16_t operator()() { return theSample; }
45 
46  private:
47  uint16_t theSample;
48 
49 };
50 
51 std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveSample& samp);
52 
53 
54 
55 
56 #endif
void setValue(uint16_t data)
Set data.
int encodedEt() const
get the encoded Et (10 bits)
uint16_t raw() const
get the raw word
std::ostream & operator<<(std::ostream &s, const EcalEBTriggerPrimitiveSample &samp)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82