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
EcalTriggerPrimitiveSample::ttFlag
int ttFlag() const
get the Trigger tower Flag (3 bits)
Definition: EcalTriggerPrimitiveSample.h:28
EcalTriggerPrimitiveSample::fineGrain
bool fineGrain() const
get the fine-grain bit (1 bit)
Definition: EcalTriggerPrimitiveSample.h:26
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalTriggerPrimitiveSample::sFGVB
int sFGVB() const
Definition: EcalTriggerPrimitiveSample.h:39
EcalTriggerPrimitiveSample::setValue
void setValue(uint16_t data)
Set data.
Definition: EcalTriggerPrimitiveSample.h:20
EcalTriggerPrimitiveSample::theSample
uint16_t theSample
Definition: EcalTriggerPrimitiveSample.h:45
operator<<
std::ostream & operator<<(std::ostream &s, const EcalTriggerPrimitiveSample &samp)
Definition: EcalTriggerPrimitiveSample.cc:14
EcalTriggerPrimitiveSample::compressedEt
int compressedEt() const
get the encoded/compressed Et (8 bits)
Definition: EcalTriggerPrimitiveSample.h:24
EcalTriggerPrimitiveSample::raw
uint16_t raw() const
get the raw word
Definition: EcalTriggerPrimitiveSample.h:22
EcalTriggerPrimitiveSample::operator()
uint16_t operator()()
for streaming
Definition: EcalTriggerPrimitiveSample.h:42
EcalTriggerPrimitiveSample::l1aSpike
int l1aSpike() const
Definition: EcalTriggerPrimitiveSample.h:34
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample
EcalTriggerPrimitiveSample()
Definition: EcalTriggerPrimitiveSample.cc:3