CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalTriggerPrimitiveSample Class Reference

#include <HcalTriggerPrimitiveSample.h>

List of all members.

Public Member Functions

int compressedEt () const
 get the encoded/compressed Et
bool fineGrain () const
 get the fine-grain bit
 HcalTriggerPrimitiveSample ()
 HcalTriggerPrimitiveSample (uint16_t data)
 HcalTriggerPrimitiveSample (int encodedEt, bool finegrain, int slb, int slbchan)
uint16_t raw () const
 get the raw word
int slb () const
 get the slb site number
int slbAndChan () const
 get the id channel
int slbChan () const
 get the slb channel number

Private Attributes

uint16_t theSample

Detailed Description

Date:
2007/12/14 08:50:43
Revision:
1.7
Author:
J. Mans - Minnesota

Definition at line 13 of file HcalTriggerPrimitiveSample.h.


Constructor & Destructor Documentation

HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( )

Definition at line 4 of file HcalTriggerPrimitiveSample.cc.

: theSample(0) { }
HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( uint16_t  data)

Definition at line 5 of file HcalTriggerPrimitiveSample.cc.

: theSample(data) { }
HcalTriggerPrimitiveSample::HcalTriggerPrimitiveSample ( int  encodedEt,
bool  finegrain,
int  slb,
int  slbchan 
)

Definition at line 7 of file HcalTriggerPrimitiveSample.cc.

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

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

Member Function Documentation

int HcalTriggerPrimitiveSample::compressedEt ( ) const [inline]
bool HcalTriggerPrimitiveSample::fineGrain ( ) const [inline]

get the fine-grain bit

Definition at line 24 of file HcalTriggerPrimitiveSample.h.

References theSample.

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

{ return (theSample&0x100)!=0; }
uint16_t HcalTriggerPrimitiveSample::raw ( ) const [inline]

get the raw word

Definition at line 20 of file HcalTriggerPrimitiveSample.h.

References theSample.

Referenced by isTPGSOI(), operator<<(), HcalPacker::pack(), CastorUnpacker::unpack(), and HcalUnpacker::unpack().

{ return theSample; }
int HcalTriggerPrimitiveSample::slb ( ) const [inline]

get the slb site number

Definition at line 26 of file HcalTriggerPrimitiveSample.h.

References theSample.

Referenced by HcalTriggerPrimitiveSample(), CastorUnpacker::unpack(), and HcalUnpacker::unpack().

{ return ((theSample>>13)&0x7); }
int HcalTriggerPrimitiveSample::slbAndChan ( ) const [inline]

get the id channel

Definition at line 30 of file HcalTriggerPrimitiveSample.h.

References theSample.

Referenced by CastorUnpacker::unpack(), and HcalUnpacker::unpack().

{ return (theSample>>11)&0x1F; }
int HcalTriggerPrimitiveSample::slbChan ( ) const [inline]

get the slb channel number

Definition at line 28 of file HcalTriggerPrimitiveSample.h.

References theSample.

Referenced by CastorUnpacker::unpack(), and HcalUnpacker::unpack().

{ return (theSample>>11)&0x3; }

Member Data Documentation