CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalEBTriggerPrimitiveSample.h
Go to the documentation of this file.
1 #ifndef ECALEBTRIGGERPRIMITIVESAMPLE_H
2 #define ECALEBTRIGGERPRIMITIVESAMPLE_H 1
3 
4 #include <ostream>
5 #include <cstdint>
6 
13 public:
17  EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike);
18  EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike, int timing);
19 
21  void setValue(uint16_t data) { theSample = data; }
22  // The sample is a 16 bit word defined as:
23  //
24  // o o o o o o o o o o o o o o o o
25  // |________| |____________________|
26  // ~60ps res spike Et
27  // time info flag
28  //
29 
31  uint16_t raw() const { return theSample; }
32 
34  int encodedEt() const { return theSample & 0x3FF; }
35 
36  bool l1aSpike() const { return (theSample & 0x400) != 0; }
37 
38  int time() const { return theSample >> 11; }
39 
41  uint16_t operator()() { return theSample; }
42 
43 private:
44  uint16_t theSample;
45 };
46 
47 std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveSample& samp);
48 
49 #endif
void setValue(uint16_t data)
Set data.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
int encodedEt() const
get the encoded Et (10 bits)
uint16_t raw() const
get the raw word
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79