test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 17 of file L1GctInternHFData.h.

Member Enumeration Documentation

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 22 of file L1GctInternHFData.h.

Constructor & Destructor Documentation

L1GctInternHFData::L1GctInternHFData ( )

default constructor (for vector initialisation etc.)

Definition at line 4 of file L1GctInternHFData.cc.

4  :
5  type_(null),
6  capBlock_(0),
7  capIndex_(0),
8  bx_(0),
9  data_(0)
10 { }
L1GctInternHFDataType type_
L1GctInternHFData::~L1GctInternHFData ( )

destructor

Definition at line 13 of file L1GctInternHFData.cc.

13 { }

Member Function Documentation

int16_t L1GctInternHFData::bx ( ) const
inline

get BX number

Definition at line 67 of file L1GctInternHFData.h.

References bx_.

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

67 { return bx_; }
uint16_t L1GctInternHFData::capBlock ( ) const
inline

get capture block

Definition at line 61 of file L1GctInternHFData.h.

References capBlock_.

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

61 { return capBlock_; }
uint16_t L1GctInternHFData::capIndex ( ) const
inline

get index within capture block

Definition at line 64 of file L1GctInternHFData.h.

References capIndex_.

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

64 { return capIndex_; }
uint16_t L1GctInternHFData::count ( unsigned  i) const

get the counts

Definition at line 81 of file L1GctInternHFData.cc.

References value().

Referenced by operator<<().

81  {
82  return value(i);
83 }
int i
Definition: DBlmapReader.cc:9
uint16_t value(unsigned i) const
get value
bool L1GctInternHFData::empty ( ) const
inline

is the sum non-zero

Definition at line 70 of file L1GctInternHFData.h.

References data_.

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

70 { return (data_ == 0); }
uint16_t L1GctInternHFData::et ( unsigned  i) const

get the et sums

Definition at line 76 of file L1GctInternHFData.cc.

References value().

Referenced by operator<<().

76  {
77  return value(i);
78 }
int i
Definition: DBlmapReader.cc:9
uint16_t value(unsigned i) const
get value
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, ztail::d, i, setBx(), setCapBlock(), setCapIndex(), setCount(), and setType().

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

31  {
36  d.setBx(bx);
37  for (unsigned i=0; i<4; ++i) {
38  d.setCount(i, (data>>(6*i))&0x3f);
39  }
40  return d;
41 }
int i
Definition: DBlmapReader.cc:9
void setCapBlock(uint16_t const capBlock)
set cap block
uint16_t capIndex() const
get index within capture block
void setCount(unsigned const i, uint16_t const count)
set the count
tuple d
Definition: ztail.py:151
uint16_t capBlock() const
get capture block
int16_t bx() const
get BX number
void setType(L1GctInternHFDataType type)
set type
void setBx(int16_t const bx)
set bx
L1 GCT internal ring sums and/or bit counts.
void setCapIndex(uint16_t const capIndex)
set cap index
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, ztail::d, setBx(), setCapBlock(), setCapIndex(), setData(), and setType().

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

18  {
23  d.setBx(bx);
24  d.setData(data);
25  return d;
26 }
void setCapBlock(uint16_t const capBlock)
set cap block
uint16_t capIndex() const
get index within capture block
tuple d
Definition: ztail.py:151
uint16_t capBlock() const
get capture block
int16_t bx() const
get BX number
void setType(L1GctInternHFDataType type)
set type
void setBx(int16_t const bx)
set bx
void setData(uint32_t const data)
L1 GCT internal ring sums and/or bit counts.
void setCapIndex(uint16_t const capIndex)
set cap index
L1GctInternHFData L1GctInternHFData::fromWheelBitCounts ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Definition at line 56 of file L1GctInternHFData.cc.

References ztail::d, setBx(), setCapBlock(), setCapIndex(), setCount(), setType(), and wheel_hf_bit_counts.

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

59  {
64  d.setBx(bx);
65  d.setCount(0,data & 0x3f);
66  return d;
67 }
void setCapBlock(uint16_t const capBlock)
set cap block
uint16_t capIndex() const
get index within capture block
void setCount(unsigned const i, uint16_t const count)
set the count
tuple d
Definition: ztail.py:151
uint16_t capBlock() const
get capture block
int16_t bx() const
get BX number
void setType(L1GctInternHFDataType type)
set type
void setBx(int16_t const bx)
set bx
L1 GCT internal ring sums and/or bit counts.
void setCapIndex(uint16_t const capIndex)
set cap index
L1GctInternHFData L1GctInternHFData::fromWheelRingSums ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Definition at line 43 of file L1GctInternHFData.cc.

References ztail::d, setBx(), setCapBlock(), setCapIndex(), setData(), setType(), and wheel_hf_ring_et_sums.

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

46  {
51  d.setBx(bx);
52  d.setData(data & 0xff);
53  return d;
54 }
void setCapBlock(uint16_t const capBlock)
set cap block
uint16_t capIndex() const
get index within capture block
tuple d
Definition: ztail.py:151
uint16_t capBlock() const
get capture block
int16_t bx() const
get BX number
void setType(L1GctInternHFDataType type)
set type
void setBx(int16_t const bx)
set bx
void setData(uint32_t const data)
L1 GCT internal ring sums and/or bit counts.
void setCapIndex(uint16_t const capIndex)
set cap index
bool L1GctInternHFData::isRingSums ( ) const
inline

get the actual data

is this ring sums or bit counts?

Definition at line 76 of file L1GctInternHFData.h.

References conc_hf_ring_et_sums, type_, and wheel_hf_ring_et_sums.

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

inequality operator

Definition at line 123 of file L1GctInternHFData.h.

References EnergyCorrector::c.

123 { return !(*this == c); }
bool L1GctInternHFData::operator== ( const L1GctInternHFData c) const

operators

equality operator

Definition at line 87 of file L1GctInternHFData.cc.

References raw().

87  {
88  return ( this->raw() == c.raw() );
89 }
uint32_t raw() const
get the raw data
uint32_t L1GctInternHFData::raw ( ) const
inline

get the raw data

Definition at line 79 of file L1GctInternHFData.h.

References data_.

Referenced by operator==().

79 { return data_; }
void L1GctInternHFData::setBx ( int16_t const  bx)
inline

set bx

Definition at line 100 of file L1GctInternHFData.h.

References bx(), and bx_.

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

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

set cap block

Definition at line 94 of file L1GctInternHFData.h.

References capBlock(), and capBlock_.

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

94 { capBlock_ = capBlock; }
uint16_t capBlock() const
get capture block
void L1GctInternHFData::setCapIndex ( uint16_t const  capIndex)
inline

set cap index

Definition at line 97 of file L1GctInternHFData.h.

References capIndex(), and capIndex_.

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

97 { capIndex_ = capIndex; }
uint16_t capIndex() const
get index within capture block
void L1GctInternHFData::setCount ( unsigned const  i,
uint16_t const  count 
)

set the count

Definition at line 104 of file L1GctInternHFData.cc.

References setValue().

Referenced by fromConcBitCounts(), and fromWheelBitCounts().

104  {
105  setValue(i, count);
106 }
int i
Definition: DBlmapReader.cc:9
void setValue(unsigned const i, uint16_t const val)
set value
uint16_t count(unsigned i) const
get the counts
void L1GctInternHFData::setData ( uint32_t const  data)
inline
void L1GctInternHFData::setEt ( unsigned const  i,
uint16_t const  et 
)

set the sum

Definition at line 99 of file L1GctInternHFData.cc.

References setValue().

99  {
100  setValue(i, et);
101 }
int i
Definition: DBlmapReader.cc:9
void setValue(unsigned const i, uint16_t const val)
set value
uint16_t et(unsigned i) const
get the et sums
void L1GctInternHFData::setType ( L1GctInternHFDataType  type)
inline

set type

Definition at line 103 of file L1GctInternHFData.h.

References type(), and type_.

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

103 { type_ = type; }
L1GctInternHFData::L1GctInternHFDataType type() const
metadata
L1GctInternHFDataType type_
void L1GctInternHFData::setValue ( unsigned const  i,
uint16_t const  val 
)
L1GctInternHFData::L1GctInternHFDataType L1GctInternHFData::type ( ) const
inline
uint16_t L1GctInternHFData::value ( unsigned  i) const

Member Data Documentation

int16_t L1GctInternHFData::bx_
private

Definition at line 134 of file L1GctInternHFData.h.

Referenced by bx(), and setBx().

uint16_t L1GctInternHFData::capBlock_
private

Definition at line 132 of file L1GctInternHFData.h.

Referenced by capBlock(), and setCapBlock().

uint16_t L1GctInternHFData::capIndex_
private

Definition at line 133 of file L1GctInternHFData.h.

Referenced by capIndex(), and setCapIndex().

uint32_t L1GctInternHFData::data_
private

Definition at line 137 of file L1GctInternHFData.h.

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

L1GctInternHFDataType L1GctInternHFData::type_
private