CMS 3D CMS Logo

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
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveSample &samp)
bool fineGrain() const
get the fine-grain bit (1 bit)
int ttFlag() const
get the Trigger tower Flag (3 bits)
uint16_t operator()()
for streaming
int compressedEt() const
get the encoded/compressed Et (8 bits)
void setValue(uint16_t data)
Set data.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
uint16_t raw() const
get the raw word