CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

L1GctEtTotal Class Reference

Persistable copy of total Et measured at Level-1. More...

#include <L1GctEtTotal.h>

List of all members.

Public Types

enum  numberOfBits { kEtTotalNBits = 12, kEtTotalOFlowBit = 1 << kEtTotalNBits, kEtTotalMaxValue = kEtTotalOFlowBit - 1, kRawCtorMask = kEtTotalOFlowBit | kEtTotalMaxValue }

Public Member Functions

int16_t bx () const
 get bunch-crossing index
bool empty () const
 empty method (= false; total Et is always calculated)
unsigned et () const
 get the Et
 L1GctEtTotal (uint16_t rawData)
 L1GctEtTotal (unsigned et, bool oflow)
 L1GctEtTotal ()
 L1GctEtTotal (unsigned et, bool oflow, int16_t bx)
 L1GctEtTotal (uint16_t rawData, int16_t bx)
std::string name () const
 name method
int operator!= (const L1GctEtTotal &e) const
 inequality operator
int operator== (const L1GctEtTotal &e) const
 equality operator
bool overFlow () const
 get the overflow
uint16_t raw () const
 get the data
virtual ~L1GctEtTotal ()

Private Attributes

int16_t m_bx
uint16_t m_data

Detailed Description

Persistable copy of total Et measured at Level-1.

Definition at line 18 of file L1GctEtTotal.h.


Member Enumeration Documentation

Enumerator:
kEtTotalNBits 
kEtTotalOFlowBit 
kEtTotalMaxValue 
kRawCtorMask 

Definition at line 21 of file L1GctEtTotal.h.


Constructor & Destructor Documentation

L1GctEtTotal::L1GctEtTotal ( )

Definition at line 4 of file L1GctEtTotal.cc.

: m_data(0), m_bx(0) { }
L1GctEtTotal::L1GctEtTotal ( uint16_t  rawData)

Definition at line 6 of file L1GctEtTotal.cc.

: m_data(rawData & kRawCtorMask), m_bx(0) { }
L1GctEtTotal::L1GctEtTotal ( uint16_t  rawData,
int16_t  bx 
)

Definition at line 8 of file L1GctEtTotal.cc.

: m_data(rawData & kRawCtorMask), m_bx(bx) { }
L1GctEtTotal::L1GctEtTotal ( unsigned  et,
bool  oflow 
)

Definition at line 10 of file L1GctEtTotal.cc.

References kEtTotalMaxValue, kEtTotalOFlowBit, and m_data.

                                                  : m_data(0),
                                                      m_bx(0)
{
  m_data = (et & kEtTotalMaxValue) | ((oflow || et>kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
}
L1GctEtTotal::L1GctEtTotal ( unsigned  et,
bool  oflow,
int16_t  bx 
)

Definition at line 16 of file L1GctEtTotal.cc.

References kEtTotalMaxValue, kEtTotalOFlowBit, and m_data.

                                                              : m_data(0),
                                                                  m_bx(bx)
{
  m_data = (et & kEtTotalMaxValue) | ((oflow || et>kEtTotalMaxValue) ? kEtTotalOFlowBit : 0);
}
L1GctEtTotal::~L1GctEtTotal ( ) [virtual]

Definition at line 22 of file L1GctEtTotal.cc.

{ } 

Member Function Documentation

int16_t L1GctEtTotal::bx ( ) const [inline]

get bunch-crossing index

Definition at line 51 of file L1GctEtTotal.h.

References m_bx.

{ return m_bx; }
bool L1GctEtTotal::empty ( ) const [inline]

empty method (= false; total Et is always calculated)

Definition at line 39 of file L1GctEtTotal.h.

{ return false; }
unsigned L1GctEtTotal::et ( ) const [inline]
std::string L1GctEtTotal::name ( ) const [inline]

name method

Definition at line 36 of file L1GctEtTotal.h.

{ return "EtTotal"; }
int L1GctEtTotal::operator!= ( const L1GctEtTotal e) const [inline]

inequality operator

Definition at line 57 of file L1GctEtTotal.h.

References m_data, and raw().

{ return m_data!=e.raw(); }
int L1GctEtTotal::operator== ( const L1GctEtTotal e) const [inline]

equality operator

Definition at line 54 of file L1GctEtTotal.h.

References m_data, and raw().

{ return m_data==e.raw(); }
bool L1GctEtTotal::overFlow ( ) const [inline]

get the overflow

Definition at line 48 of file L1GctEtTotal.h.

References kEtTotalOFlowBit, and m_data.

Referenced by L1GtEnergySumCondition::evaluateCondition(), and operator<<().

{ return (m_data & kEtTotalOFlowBit)!=0; }
uint16_t L1GctEtTotal::raw ( ) const [inline]

get the data

Definition at line 42 of file L1GctEtTotal.h.

References m_data.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), operator!=(), and operator==().

{ return m_data; }

Member Data Documentation

int16_t L1GctEtTotal::m_bx [private]

Definition at line 62 of file L1GctEtTotal.h.

Referenced by bx().

uint16_t L1GctEtTotal::m_data [private]

Definition at line 61 of file L1GctEtTotal.h.

Referenced by et(), L1GctEtTotal(), operator!=(), operator==(), overFlow(), and raw().