CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
L1GctInternHFData Class Reference

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

#include <L1GctInternHFData.h>

Public Types

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

Public Member Functions

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

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)
 
static L1GctInternHFData fromWheelBitCounts (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 
static L1GctInternHFData fromWheelRingSums (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 16 of file L1GctInternHFData.h.

Member Enumeration Documentation

◆ L1GctInternHFDataType

et sum type - not clear this is required

Enumerator
null 
conc_hf_ring_et_sums 
conc_hf_bit_counts 
wheel_hf_ring_et_sums 
wheel_hf_bit_counts 

Definition at line 19 of file L1GctInternHFData.h.

Constructor & Destructor Documentation

◆ L1GctInternHFData()

L1GctInternHFData::L1GctInternHFData ( )

default constructor (for vector initialisation etc.)

Definition at line 4 of file L1GctInternHFData.cc.

◆ ~L1GctInternHFData()

L1GctInternHFData::~L1GctInternHFData ( )

destructor

Definition at line 7 of file L1GctInternHFData.cc.

7 {}

Member Function Documentation

◆ bx()

int16_t L1GctInternHFData::bx ( ) const
inline

get BX number

Definition at line 65 of file L1GctInternHFData.h.

References bx_.

Referenced by fromConcBitCounts(), fromConcRingSums(), fromWheelBitCounts(), fromWheelRingSums(), and setBx().

65 { return bx_; }

◆ capBlock()

uint16_t L1GctInternHFData::capBlock ( ) const
inline

get capture block

Definition at line 59 of file L1GctInternHFData.h.

References capBlock_.

Referenced by fromConcBitCounts(), fromConcRingSums(), fromWheelBitCounts(), fromWheelRingSums(), and setCapBlock().

59 { return capBlock_; }

◆ capIndex()

uint16_t L1GctInternHFData::capIndex ( ) const
inline

get index within capture block

Definition at line 62 of file L1GctInternHFData.h.

References capIndex_.

Referenced by fromConcBitCounts(), fromConcRingSums(), fromWheelBitCounts(), fromWheelRingSums(), and setCapIndex().

62 { return capIndex_; }

◆ count()

uint16_t L1GctInternHFData::count ( unsigned  i) const

get the counts

Definition at line 70 of file L1GctInternHFData.cc.

References mps_fire::i, and value().

Referenced by setCount().

70 { return value(i); }
uint16_t value(unsigned i) const
get value

◆ empty()

bool L1GctInternHFData::empty ( ) const
inline

is the sum non-zero

Definition at line 68 of file L1GctInternHFData.h.

References data_.

68 { return (data_ == 0); }

◆ et()

uint16_t L1GctInternHFData::et ( unsigned  i) const

get the et sums

Definition at line 67 of file L1GctInternHFData.cc.

References mps_fire::i, and value().

Referenced by setEt().

67 { return value(i); }
uint16_t value(unsigned i) const
get value

◆ fromConcBitCounts()

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

Definition at line 22 of file L1GctInternHFData.cc.

References bx(), capBlock(), capIndex(), conc_hf_bit_counts, ztail::d, data, and mps_fire::i.

Referenced by GctFormatTranslateV35::blockToGctInternRingSums(), and GctFormatTranslateV38::blockToGctInternRingSums().

25  {
27  d.setType(conc_hf_bit_counts);
28  d.setCapIndex(capIndex);
29  d.setCapBlock(capBlock);
30  d.setBx(bx);
31  for (unsigned i = 0; i < 4; ++i) {
32  d.setCount(i, (data >> (6 * i)) & 0x3f);
33  }
34  return d;
35 }
uint16_t capIndex() const
get index within capture block
d
Definition: ztail.py:151
int16_t bx() const
get BX number
uint16_t capBlock() const
get capture block
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
L1 GCT internal ring sums and/or bit counts.

◆ fromConcRingSums()

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

Definition at line 9 of file L1GctInternHFData.cc.

References bx(), capBlock(), capIndex(), conc_hf_ring_et_sums, ztail::d, and data.

Referenced by GctFormatTranslateV35::blockToGctInternRingSums(), and GctFormatTranslateV38::blockToGctInternRingSums().

12  {
14  d.setType(conc_hf_ring_et_sums);
15  d.setCapIndex(capIndex);
16  d.setCapBlock(capBlock);
17  d.setBx(bx);
18  d.setData(data);
19  return d;
20 }
uint16_t capIndex() const
get index within capture block
d
Definition: ztail.py:151
int16_t bx() const
get BX number
uint16_t capBlock() const
get capture block
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
L1 GCT internal ring sums and/or bit counts.

◆ fromWheelBitCounts()

L1GctInternHFData L1GctInternHFData::fromWheelBitCounts ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Definition at line 50 of file L1GctInternHFData.cc.

References bx(), capBlock(), capIndex(), ztail::d, data, and wheel_hf_bit_counts.

Referenced by GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), and GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums().

53  {
55  d.setType(wheel_hf_bit_counts);
56  d.setCapIndex(capIndex);
57  d.setCapBlock(capBlock);
58  d.setBx(bx);
59  d.setCount(0, data & 0x3f);
60  return d;
61 }
uint16_t capIndex() const
get index within capture block
d
Definition: ztail.py:151
int16_t bx() const
get BX number
uint16_t capBlock() const
get capture block
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
L1 GCT internal ring sums and/or bit counts.

◆ fromWheelRingSums()

L1GctInternHFData L1GctInternHFData::fromWheelRingSums ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Definition at line 37 of file L1GctInternHFData.cc.

References bx(), capBlock(), capIndex(), ztail::d, data, and wheel_hf_ring_et_sums.

Referenced by GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), and GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums().

40  {
42  d.setType(wheel_hf_ring_et_sums);
43  d.setCapIndex(capIndex);
44  d.setCapBlock(capBlock);
45  d.setBx(bx);
46  d.setData(data & 0xff);
47  return d;
48 }
uint16_t capIndex() const
get index within capture block
d
Definition: ztail.py:151
int16_t bx() const
get BX number
uint16_t capBlock() const
get capture block
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
L1 GCT internal ring sums and/or bit counts.

◆ isRingSums()

bool L1GctInternHFData::isRingSums ( ) const
inline

get the actual data

is this ring sums or bit counts?

Definition at line 73 of file L1GctInternHFData.h.

References conc_hf_ring_et_sums, type_, and wheel_hf_ring_et_sums.

◆ operator!=()

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

inequality operator

Definition at line 118 of file L1GctInternHFData.h.

References HltBtagPostValidation_cff::c.

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

◆ operator==()

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

operators

equality operator

Definition at line 73 of file L1GctInternHFData.cc.

References raw().

73 { return (this->raw() == c.raw()); }
uint32_t raw() const
get the raw data

◆ raw()

uint32_t L1GctInternHFData::raw ( ) const
inline

get the raw data

Definition at line 76 of file L1GctInternHFData.h.

References data_.

Referenced by operator==().

76 { return data_; }

◆ setBx()

void L1GctInternHFData::setBx ( int16_t const  bx)
inline

set bx

Definition at line 96 of file L1GctInternHFData.h.

References bx(), and bx_.

96 { bx_ = bx; }
int16_t bx() const
get BX number

◆ setCapBlock()

void L1GctInternHFData::setCapBlock ( uint16_t const  capBlock)
inline

set cap block

Definition at line 90 of file L1GctInternHFData.h.

References capBlock(), and capBlock_.

90 { capBlock_ = capBlock; }
uint16_t capBlock() const
get capture block

◆ setCapIndex()

void L1GctInternHFData::setCapIndex ( uint16_t const  capIndex)
inline

set cap index

Definition at line 93 of file L1GctInternHFData.h.

References capIndex(), and capIndex_.

93 { capIndex_ = capIndex; }
uint16_t capIndex() const
get index within capture block

◆ setCount()

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

set the count

Definition at line 85 of file L1GctInternHFData.cc.

References count(), mps_fire::i, and setValue().

85 { setValue(i, count); }
void setValue(unsigned const i, uint16_t const val)
set value
uint16_t count(unsigned i) const
get the counts

◆ setData()

void L1GctInternHFData::setData ( uint32_t const  data)
inline

Definition at line 110 of file L1GctInternHFData.h.

References data, and data_.

110 { data_ = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ setEt()

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

set the sum

Definition at line 82 of file L1GctInternHFData.cc.

References et(), mps_fire::i, and setValue().

82 { setValue(i, et); }
void setValue(unsigned const i, uint16_t const val)
set value
uint16_t et(unsigned i) const
get the et sums

◆ setType()

void L1GctInternHFData::setType ( L1GctInternHFDataType  type)
inline

set type

Definition at line 99 of file L1GctInternHFData.h.

References type(), and type_.

99 { type_ = type; }
L1GctInternHFData::L1GctInternHFDataType type() const
metadata
L1GctInternHFDataType type_

◆ setValue()

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

set value

Definition at line 76 of file L1GctInternHFData.cc.

References data_, mps_fire::i, and heppy_batch::val.

Referenced by Types._ProxyParameter::__init__(), setCount(), and setEt().

76  {
77  data_ &= ~(0xff << (i * 8));
78  data_ |= (val & 0xff) << (i * 8);
79 }

◆ type()

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

metadata

'type' of object

Definition at line 56 of file L1GctInternHFData.h.

References type_.

Referenced by setType().

56 { return type_; }
L1GctInternHFDataType type_

◆ value()

uint16_t L1GctInternHFData::value ( unsigned  i) const

Member Data Documentation

◆ bx_

int16_t L1GctInternHFData::bx_
private

Definition at line 127 of file L1GctInternHFData.h.

Referenced by bx(), and setBx().

◆ capBlock_

uint16_t L1GctInternHFData::capBlock_
private

Definition at line 125 of file L1GctInternHFData.h.

Referenced by capBlock(), and setCapBlock().

◆ capIndex_

uint16_t L1GctInternHFData::capIndex_
private

Definition at line 126 of file L1GctInternHFData.h.

Referenced by capIndex(), and setCapIndex().

◆ data_

uint32_t L1GctInternHFData::data_
private

Definition at line 130 of file L1GctInternHFData.h.

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

◆ type_

L1GctInternHFDataType L1GctInternHFData::type_
private