CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalTriggerPrimitiveSample.h
Go to the documentation of this file.
1 #ifndef ECALTRIGGERPRIMITIVESAMPLE_H
2 #define ECALTRIGGERPRIMITIVESAMPLE_H 1
3 
4 #include <ostream>
5 #include <cstdint>
6 
13 public:
16  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
17  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int triggerFlag);
18 
20  void setValue(uint16_t data) { theSample = data; }
22  uint16_t raw() const { return theSample; }
24  int compressedEt() const { return theSample & 0xFF; }
26  bool fineGrain() const { return (theSample & 0x100) != 0; }
28  int ttFlag() const { return (theSample >> 9) & 0x7; }
29 
34  int l1aSpike() const { return (theSample >> 12) & 0x1; }
35 
39  int sFGVB() const { return (theSample >> 12) & 0x1; }
40 
42  uint16_t operator()() { return theSample; }
43 
44 private:
45  uint16_t theSample;
46 };
47 
48 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp);
49 
50 #endif
int compressedEt() const
get the encoded/compressed Et (8 bits)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
uint16_t raw() const
get the raw word
uint16_t operator()()
for streaming
bool fineGrain() const
get the fine-grain bit (1 bit)
void setValue(uint16_t data)
Set data.
int ttFlag() const
get the Trigger tower Flag (3 bits)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79