CMS 3D CMS Logo

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

#include <EcalTriggerPrimitiveSample.h>

Public Member Functions

int compressedEt () const
 get the encoded/compressed Et (8 bits) More...
 
 EcalTriggerPrimitiveSample ()
 
 EcalTriggerPrimitiveSample (int encodedEt, bool finegrain, int stripFGVB, int triggerFlag)
 
 EcalTriggerPrimitiveSample (int encodedEt, bool finegrain, int triggerFlag)
 
 EcalTriggerPrimitiveSample (uint16_t data)
 
bool fineGrain () const
 get the fine-grain bit (1 bit) More...
 
int 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 sFGVB () const
 
int ttFlag () const
 get the Trigger tower Flag (3 bits) More...
 

Private Attributes

uint16_t theSample
 

Detailed Description

Definition at line 12 of file EcalTriggerPrimitiveSample.h.

Constructor & Destructor Documentation

◆ EcalTriggerPrimitiveSample() [1/4]

EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample ( )

Definition at line 3 of file EcalTriggerPrimitiveSample.cc.

3 : theSample(0) {}

◆ EcalTriggerPrimitiveSample() [2/4]

EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample ( uint16_t  data)

Definition at line 4 of file EcalTriggerPrimitiveSample.cc.

4 : theSample(data) {}

◆ EcalTriggerPrimitiveSample() [3/4]

EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample ( int  encodedEt,
bool  finegrain,
int  triggerFlag 
)

Definition at line 6 of file EcalTriggerPrimitiveSample.cc.

6  {
7  theSample = ((ttFlag & 0x7) << 9) | (encodedEt & 0xFF) | ((fineGrain) ? (0x100) : (0));
8 }

References fineGrain(), theSample, and ttFlag().

◆ EcalTriggerPrimitiveSample() [4/4]

EcalTriggerPrimitiveSample::EcalTriggerPrimitiveSample ( int  encodedEt,
bool  finegrain,
int  stripFGVB,
int  triggerFlag 
)

Definition at line 10 of file EcalTriggerPrimitiveSample.cc.

10  {
11  theSample = ((ttFlag & 0x7) << 9) | (encodedEt & 0xFF) | ((finegrain) ? (0x100) : (0)) | ((stripFGVB & 0x1) << 12);
12 }

References theSample, ttFlag(), and testProducerWithPsetDescEmpty_cfi::x1.

Member Function Documentation

◆ compressedEt()

int EcalTriggerPrimitiveSample::compressedEt ( ) const
inline

get the encoded/compressed Et (8 bits)

Definition at line 24 of file EcalTriggerPrimitiveSample.h.

24 { return theSample & 0xFF; }

References theSample.

Referenced by operator<<().

◆ fineGrain()

bool EcalTriggerPrimitiveSample::fineGrain ( ) const
inline

get the fine-grain bit (1 bit)

Definition at line 26 of file EcalTriggerPrimitiveSample.h.

26 { return (theSample & 0x100) != 0; }

References theSample.

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

◆ l1aSpike()

int EcalTriggerPrimitiveSample::l1aSpike ( ) const
inline

Gets the L1A spike detection flag. Beware the flag is inverted. Deprecated, use instead sFGVB() method, whose name is less missleading

Returns
0 spike like pattern 1 EM shower like pattern

Definition at line 34 of file EcalTriggerPrimitiveSample.h.

34 { return (theSample >> 12) & 0x1; }

References theSample.

◆ operator()()

uint16_t EcalTriggerPrimitiveSample::operator() ( )
inline

for streaming

Definition at line 42 of file EcalTriggerPrimitiveSample.h.

42 { return theSample; }

References theSample.

◆ raw()

uint16_t EcalTriggerPrimitiveSample::raw ( ) const
inline

get the raw word

Definition at line 22 of file EcalTriggerPrimitiveSample.h.

22 { return theSample; }

References theSample.

◆ setValue()

void EcalTriggerPrimitiveSample::setValue ( uint16_t  data)
inline

Set data.

Definition at line 20 of file EcalTriggerPrimitiveSample.h.

20 { theSample = data; }

References data, and theSample.

◆ sFGVB()

int EcalTriggerPrimitiveSample::sFGVB ( ) const
inline

Gets the "strip fine grain veto bit" (sFGVB) used as L1A spike detection

Returns
0 spike like pattern 1 EM shower like pattern

Definition at line 39 of file EcalTriggerPrimitiveSample.h.

39 { return (theSample >> 12) & 0x1; }

References theSample.

Referenced by operator<<().

◆ ttFlag()

int EcalTriggerPrimitiveSample::ttFlag ( ) const
inline

get the Trigger tower Flag (3 bits)

Definition at line 28 of file EcalTriggerPrimitiveSample.h.

28 { return (theSample >> 9) & 0x7; }

References theSample.

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

Member Data Documentation

◆ theSample

uint16_t EcalTriggerPrimitiveSample::theSample
private
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
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
EcalTriggerPrimitiveSample::theSample
uint16_t theSample
Definition: EcalTriggerPrimitiveSample.h:45
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79