CMS 3D CMS Logo

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

#include <EcalEBTriggerPrimitiveSample.h>

Public Member Functions

 EcalEBTriggerPrimitiveSample ()
 
 EcalEBTriggerPrimitiveSample (uint16_t data)
 
 EcalEBTriggerPrimitiveSample (int encodedEt)
 
 EcalEBTriggerPrimitiveSample (int encodedEt, bool isASpike)
 
 EcalEBTriggerPrimitiveSample (int encodedEt, bool isASpike, int timing)
 
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 ( )

◆ EcalEBTriggerPrimitiveSample() [2/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( uint16_t  data)

Definition at line 4 of file EcalEBTriggerPrimitiveSample.cc.

4 : theSample(data) {}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ EcalEBTriggerPrimitiveSample() [3/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( int  encodedEt)

Definition at line 14 of file EcalEBTriggerPrimitiveSample.cc.

References encodedEt(), and theSample.

14 { theSample = encodedEt & 0x3FF; }
int encodedEt() const
get the encoded Et (10 bits)

◆ EcalEBTriggerPrimitiveSample() [4/5]

EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample ( int  encodedEt,
bool  isASpike 
)

Definition at line 6 of file EcalEBTriggerPrimitiveSample.cc.

References encodedEt(), and theSample.

6  {
7  theSample = (encodedEt & 0x3FF) | ((isASpike) ? (0x400) : (0));
8 }
int encodedEt() const
get the encoded Et (10 bits)

◆ EcalEBTriggerPrimitiveSample() [5/5]

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

Definition at line 10 of file EcalEBTriggerPrimitiveSample.cc.

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

10  {
11  theSample = (encodedEt & 0x3FF) | ((isASpike) ? (0x400) : (0)) | timing << 11;
12 }
int encodedEt() const
get the encoded Et (10 bits)

Member Function Documentation

◆ encodedEt()

int EcalEBTriggerPrimitiveSample::encodedEt ( ) const
inline

get the encoded Et (10 bits)

Definition at line 34 of file EcalEBTriggerPrimitiveSample.h.

References theSample.

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

34 { return theSample & 0x3FF; }

◆ l1aSpike()

bool EcalEBTriggerPrimitiveSample::l1aSpike ( ) const
inline

Definition at line 36 of file EcalEBTriggerPrimitiveSample.h.

References theSample.

Referenced by operator<<().

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

◆ operator()()

uint16_t EcalEBTriggerPrimitiveSample::operator() ( )
inline

for streaming

Definition at line 41 of file EcalEBTriggerPrimitiveSample.h.

References theSample.

◆ raw()

uint16_t EcalEBTriggerPrimitiveSample::raw ( ) const
inline

get the raw word

Definition at line 31 of file EcalEBTriggerPrimitiveSample.h.

References theSample.

◆ setValue()

void EcalEBTriggerPrimitiveSample::setValue ( uint16_t  data)
inline

Set data.

Definition at line 21 of file EcalEBTriggerPrimitiveSample.h.

References data, and theSample.

21 { theSample = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ time()

int EcalEBTriggerPrimitiveSample::time ( ) const
inline

Definition at line 38 of file EcalEBTriggerPrimitiveSample.h.

References theSample.

Referenced by operator<<().

38 { return theSample >> 11; }

Member Data Documentation

◆ theSample

uint16_t EcalEBTriggerPrimitiveSample::theSample
private