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 
16  public:
19  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
20  EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int stripFGVB, int triggerFlag);
21 
23  void setValue(uint16_t data){ theSample = data;}
25  uint16_t raw() const { return theSample; }
27  int compressedEt() const { return theSample&0xFF; }
29  bool fineGrain() const { return (theSample&0x100)!=0; }
31  int ttFlag() const { return (theSample>>9)&0x7; }
32 
37  int l1aSpike() const { return (theSample >>12) & 0x1; }
38 
42  int sFGVB() const { return (theSample >>12) & 0x1; }
43 
45  uint16_t operator()() { return theSample; }
46 
47  private:
48  uint16_t theSample;
49 };
50 
51 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveSample& samp);
52 
53 
54 
55 
56 #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