CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
PHGCSimAccumulator::Data Class Reference

#include <PHGCSimAccumulator.h>

Public Member Functions

 Data ()
 
 Data (unsigned short ei, unsigned short si, unsigned short d)
 
unsigned int data () const
 
unsigned int energyIndex () const
 
unsigned int sampleIndex () const
 

Static Public Attributes

static constexpr unsigned dataMask = 0x7ff
 
static constexpr unsigned dataOffset = 0
 
static constexpr unsigned energyMask = 0x1
 
static constexpr unsigned energyOffset = 15
 
static constexpr unsigned sampleMask = 0xf
 
static constexpr unsigned sampleOffset = 11
 

Private Attributes

unsigned short data_
 

Detailed Description

Definition at line 26 of file PHGCSimAccumulator.h.

Constructor & Destructor Documentation

PHGCSimAccumulator::Data::Data ( )
inline

Definition at line 35 of file PHGCSimAccumulator.h.

35 : data_(0) {}
PHGCSimAccumulator::Data::Data ( unsigned short  ei,
unsigned short  si,
unsigned short  d 
)
inline

Definition at line 36 of file PHGCSimAccumulator.h.

37  : data_((ei << energyOffset) | (si << sampleOffset) | d) {}
std::map< l1t::HGCalMulticluster::EnergyInterpretation, double > ei
Definition: classes.h:67
static constexpr unsigned sampleOffset
d
Definition: ztail.py:151
static constexpr unsigned energyOffset

Member Function Documentation

unsigned int PHGCSimAccumulator::Data::data ( ) const
inline

Definition at line 41 of file PHGCSimAccumulator.h.

References PHGCSimAccumulator::data_.

41 { return data_ & dataMask; }
static constexpr unsigned dataMask
unsigned int PHGCSimAccumulator::Data::energyIndex ( ) const
inline

Definition at line 39 of file PHGCSimAccumulator.h.

References PHGCSimAccumulator::data_.

39 { return data_ >> energyOffset; }
static constexpr unsigned energyOffset
unsigned int PHGCSimAccumulator::Data::sampleIndex ( ) const
inline

Definition at line 40 of file PHGCSimAccumulator.h.

References PHGCSimAccumulator::data_.

40 { return (data_ >> sampleOffset) & sampleMask; }
static constexpr unsigned sampleMask
static constexpr unsigned sampleOffset

Member Data Documentation

unsigned short PHGCSimAccumulator::Data::data_
private

Definition at line 44 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::dataMask = 0x7ff
static

Definition at line 33 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::dataOffset = 0
static

Definition at line 32 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::energyMask = 0x1
static

Definition at line 29 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::energyOffset = 15
static

Definition at line 28 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::sampleMask = 0xf
static

Definition at line 31 of file PHGCSimAccumulator.h.

constexpr unsigned PHGCSimAccumulator::Data::sampleOffset = 11
static

Definition at line 30 of file PHGCSimAccumulator.h.