CMS 3D CMS Logo

L1GctHFBitCounts Class Reference

L1 GCT HF ring Et sums. More...

#include <DataFormats/L1GlobalCaloTrigger/interface/L1GctHFBitCounts.h>

List of all members.

Public Member Functions

uint16_t bitCount (unsigned const i) const
 get a bit count index : sum 0 : Ring 1 Positive Rapidity HF bit count 1 : Ring 1 Negative Rapidity HF bit count 2 : Ring 2 Positive Rapidity HF bit count 3 : Ring 2 Negative Rapidity HF bit count
int16_t bx () const
 get BX number
uint16_t capBlock () const
 get GCT unpacker capture block
uint16_t capIndex () const
 get index within GCT unpacker capture block
bool empty () const
 is the sum non-zero
 L1GctHFBitCounts ()
 default constructor (for vector initialisation etc.)
bool operator!= (const L1GctHFBitCounts &c) const
 inequality operator
bool operator== (const L1GctHFBitCounts &c) const
 operators
uint16_t raw () const
 the raw data
void setBitCount (unsigned i, uint16_t c)
 set a sum
void setBx (int16_t bx)
 set bx
void setCapBlock (uint16_t capBlock)
 set cap block
void setCapIndex (uint16_t capIndex)
 set cap index
void setData (uint32_t data)
 set the raw data
 ~L1GctHFBitCounts ()
 destructor

Static Public Member Functions

static L1GctHFBitCounts fromConcHFBitCounts (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 named ctor for unpacker note this expects a 32 bit word that also contains the HF ring Et sums, which are ignored
static L1GctHFBitCounts fromGctEmulator (const int16_t bx, const uint16_t bitCountPosEtaRing1, const uint16_t bitCountNegEtaRing1, const uint16_t bitCountPosEtaRing2, const uint16_t bitCountNegEtaRing2)
 named ctor for GCT emulator
static unsigned nCounts ()

Static Public Attributes

static const unsigned N_SUMS = 4

Private Attributes

int16_t bx_
uint16_t capBlock_
uint16_t capIndex_
uint16_t data_


Detailed Description

L1 GCT HF ring Et sums.

Author:
Jim Brooke
Date:
August 2008
Will store four Et sums of 3 bits each

Definition at line 17 of file L1GctHFBitCounts.h.


Constructor & Destructor Documentation

L1GctHFBitCounts::L1GctHFBitCounts (  ) 

default constructor (for vector initialisation etc.)

set static consts

default constructor (for vector initialisation etc.)

Definition at line 8 of file L1GctHFBitCounts.cc.

00008                                    :
00009   capBlock_(0),
00010   capIndex_(0),
00011   bx_(0),
00012   data_(0) 
00013 { }

L1GctHFBitCounts::~L1GctHFBitCounts (  ) 

destructor

Definition at line 17 of file L1GctHFBitCounts.cc.

00018 { }


Member Function Documentation

uint16_t L1GctHFBitCounts::bitCount ( unsigned const   i  )  const

get a bit count index : sum 0 : Ring 1 Positive Rapidity HF bit count 1 : Ring 1 Negative Rapidity HF bit count 2 : Ring 2 Positive Rapidity HF bit count 3 : Ring 2 Negative Rapidity HF bit count

get a bit count index : sum 0 : Ring 1 Positive Rapidity HF bit count 1 : Ring 1 Negative Rapidity HF bit count 2 : Ring 2 Positive Rapidity HF bit count 3 : Ring 2 Negative Rapidity HF bit count

Definition at line 58 of file L1GctHFBitCounts.cc.

References data_.

Referenced by L1GtHfBitCountsCondition::evaluateCondition(), L1GlobalTriggerPSB::fillPsbBlock(), and operator<<().

00058                                                           {
00059   return (data_>>(i*3)) & 0x7;
00060 }

int16_t L1GctHFBitCounts::bx (  )  const [inline]

get BX number

Definition at line 62 of file L1GctHFBitCounts.h.

References bx_.

00062 { return bx_; }

uint16_t L1GctHFBitCounts::capBlock (  )  const [inline]

get GCT unpacker capture block

Definition at line 56 of file L1GctHFBitCounts.h.

References capBlock_.

00056 { return capBlock_; }

uint16_t L1GctHFBitCounts::capIndex (  )  const [inline]

get index within GCT unpacker capture block

Definition at line 59 of file L1GctHFBitCounts.h.

References capIndex_.

00059 { return capIndex_; }

bool L1GctHFBitCounts::empty (  )  const [inline]

is the sum non-zero

Definition at line 65 of file L1GctHFBitCounts.h.

References data_.

00065 { return (data_ == 0); }

L1GctHFBitCounts L1GctHFBitCounts::fromConcHFBitCounts ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
) [static]

named ctor for unpacker note this expects a 32 bit word that also contains the HF ring Et sums, which are ignored

Definition at line 21 of file L1GctHFBitCounts.cc.

References c, setBx(), setCapBlock(), setCapIndex(), and setData().

Referenced by GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), and GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts().

00025 {
00026   L1GctHFBitCounts c;
00027   c.setCapBlock(capBlock);
00028   c.setCapIndex(capIndex);
00029   c.setBx(bx);
00030   c.setData(data&0xfff);
00031   return c;
00032 }

L1GctHFBitCounts L1GctHFBitCounts::fromGctEmulator ( const int16_t  bx,
const uint16_t  bitCountPosEtaRing1,
const uint16_t  bitCountNegEtaRing1,
const uint16_t  bitCountPosEtaRing2,
const uint16_t  bitCountNegEtaRing2 
) [static]

named ctor for GCT emulator

Definition at line 36 of file L1GctHFBitCounts.cc.

References c, setBitCount(), and setBx().

Referenced by L1GlobalCaloTrigger::getHFBitCountsCollection().

00041 {
00042   L1GctHFBitCounts c;
00043   c.setBx(bx);
00044   c.setBitCount(0, bitCountPosEtaRing1);
00045   c.setBitCount(1, bitCountNegEtaRing1);
00046   c.setBitCount(2, bitCountPosEtaRing2);
00047   c.setBitCount(3, bitCountNegEtaRing2);
00048   return c;  
00049 }

static unsigned L1GctHFBitCounts::nCounts (  )  [inline, static]

Definition at line 53 of file L1GctHFBitCounts.h.

References N_SUMS.

Referenced by L1GlobalTriggerPSB::fillPsbBlock().

00053 { return N_SUMS; }

bool L1GctHFBitCounts::operator!= ( const L1GctHFBitCounts c  )  const [inline]

inequality operator

Definition at line 103 of file L1GctHFBitCounts.h.

00103 { return !(*this == c); }

bool L1GctHFBitCounts::operator== ( const L1GctHFBitCounts c  )  const

operators

equality operator

equality operator

Definition at line 64 of file L1GctHFBitCounts.cc.

References raw().

00064                                                                  {
00065   return (this->raw() == c.raw());
00066 }

uint16_t L1GctHFBitCounts::raw (  )  const [inline]

the raw data

Definition at line 68 of file L1GctHFBitCounts.h.

References data_.

Referenced by operator==().

00068 { return data_; }

void L1GctHFBitCounts::setBitCount ( unsigned  i,
uint16_t  c 
)

set a sum

Definition at line 70 of file L1GctHFBitCounts.cc.

References data_.

Referenced by fromGctEmulator().

00070                                                          {
00071   data_ &= ~(0x7<<(i*3));
00072   data_ |= (c&0x7)<<(i*3);
00073 }

void L1GctHFBitCounts::setBx ( int16_t  bx  )  [inline]

set bx

Definition at line 88 of file L1GctHFBitCounts.h.

References bx_.

Referenced by fromConcHFBitCounts(), and fromGctEmulator().

00088 { bx_ = bx; }

void L1GctHFBitCounts::setCapBlock ( uint16_t  capBlock  )  [inline]

set cap block

Definition at line 82 of file L1GctHFBitCounts.h.

References capBlock_.

Referenced by fromConcHFBitCounts().

00082 { capBlock_ = capBlock; }

void L1GctHFBitCounts::setCapIndex ( uint16_t  capIndex  )  [inline]

set cap index

Definition at line 85 of file L1GctHFBitCounts.h.

References capIndex_.

Referenced by fromConcHFBitCounts().

00085 { capIndex_ = capIndex; }

void L1GctHFBitCounts::setData ( uint32_t  data  )  [inline]

set the raw data

Definition at line 94 of file L1GctHFBitCounts.h.

References data_.

Referenced by fromConcHFBitCounts().

00094 { data_ = data; }


Member Data Documentation

int16_t L1GctHFBitCounts::bx_ [private]

Definition at line 110 of file L1GctHFBitCounts.h.

Referenced by bx(), and setBx().

uint16_t L1GctHFBitCounts::capBlock_ [private]

Definition at line 108 of file L1GctHFBitCounts.h.

Referenced by capBlock(), and setCapBlock().

uint16_t L1GctHFBitCounts::capIndex_ [private]

Definition at line 109 of file L1GctHFBitCounts.h.

Referenced by capIndex(), and setCapIndex().

uint16_t L1GctHFBitCounts::data_ [private]

Definition at line 113 of file L1GctHFBitCounts.h.

Referenced by bitCount(), empty(), raw(), setBitCount(), and setData().

const unsigned L1GctHFBitCounts::N_SUMS = 4 [static]

Definition at line 20 of file L1GctHFBitCounts.h.

Referenced by nCounts().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:29 2009 for CMSSW by  doxygen 1.5.4