CMS 3D CMS Logo

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

#include <PMTDSimAccumulator.h>

Public Member Functions

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

Static Public Attributes

constexpr static unsigned dataMask = 0xffff
 
constexpr static unsigned energyMask = 0x3
 
constexpr static unsigned energyOffset = 4
 
constexpr static unsigned sampleMask = 0xf
 

Private Attributes

unsigned short data_
 
unsigned char indices_
 

Detailed Description

Definition at line 30 of file PMTDSimAccumulator.h.

Constructor & Destructor Documentation

◆ Data() [1/2]

PMTDSimAccumulator::Data::Data ( )
inline

Definition at line 37 of file PMTDSimAccumulator.h.

37 : data_(0), indices_(0) {}

◆ Data() [2/2]

PMTDSimAccumulator::Data::Data ( unsigned short  ei,
unsigned short  si,
unsigned short  d 
)
inline

Definition at line 38 of file PMTDSimAccumulator.h.

38 : data_(d), indices_((ei << energyOffset) | si) {}

Member Function Documentation

◆ data()

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

Definition at line 42 of file PMTDSimAccumulator.h.

42 { return data_ & dataMask; }

References data_, and dataMask.

Referenced by PMTDSimAccumulator::TmpElem::data().

◆ energyIndex()

unsigned int PMTDSimAccumulator::Data::energyIndex ( ) const
inline

Definition at line 40 of file PMTDSimAccumulator.h.

40 { return indices_ >> energyOffset; }

References energyOffset, and indices_.

Referenced by PMTDSimAccumulator::TmpElem::energyIndex().

◆ sampleIndex()

unsigned int PMTDSimAccumulator::Data::sampleIndex ( ) const
inline

Definition at line 41 of file PMTDSimAccumulator.h.

41 { return indices_ & sampleMask; }

References indices_, and sampleMask.

Referenced by PMTDSimAccumulator::TmpElem::sampleIndex().

Member Data Documentation

◆ data_

unsigned short PMTDSimAccumulator::Data::data_
private

Definition at line 45 of file PMTDSimAccumulator.h.

Referenced by data().

◆ dataMask

constexpr static unsigned PMTDSimAccumulator::Data::dataMask = 0xffff
staticconstexpr

◆ energyMask

constexpr static unsigned PMTDSimAccumulator::Data::energyMask = 0x3
staticconstexpr

◆ energyOffset

constexpr static unsigned PMTDSimAccumulator::Data::energyOffset = 4
staticconstexpr

Definition at line 32 of file PMTDSimAccumulator.h.

Referenced by energyIndex().

◆ indices_

unsigned char PMTDSimAccumulator::Data::indices_
private

Definition at line 46 of file PMTDSimAccumulator.h.

Referenced by energyIndex(), and sampleIndex().

◆ sampleMask

constexpr static unsigned PMTDSimAccumulator::Data::sampleMask = 0xf
staticconstexpr
PMTDSimAccumulator::Data::energyOffset
constexpr static unsigned energyOffset
Definition: PMTDSimAccumulator.h:32
PMTDSimAccumulator::Data::data_
unsigned short data_
Definition: PMTDSimAccumulator.h:45
PMTDSimAccumulator::Data::indices_
unsigned char indices_
Definition: PMTDSimAccumulator.h:46
PMTDSimAccumulator::Data::dataMask
constexpr static unsigned dataMask
Definition: PMTDSimAccumulator.h:35
ztail.d
d
Definition: ztail.py:151
PMTDSimAccumulator::Data::sampleMask
constexpr static unsigned sampleMask
Definition: PMTDSimAccumulator.h:34