test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTriggerPrimitiveSample.h
Go to the documentation of this file.
1 #ifndef ECALTRIGGERPRIMITIVESAMPLE_H
2 #define ECALTRIGGERPRIMITIVESAMPLE_H 1
3 
4 #include <boost/cstdint.hpp>
5 #include <ostream>
6 
7 
8 
15  public:
18  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
19  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int triggerFlag);
20 
22  void setValue(uint16_t data){ theSample = data;}
24  uint16_t raw() const { return theSample; }
26  int compressedEt() const { return theSample&0xFF; }
28  bool fineGrain() const { return (theSample&0x100)!=0; }
30  int ttFlag() const { return (theSample>>9)&0x7; }
31 
36  int l1aSpike() const { return (theSample >>12) & 0x1; }
37 
41  int sFGVB() const { return (theSample >>12) & 0x1; }
42 
44  uint16_t operator()() { return theSample; }
45 
46  private:
47  uint16_t theSample;
48 };
49 
50 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp);
51 
52 
53 
54 
55 #endif
int compressedEt() const
get the encoded/compressed Et (8 bits)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
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:82