CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

L1CaloMipQuietRegion Class Reference

Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region. More...

#include <L1CaloMipQuietRegion.h>

List of all members.

Public Member Functions

int16_t bx () const
 Get bunch crossing.
bool empty () const
 Is the object empty? Currently always returns false.
unsigned gctEta () const
 Get GCT eta index.
unsigned gctPhi () const
 Get GCT phi index.
L1CaloRegionDetId id () const
 Get global region ID.
 L1CaloMipQuietRegion ()
 Default constructor.
 L1CaloMipQuietRegion (bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn, int16_t bx)
 Constructor for RCT emulator (HB/HE regions)
 L1CaloMipQuietRegion (bool mip, bool quiet, unsigned ieta, unsigned iphi, int16_t bx=0)
 Construct with GCT eta,phi indices, for testing GCT emulator.
bool mip () const
 Get MIP bit.
bool operator!= (const L1CaloMipQuietRegion &rhs) const
 Inequality operator.
bool operator== (const L1CaloMipQuietRegion &rhs) const
 Equality operator; compares all data: MIP/Quiet bits, bunch crossing & geographical.
bool quiet () const
 Get Quiet bit.
uint8_t raw () const
 Get raw data.
unsigned rctCard () const
 Get RCT reciever card ID.
unsigned rctCrate () const
 Get RCT crate ID.
unsigned rctEta () const
 Get local eta index (within RCT crate).
unsigned rctPhi () const
 Get local phi index (within RCT crate).
unsigned rctRegionIndex () const
 Get RCT region index.
void reset ()
 Resets the data content - i.e. resets MIP/Quiet and bx, but not position ID!
void setBx (int16_t bx)
 Set bunch crossing.
void setMip (bool mip)
 Set MIP bit.
void setQuiet (bool quiet)
 Set Quiet bit.
 ~L1CaloMipQuietRegion ()
 Destructor.

Private Member Functions

void pack (bool mip, bool quiet)
 For use in constructors - packs MIP/Quiet bools up into m_data;.

Private Attributes

int16_t m_bx
 Bunch crossing.
uint8_t m_data
 MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
L1CaloRegionDetId m_id
 Geographical info: region ID.

Detailed Description

Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region.

Author:
Robert Frazier
Revision:
1.2
Date:
2008/02/22 14:33:54

Definition at line 17 of file L1CaloMipQuietRegion.h.


Constructor & Destructor Documentation

L1CaloMipQuietRegion::L1CaloMipQuietRegion ( )

Default constructor.

Definition at line 13 of file L1CaloMipQuietRegion.cc.

                                          :
  m_id(),
  m_data(0),
  m_bx(0)
{
}
L1CaloMipQuietRegion::L1CaloMipQuietRegion ( bool  mip,
bool  quiet,
unsigned  crate,
unsigned  card,
unsigned  rgn,
int16_t  bx 
)

Constructor for RCT emulator (HB/HE regions)

Definition at line 20 of file L1CaloMipQuietRegion.cc.

References pack().

                                                                                   :
  m_id(crate, card, rgn),
  m_data(0), // Over-ridden below
  m_bx(bx)
{
  pack(mip, quiet);
}
L1CaloMipQuietRegion::L1CaloMipQuietRegion ( bool  mip,
bool  quiet,
unsigned  ieta,
unsigned  iphi,
int16_t  bx = 0 
)

Construct with GCT eta,phi indices, for testing GCT emulator.

Definition at line 29 of file L1CaloMipQuietRegion.cc.

References pack().

                                                                     :
  m_id(ieta, iphi),
  m_data(0), // Over-ridden below
  m_bx(bx)
{
  pack(mip, quiet);
}
L1CaloMipQuietRegion::~L1CaloMipQuietRegion ( ) [inline]

Destructor.

Definition at line 33 of file L1CaloMipQuietRegion.h.

{}

Member Function Documentation

int16_t L1CaloMipQuietRegion::bx ( ) const [inline]

Get bunch crossing.

Definition at line 53 of file L1CaloMipQuietRegion.h.

References m_bx.

Referenced by operator<<(), operator==(), and setBx().

bool L1CaloMipQuietRegion::empty ( ) const [inline]

Is the object empty? Currently always returns false.

Definition at line 87 of file L1CaloMipQuietRegion.h.

{ return false; }
unsigned L1CaloMipQuietRegion::gctEta ( ) const [inline]

Get GCT eta index.

Definition at line 79 of file L1CaloMipQuietRegion.h.

References L1CaloRegionDetId::ieta(), and m_id.

Referenced by operator<<().

unsigned L1CaloMipQuietRegion::gctPhi ( ) const [inline]

Get GCT phi index.

Definition at line 81 of file L1CaloMipQuietRegion.h.

References L1CaloRegionDetId::iphi(), and m_id.

Referenced by operator<<().

L1CaloRegionDetId L1CaloMipQuietRegion::id ( void  ) const [inline]

Get global region ID.

Definition at line 67 of file L1CaloMipQuietRegion.h.

References m_id.

Referenced by operator==().

bool L1CaloMipQuietRegion::mip ( ) const [inline]

Get MIP bit.

Definition at line 49 of file L1CaloMipQuietRegion.h.

References m_data.

Referenced by operator<<().

bool L1CaloMipQuietRegion::operator!= ( const L1CaloMipQuietRegion rhs) const [inline]

Inequality operator.

Definition at line 42 of file L1CaloMipQuietRegion.h.

{ return !(*this == rhs); }
bool L1CaloMipQuietRegion::operator== ( const L1CaloMipQuietRegion rhs) const

Equality operator; compares all data: MIP/Quiet bits, bunch crossing & geographical.

Definition at line 38 of file L1CaloMipQuietRegion.cc.

References bx(), id(), m_bx, m_data, m_id, and raw().

{
  return ( m_data==rhs.raw() && m_bx==rhs.bx() && m_id==rhs.id() );
}
void L1CaloMipQuietRegion::pack ( bool  mip,
bool  quiet 
) [inline, private]

For use in constructors - packs MIP/Quiet bools up into m_data;.

Definition at line 107 of file L1CaloMipQuietRegion.h.

References m_data.

Referenced by L1CaloMipQuietRegion().

{ m_data = (mip?1:0)|(quiet?2:0); }
bool L1CaloMipQuietRegion::quiet ( ) const [inline]

Get Quiet bit.

Definition at line 51 of file L1CaloMipQuietRegion.h.

References m_data.

Referenced by operator<<().

uint8_t L1CaloMipQuietRegion::raw ( ) const [inline]

Get raw data.

Definition at line 47 of file L1CaloMipQuietRegion.h.

References m_data.

Referenced by operator==().

unsigned L1CaloMipQuietRegion::rctCard ( ) const [inline]

Get RCT reciever card ID.

Definition at line 71 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctCard().

Referenced by operator<<().

unsigned L1CaloMipQuietRegion::rctCrate ( ) const [inline]

Get RCT crate ID.

Definition at line 69 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctCrate().

Referenced by operator<<().

unsigned L1CaloMipQuietRegion::rctEta ( ) const [inline]

Get local eta index (within RCT crate).

Definition at line 75 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctEta().

Referenced by operator<<().

unsigned L1CaloMipQuietRegion::rctPhi ( ) const [inline]

Get local phi index (within RCT crate).

Definition at line 77 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctPhi().

Referenced by operator<<().

unsigned L1CaloMipQuietRegion::rctRegionIndex ( ) const [inline]

Get RCT region index.

Definition at line 73 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctRegion().

Referenced by operator<<().

void L1CaloMipQuietRegion::reset ( void  ) [inline]

Resets the data content - i.e. resets MIP/Quiet and bx, but not position ID!

Definition at line 90 of file L1CaloMipQuietRegion.h.

References m_bx, and m_data.

{ m_data = 0; m_bx = 0; }
void L1CaloMipQuietRegion::setBx ( int16_t  bx) [inline]

Set bunch crossing.

Definition at line 62 of file L1CaloMipQuietRegion.h.

References bx(), and m_bx.

void L1CaloMipQuietRegion::setMip ( bool  mip) [inline]

Set MIP bit.

Definition at line 58 of file L1CaloMipQuietRegion.h.

References m_data.

void L1CaloMipQuietRegion::setQuiet ( bool  quiet) [inline]

Set Quiet bit.

Definition at line 60 of file L1CaloMipQuietRegion.h.

References m_data.


Member Data Documentation

int16_t L1CaloMipQuietRegion::m_bx [private]

Bunch crossing.

Definition at line 101 of file L1CaloMipQuietRegion.h.

Referenced by bx(), operator==(), reset(), and setBx().

uint8_t L1CaloMipQuietRegion::m_data [private]

MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.

Definition at line 99 of file L1CaloMipQuietRegion.h.

Referenced by mip(), operator==(), pack(), quiet(), raw(), reset(), setMip(), and setQuiet().

Geographical info: region ID.

Definition at line 97 of file L1CaloMipQuietRegion.h.

Referenced by gctEta(), gctPhi(), id(), operator==(), rctCard(), rctCrate(), rctEta(), rctPhi(), and rctRegionIndex().