CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalEBTriggerPrimitiveSample Class Reference

#include <EcalEBTriggerPrimitiveSample.h>

Public Member Functions

 EcalEBTriggerPrimitiveSample ()
 
 EcalEBTriggerPrimitiveSample (int encodedEt)
 
 EcalEBTriggerPrimitiveSample (int encodedEt, bool isASpike)
 
 EcalEBTriggerPrimitiveSample (int encodedEt, bool isASpike, int timing)
 
 EcalEBTriggerPrimitiveSample (uint16_t data)
 
int encodedEt () const
 get the encoded Et (10 bits) More...
 
bool l1aSpike () const
 
uint16_t operator() ()
 for streaming More...
 
uint16_t raw () const
 get the raw word More...
 
void setValue (uint16_t data)
 Set data. More...
 
int time () const
 

Private Attributes

uint16_t theSample
 

Detailed Description

Author
N. Marinelli - Univ of Notre Dame

Definition at line 12 of file EcalEBTriggerPrimitiveSample.h.

Constructor & Destructor Documentation

◆ EcalEBTriggerPrimitiveSample() [1/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( )

Definition at line 3 of file EcalEBTriggerPrimitiveSample.cc.

3 : theSample(0) {}

◆ EcalEBTriggerPrimitiveSample() [2/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( uint16_t  data)

Definition at line 4 of file EcalEBTriggerPrimitiveSample.cc.

4 : theSample(data) {}

◆ EcalEBTriggerPrimitiveSample() [3/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( int  encodedEt)

Definition at line 14 of file EcalEBTriggerPrimitiveSample.cc.

14 { theSample = encodedEt & 0x3FF; }

References encodedEt(), and theSample.

◆ EcalEBTriggerPrimitiveSample() [4/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( int  encodedEt,
bool  isASpike 
)

Definition at line 6 of file EcalEBTriggerPrimitiveSample.cc.

6  {
7  theSample = (encodedEt & 0x3FF) | ((isASpike) ? (0x400) : (0));
8 }

References encodedEt(), and theSample.

◆ EcalEBTriggerPrimitiveSample() [5/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( int  encodedEt,
bool  isASpike,
int  timing 
)

Definition at line 10 of file EcalEBTriggerPrimitiveSample.cc.

10  {
11  theSample = (encodedEt & 0x3FF) | ((isASpike) ? (0x400) : (0)) | timing << 11;
12 }

References encodedEt(), theSample, and ecalMatacq_cfi::timing.

Member Function Documentation

◆ encodedEt()

int EcalEBTriggerPrimitiveSample::encodedEt ( ) const
inline

get the encoded Et (10 bits)

Definition at line 34 of file EcalEBTriggerPrimitiveSample.h.

34 { return theSample & 0x3FF; }

References theSample.

Referenced by EcalEBTriggerPrimitiveSample(), and operator<<().

◆ l1aSpike()

bool EcalEBTriggerPrimitiveSample::l1aSpike ( ) const
inline

Definition at line 36 of file EcalEBTriggerPrimitiveSample.h.

36 { return (theSample & 0x400) != 0; }

References theSample.

Referenced by operator<<().

◆ operator()()

uint16_t EcalEBTriggerPrimitiveSample::operator() ( )
inline

for streaming

Definition at line 41 of file EcalEBTriggerPrimitiveSample.h.

41 { return theSample; }

References theSample.

◆ raw()

uint16_t EcalEBTriggerPrimitiveSample::raw ( ) const
inline

get the raw word

Definition at line 31 of file EcalEBTriggerPrimitiveSample.h.

31 { return theSample; }

References theSample.

◆ setValue()

void EcalEBTriggerPrimitiveSample::setValue ( uint16_t  data)
inline

Set data.

Definition at line 21 of file EcalEBTriggerPrimitiveSample.h.

21 { theSample = data; }

References data, and theSample.

◆ time()

int EcalEBTriggerPrimitiveSample::time ( ) const
inline

Definition at line 38 of file EcalEBTriggerPrimitiveSample.h.

38 { return theSample >> 11; }

References theSample.

Referenced by operator<<().

Member Data Documentation

◆ theSample

uint16_t EcalEBTriggerPrimitiveSample::theSample
private
EcalEBTriggerPrimitiveSample::encodedEt
int encodedEt() const
get the encoded Et (10 bits)
Definition: EcalEBTriggerPrimitiveSample.h:34
ecalMatacq_cfi.timing
timing
Definition: ecalMatacq_cfi.py:26
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalEBTriggerPrimitiveSample::theSample
uint16_t theSample
Definition: EcalEBTriggerPrimitiveSample.h:44