CMS 3D CMS Logo

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

#include <HcalTriggerPrimitiveSample.h>

Public Member Functions

int compressedEt () const
 get the encoded/compressed Et More...
 
bool fineGrain (int i=0) const
 get fine-grain bit (traditional) More...
 
 HcalTriggerPrimitiveSample ()
 
 HcalTriggerPrimitiveSample (int encodedEt, bool finegrain, int slb, int slbchan)
 
 HcalTriggerPrimitiveSample (int encodedEt, int finegrainExtended)
 
 HcalTriggerPrimitiveSample (uint16_t data)
 
uint16_t raw () const
 get the raw word More...
 

Private Attributes

uint16_t theSample
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 11 of file HcalTriggerPrimitiveSample.h.

Constructor & Destructor Documentation

◆ HcalTriggerPrimitiveSample() [1/4]

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( )

Definition at line 3 of file HcalTriggerPrimitiveSample.cc.

3 : theSample(0) {}

◆ HcalTriggerPrimitiveSample() [2/4]

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( uint16_t  data)

Definition at line 4 of file HcalTriggerPrimitiveSample.cc.

4 : theSample(data) {}

◆ HcalTriggerPrimitiveSample() [3/4]

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( int  encodedEt,
bool  finegrain,
int  slb,
int  slbchan 
)

Definition at line 6 of file HcalTriggerPrimitiveSample.cc.

6  {
7  theSample = (((slb)&0x7) << 13) | ((slbchan & 0x3) << 11) | (encodedEt & 0xFF) | ((fineGrain) ? (0x100) : (0));
8 }

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

◆ HcalTriggerPrimitiveSample() [4/4]

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( int  encodedEt,
int  finegrainExtended 
)

Definition at line 10 of file HcalTriggerPrimitiveSample.cc.

10  {
11  theSample = (encodedEt & 0xFF) | ((fineGrainExt & 0x3F) << 8);
12 }

References theSample.

Member Function Documentation

◆ compressedEt()

int HcalTriggerPrimitiveSample::compressedEt ( ) const
inline

get the encoded/compressed Et

Definition at line 21 of file HcalTriggerPrimitiveSample.h.

21 { return theSample & 0xFF; }

References theSample.

Referenced by CaloTPGTranscoderULUT::hcaletValue(), operator<<(), HcalTriggerPrimitiveDigi::SOI_compressedEt(), and CastorTriggerPrimitiveDigi::SOI_compressedEt().

◆ fineGrain()

bool HcalTriggerPrimitiveSample::fineGrain ( int  i = 0) const
inline

get fine-grain bit (traditional)

Definition at line 23 of file HcalTriggerPrimitiveSample.h.

23 { return (((theSample) >> (i + 8)) & 0x1) != 0; }

References mps_fire::i, theSample, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by HcalTriggerPrimitiveSample(), operator<<(), CastorTriggerPrimitiveDigi::SOI_fineGrain(), and HcalTriggerPrimitiveDigi::SOI_fineGrain().

◆ raw()

uint16_t HcalTriggerPrimitiveSample::raw ( ) const
inline

get the raw word

Definition at line 19 of file HcalTriggerPrimitiveSample.h.

19 { return theSample; }

References theSample.

Referenced by operator<<(), HcalPacker::pack(), slb(), slbAndChan(), slbChan(), CastorUnpacker::unpack(), and HcalUnpacker::unpackVME().

Member Data Documentation

◆ theSample

uint16_t HcalTriggerPrimitiveSample::theSample
private
mps_fire.i
i
Definition: mps_fire.py:355
slb
static int slb(const HcalTriggerPrimitiveSample &theSample)
Definition: CastorUnpacker.cc:71
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HcalTriggerPrimitiveSample::theSample
uint16_t theSample
Definition: HcalTriggerPrimitiveSample.h:26
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
HcalTriggerPrimitiveSample::fineGrain
bool fineGrain(int i=0) const
get fine-grain bit (traditional)
Definition: HcalTriggerPrimitiveSample.h:23