CMS 3D CMS Logo

L1GctInternHFData Class Reference

L1 GCT internal ring sums and/or bit counts. More...

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

List of all members.

Public Types

enum  L1GctInternHFDataType { null, conc_hf_ring_et_sums, conc_hf_bit_counts }
 et sum type - not clear this is required More...

Public Member Functions

int16_t bx () const
 get BX number
uint16_t capBlock () const
 get capture block
uint16_t capIndex () const
 get index within capture block
uint16_t count (unsigned const i)
 get the counts
bool empty () const
 is the sum non-zero
uint16_t et (unsigned const i)
 get the et sums
bool isRingSums () const
 get the actual data
 L1GctInternHFData ()
 default constructor (for vector initialisation etc.)
bool operator!= (const L1GctInternHFData &c) const
 inequality operator
bool operator== (const L1GctInternHFData &c) const
 operators
uint32_t raw () const
 get the raw data
void setBx (int16_t const bx)
 set bx
void setCapBlock (uint16_t const capBlock)
 set cap block
void setCapIndex (uint16_t const capIndex)
 set cap index
void setCount (unsigned const i, uint16_t const count)
 set the count
void setData (uint32_t const data)
void setEt (unsigned const i, uint16_t const et)
 set the sum
void setType (L1GctInternHFDataType type)
 set type
void setValue (unsigned const i, uint16_t const val)
 set value
L1GctInternHFData::L1GctInternHFDataType type () const
 metadata
uint16_t value (unsigned const i)
 get value
 ~L1GctInternHFData ()
 destructor

Static Public Member Functions

static L1GctInternHFData fromConcBitCounts (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
static L1GctInternHFData fromConcRingSums (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)

Private Attributes

int16_t bx_
uint16_t capBlock_
uint16_t capIndex_
uint32_t data_
L1GctInternHFDataType type_


Detailed Description

L1 GCT internal ring sums and/or bit counts.

Author:
Jim Brooke
Date:
June 2008
Will store 4 sums/counts of up to 8 bits each

Definition at line 17 of file L1GctInternHFData.h.


Member Enumeration Documentation

enum L1GctInternHFData::L1GctInternHFDataType

et sum type - not clear this is required

Enumerator:
null 
conc_hf_ring_et_sums 
conc_hf_bit_counts 

Definition at line 22 of file L1GctInternHFData.h.

00022                              { null,
00023                                conc_hf_ring_et_sums,
00024                                conc_hf_bit_counts
00025   };


Constructor & Destructor Documentation

L1GctInternHFData::L1GctInternHFData (  ) 

default constructor (for vector initialisation etc.)

Definition at line 4 of file L1GctInternHFData.cc.

00004                                      :
00005   type_(null),
00006   capBlock_(0),
00007   capIndex_(0),
00008   bx_(0),
00009   data_(0)
00010 { } 

L1GctInternHFData::~L1GctInternHFData (  ) 

destructor

Definition at line 13 of file L1GctInternHFData.cc.

00013 { }


Member Function Documentation

int16_t L1GctInternHFData::bx (  )  const [inline]

get BX number

Definition at line 55 of file L1GctInternHFData.h.

References bx_.

00055 { return bx_; }

uint16_t L1GctInternHFData::capBlock (  )  const [inline]

get capture block

Definition at line 49 of file L1GctInternHFData.h.

References capBlock_.

00049 { return capBlock_; }

uint16_t L1GctInternHFData::capIndex (  )  const [inline]

get index within capture block

Definition at line 52 of file L1GctInternHFData.h.

References capIndex_.

00052 { return capIndex_; }

uint16_t L1GctInternHFData::count ( unsigned const   i  ) 

get the counts

Definition at line 55 of file L1GctInternHFData.cc.

References value().

00055                                                   {
00056   return value(i);
00057 } 

bool L1GctInternHFData::empty (  )  const [inline]

is the sum non-zero

Definition at line 58 of file L1GctInternHFData.h.

References data_.

00058 { return (data_ == 0); }

uint16_t L1GctInternHFData::et ( unsigned const   i  ) 

get the et sums

Definition at line 50 of file L1GctInternHFData.cc.

References value().

00050                                                {
00051   return value(i);
00052 }

L1GctInternHFData L1GctInternHFData::fromConcBitCounts ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
) [static]

Definition at line 28 of file L1GctInternHFData.cc.

References conc_hf_bit_counts, d, i, setBx(), setCapBlock(), setCapIndex(), setCount(), and setType().

00031                                                                             {
00032   L1GctInternHFData d;
00033   d.setType(conc_hf_bit_counts);
00034   d.setCapIndex(capIndex);
00035   d.setCapBlock(capBlock);
00036   d.setBx(bx);
00037   for (unsigned i=0; i<4; ++i) {
00038     d.setCount(i, (data>>(6*i))&0x3f);
00039   }
00040   return d;
00041 }

L1GctInternHFData L1GctInternHFData::fromConcRingSums ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
) [static]

Definition at line 15 of file L1GctInternHFData.cc.

References conc_hf_ring_et_sums, d, setBx(), setCapBlock(), setCapIndex(), setData(), and setType().

00018                                                                            {
00019   L1GctInternHFData d;
00020   d.setType(conc_hf_ring_et_sums);
00021   d.setCapIndex(capIndex);
00022   d.setCapBlock(capBlock);
00023   d.setBx(bx);
00024   d.setData(data);
00025   return d;
00026 }

bool L1GctInternHFData::isRingSums (  )  const [inline]

get the actual data

is this ring sums or bit counts?

Definition at line 64 of file L1GctInternHFData.h.

References conc_hf_ring_et_sums, and type_.

00064 { return (type_ == conc_hf_ring_et_sums); }

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

inequality operator

Definition at line 111 of file L1GctInternHFData.h.

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

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

operators

equality operator

equality operator

Definition at line 61 of file L1GctInternHFData.cc.

References raw().

00061                                                                    {
00062   return ( this->raw() == c.raw() );
00063 }

uint32_t L1GctInternHFData::raw (  )  const [inline]

get the raw data

Definition at line 67 of file L1GctInternHFData.h.

References data_.

Referenced by operator==().

00067 { return data_; }

void L1GctInternHFData::setBx ( int16_t const   bx  )  [inline]

set bx

Definition at line 88 of file L1GctInternHFData.h.

References bx_.

Referenced by fromConcBitCounts(), and fromConcRingSums().

00088 { bx_ = bx; }

void L1GctInternHFData::setCapBlock ( uint16_t const   capBlock  )  [inline]

set cap block

Definition at line 82 of file L1GctInternHFData.h.

References capBlock_.

Referenced by fromConcBitCounts(), and fromConcRingSums().

00082 { capBlock_ = capBlock; }

void L1GctInternHFData::setCapIndex ( uint16_t const   capIndex  )  [inline]

set cap index

Definition at line 85 of file L1GctInternHFData.h.

References capIndex_.

Referenced by fromConcBitCounts(), and fromConcRingSums().

00085 { capIndex_ = capIndex; }

void L1GctInternHFData::setCount ( unsigned const   i,
uint16_t const   count 
)

set the count

Definition at line 78 of file L1GctInternHFData.cc.

References setValue().

Referenced by fromConcBitCounts().

00078                                                            {
00079   setValue(i, count);
00080 }

void L1GctInternHFData::setData ( uint32_t const   data  )  [inline]

Definition at line 102 of file L1GctInternHFData.h.

References data_.

Referenced by fromConcRingSums().

00102 { data_ = data; }

void L1GctInternHFData::setEt ( unsigned const   i,
uint16_t const   et 
)

set the sum

Definition at line 73 of file L1GctInternHFData.cc.

References setValue().

00073                                                      {
00074   setValue(i, et);
00075 }

void L1GctInternHFData::setType ( L1GctInternHFDataType  type  )  [inline]

set type

Definition at line 91 of file L1GctInternHFData.h.

References type_.

Referenced by fromConcBitCounts(), and fromConcRingSums().

00091 { type_ = type; }

void L1GctInternHFData::setValue ( unsigned const   i,
uint16_t const   val 
)

set value

Definition at line 67 of file L1GctInternHFData.cc.

References data_.

Referenced by setCount(), and setEt().

00067                                                          {
00068   data_ &= ~(0xff<<(i*8));
00069   data_ |= (val&0xff)<<(i*8);
00070 }

L1GctInternHFData::L1GctInternHFDataType L1GctInternHFData::type (  )  const [inline]

metadata

'type' of object - not required?

Definition at line 46 of file L1GctInternHFData.h.

References type_.

00046 { return type_; }

uint16_t L1GctInternHFData::value ( unsigned const   i  ) 

get value

Definition at line 45 of file L1GctInternHFData.cc.

References data_.

Referenced by count(), and et().

00045                                                   {
00046   return (data_>>(i*8)) & 0xff;
00047 }


Member Data Documentation

int16_t L1GctInternHFData::bx_ [private]

Definition at line 122 of file L1GctInternHFData.h.

Referenced by bx(), and setBx().

uint16_t L1GctInternHFData::capBlock_ [private]

Definition at line 120 of file L1GctInternHFData.h.

Referenced by capBlock(), and setCapBlock().

uint16_t L1GctInternHFData::capIndex_ [private]

Definition at line 121 of file L1GctInternHFData.h.

Referenced by capIndex(), and setCapIndex().

uint32_t L1GctInternHFData::data_ [private]

Definition at line 125 of file L1GctInternHFData.h.

Referenced by empty(), raw(), setData(), setValue(), and value().

L1GctInternHFDataType L1GctInternHFData::type_ [private]

Definition at line 117 of file L1GctInternHFData.h.

Referenced by isRingSums(), setType(), and type().


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