CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
L1GctHFRingEtSums Class Reference

L1 GCT HF ring Et sums. More...

#include <L1GctHFRingEtSums.h>

Public Member Functions

int16_t bx () const
 get BX number More...
 
uint16_t capBlock () const
 get GCT unpacker capture block More...
 
uint16_t capIndex () const
 get index within GCT unpacker capture block More...
 
bool empty () const
 is the sum non-zero More...
 
uint16_t etSum (unsigned const i) const
 
 L1GctHFRingEtSums ()
 default constructor (for vector initialisation etc.) More...
 
bool operator!= (const L1GctHFRingEtSums &c) const
 inequality operator More...
 
bool operator== (const L1GctHFRingEtSums &c) const
 operators More...
 
uint16_t raw () const
 get the raw data More...
 
void setBx (uint16_t bx)
 set bx More...
 
void setCapBlock (uint16_t capBlock)
 set cap block More...
 
void setCapIndex (uint16_t capIndex)
 set cap index More...
 
void setData (uint32_t data)
 set the raw data More...
 
void setEtSum (unsigned i, uint16_t et)
 set a sum More...
 
 ~L1GctHFRingEtSums ()
 destructor More...
 

Static Public Member Functions

static L1GctHFRingEtSums fromConcRingSums (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 
static L1GctHFRingEtSums fromGctEmulator (const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
 named ctor for GCT emulator More...
 
static unsigned nSums ()
 

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 L1GctHFRingEtSums.h.

Constructor & Destructor Documentation

L1GctHFRingEtSums::L1GctHFRingEtSums ( )

default constructor (for vector initialisation etc.)

set static consts

default constructor (for vector initialisation etc.)

Definition at line 9 of file L1GctHFRingEtSums.cc.

9  :
10  capBlock_(0),
11  capIndex_(0),
12  bx_(0),
13  data_(0)
14 { }
L1GctHFRingEtSums::~L1GctHFRingEtSums ( )

destructor

Definition at line 18 of file L1GctHFRingEtSums.cc.

19 { }

Member Function Documentation

int16_t L1GctHFRingEtSums::bx ( ) const
inline

get BX number

Definition at line 61 of file L1GctHFRingEtSums.h.

References bx_.

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

61 { return bx_; }
uint16_t L1GctHFRingEtSums::capBlock ( ) const
inline

get GCT unpacker capture block

Definition at line 55 of file L1GctHFRingEtSums.h.

References capBlock_.

Referenced by operator<<(), and setCapBlock().

55 { return capBlock_; }
uint16_t L1GctHFRingEtSums::capIndex ( ) const
inline

get index within GCT unpacker capture block

Definition at line 58 of file L1GctHFRingEtSums.h.

References capIndex_.

Referenced by operator<<(), and setCapIndex().

58 { return capIndex_; }
bool L1GctHFRingEtSums::empty ( ) const
inline

is the sum non-zero

Definition at line 64 of file L1GctHFRingEtSums.h.

References data_.

Referenced by operator<<(), Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

64 { return (data_ == 0); }
uint16_t L1GctHFRingEtSums::etSum ( unsigned const  i) const

get an Et sum index : sum 0 : Ring 1 Positive Rapidity HF Et sum 1 : Ring 1 Negative Rapidity HF Et sum 2 : Ring 2 Positive Rapidity HF Et sum 3 : Ring 2 Negative Rapidity HF Et sum

Definition at line 61 of file L1GctHFRingEtSums.cc.

References data_.

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

61  {
62  return (data_>>(i*3)) & 0x7;
63 }
int i
Definition: DBlmapReader.cc:9
L1GctHFRingEtSums L1GctHFRingEtSums::fromConcRingSums ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

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

Definition at line 23 of file L1GctHFRingEtSums.cc.

References alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), and setEtSum().

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

27 {
31  s.setBx(bx);
32  s.setEtSum(0, (data>>12)&0x7 );
33  s.setEtSum(1, (data>>16)&0x7 );
34  s.setEtSum(2, (data>>19)&0x7 );
35  s.setEtSum(3, (data>>22)&0x7 );
36  return s;
37 }
uint16_t capBlock() const
get GCT unpacker capture block
uint16_t capIndex() const
get index within GCT unpacker capture block
void setCapIndex(uint16_t capIndex)
set cap index
void setEtSum(unsigned i, uint16_t et)
set a sum
void setCapBlock(uint16_t capBlock)
set cap block
int16_t bx() const
get BX number
L1 GCT HF ring Et sums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void setBx(uint16_t bx)
set bx
L1GctHFRingEtSums L1GctHFRingEtSums::fromGctEmulator ( const int16_t  bx,
const uint16_t  etSumPosEtaRing1,
const uint16_t  etSumNegEtaRing1,
const uint16_t  etSumPosEtaRing2,
const uint16_t  etSumNegEtaRing2 
)
static

named ctor for GCT emulator

Definition at line 40 of file L1GctHFRingEtSums.cc.

References alignCSCRings::s, setBx(), and setEtSum().

Referenced by L1GlobalCaloTrigger::getHFRingEtSumsCollection().

45 {
47  s.setBx(bx);
48  s.setEtSum(0, etSumPosEtaRing1);
49  s.setEtSum(1, etSumNegEtaRing1);
50  s.setEtSum(2, etSumPosEtaRing2);
51  s.setEtSum(3, etSumNegEtaRing2);
52  return s;
53 }
void setEtSum(unsigned i, uint16_t et)
set a sum
int16_t bx() const
get BX number
L1 GCT HF ring Et sums.
void setBx(uint16_t bx)
set bx
static unsigned L1GctHFRingEtSums::nSums ( )
inlinestatic

Definition at line 50 of file L1GctHFRingEtSums.h.

References N_SUMS.

Referenced by L1GlobalTriggerPSB::fillPsbBlock().

50 { return N_SUMS; }
static const unsigned N_SUMS
bool L1GctHFRingEtSums::operator!= ( const L1GctHFRingEtSums c) const
inline

inequality operator

Definition at line 102 of file L1GctHFRingEtSums.h.

References trackerHits::c.

102 { return !(*this == c); }
bool L1GctHFRingEtSums::operator== ( const L1GctHFRingEtSums c) const

operators

equality operator

Definition at line 67 of file L1GctHFRingEtSums.cc.

References raw().

67  {
68  return (this->raw() == c.raw());
69 }
uint16_t raw() const
get the raw data
uint16_t L1GctHFRingEtSums::raw ( ) const
inline

get the raw data

Definition at line 67 of file L1GctHFRingEtSums.h.

References data_.

Referenced by L1GtPatternGenerator::analyze(), and operator==().

67 { return data_; }
void L1GctHFRingEtSums::setBx ( uint16_t  bx)
inline

set bx

Definition at line 87 of file L1GctHFRingEtSums.h.

References bx(), and bx_.

Referenced by fromConcRingSums(), and fromGctEmulator().

87 { bx_ = bx; }
int16_t bx() const
get BX number
void L1GctHFRingEtSums::setCapBlock ( uint16_t  capBlock)
inline

set cap block

Definition at line 81 of file L1GctHFRingEtSums.h.

References capBlock(), and capBlock_.

Referenced by fromConcRingSums().

81 { capBlock_ = capBlock; }
uint16_t capBlock() const
get GCT unpacker capture block
void L1GctHFRingEtSums::setCapIndex ( uint16_t  capIndex)
inline

set cap index

Definition at line 84 of file L1GctHFRingEtSums.h.

References capIndex(), and capIndex_.

Referenced by fromConcRingSums().

84 { capIndex_ = capIndex; }
uint16_t capIndex() const
get index within GCT unpacker capture block
void L1GctHFRingEtSums::setData ( uint32_t  data)
inline

set the raw data

Definition at line 93 of file L1GctHFRingEtSums.h.

References data, and data_.

93 { data_ = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void L1GctHFRingEtSums::setEtSum ( unsigned  i,
uint16_t  et 
)

set a sum

Definition at line 72 of file L1GctHFRingEtSums.cc.

References data_.

Referenced by fromConcRingSums(), and fromGctEmulator().

72  {
73  data_ &= ~(0x7<<(i*3));
74  data_ |= (et&0x7)<<(i*3);
75 }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

int16_t L1GctHFRingEtSums::bx_
private

Definition at line 110 of file L1GctHFRingEtSums.h.

Referenced by bx(), and setBx().

uint16_t L1GctHFRingEtSums::capBlock_
private

Definition at line 108 of file L1GctHFRingEtSums.h.

Referenced by capBlock(), and setCapBlock().

uint16_t L1GctHFRingEtSums::capIndex_
private

Definition at line 109 of file L1GctHFRingEtSums.h.

Referenced by capIndex(), and setCapIndex().

uint16_t L1GctHFRingEtSums::data_
private

Definition at line 113 of file L1GctHFRingEtSums.h.

Referenced by empty(), etSum(), raw(), setData(), and setEtSum().

const unsigned L1GctHFRingEtSums::N_SUMS =4
static

Definition at line 20 of file L1GctHFRingEtSums.h.

Referenced by nSums().