DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::DDSegmentation::BitFieldElement Class Reference

Helper class for BitFieldCoder that corresponds to one field value. More...

#include <BitFieldCoder.h>

Public Member Functions

 BitFieldElement ()=default
 Default constructor. More...
 
 BitFieldElement (const BitFieldElement &)=default
 Copy constructor. More...
 
 BitFieldElement (BitFieldElement &&)=default
 Move constructor. More...
 
 BitFieldElement (const std::string &name, unsigned offset, int signedWidth)
 
 ~BitFieldElement ()=default
 Default destructor. More...
 
BitFieldElementoperator= (const BitFieldElement &)=default
 Assignment operator. More...
 
FieldID value (CellID bitfield) const
 calculate this field's value given an external 64 bit bitmap More...
 
void set (CellID &bitfield, FieldID value) const
 
const std::string & name () const
 
unsigned offset () const
 
unsigned width () const
 
bool isSigned () const
 
CellID mask () const
 
int minValue () const
 
int maxValue () const
 

Protected Attributes

CellID _mask {}
 
unsigned _offset {}
 
unsigned _width {}
 
int _minVal {}
 
int _maxVal {}
 
bool _isSigned {}
 
std::string _name
 

Detailed Description

Helper class for BitFieldCoder that corresponds to one field value.

Definition at line 32 of file BitFieldCoder.h.

Constructor & Destructor Documentation

◆ BitFieldElement() [1/4]

dd4hep::DDSegmentation::BitFieldElement::BitFieldElement ( )
default

Default constructor.

◆ BitFieldElement() [2/4]

dd4hep::DDSegmentation::BitFieldElement::BitFieldElement ( const BitFieldElement )
default

Copy constructor.

◆ BitFieldElement() [3/4]

dd4hep::DDSegmentation::BitFieldElement::BitFieldElement ( BitFieldElement &&  )
default

Move constructor.

◆ BitFieldElement() [4/4]

dd4hep::DDSegmentation::BitFieldElement::BitFieldElement ( const std::string &  name,
unsigned  offset,
int  signedWidth 
)

The standard c'tor.

Parameters
namename of the field
offsetoffset of field
signedWidthwidth of field, negative if field is signed

Definition at line 21 of file BitFieldCoder.cpp.

◆ ~BitFieldElement()

dd4hep::DDSegmentation::BitFieldElement::~BitFieldElement ( )
default

Default destructor.

Member Function Documentation

◆ isSigned()

bool dd4hep::DDSegmentation::BitFieldElement::isSigned ( ) const
inline

True if field is interpreted as signed

Definition at line 70 of file BitFieldCoder.h.

◆ mask()

CellID dd4hep::DDSegmentation::BitFieldElement::mask ( ) const
inline

The field's mask

Definition at line 73 of file BitFieldCoder.h.

◆ maxValue()

int dd4hep::DDSegmentation::BitFieldElement::maxValue ( ) const
inline

Maximal value

Definition at line 79 of file BitFieldCoder.h.

◆ minValue()

int dd4hep::DDSegmentation::BitFieldElement::minValue ( ) const
inline

Minimal value

Definition at line 76 of file BitFieldCoder.h.

◆ name()

const std::string& dd4hep::DDSegmentation::BitFieldElement::name ( ) const
inline

The field's name

Definition at line 61 of file BitFieldCoder.h.

◆ offset()

unsigned dd4hep::DDSegmentation::BitFieldElement::offset ( ) const
inline

The field's offset

Definition at line 64 of file BitFieldCoder.h.

◆ operator=()

BitFieldElement& dd4hep::DDSegmentation::BitFieldElement::operator= ( const BitFieldElement )
default

Assignment operator.

◆ set()

void dd4hep::DDSegmentation::BitFieldElement::set ( CellID bitfield,
FieldID  value 
) const

Definition at line 67 of file BitFieldCoder.cpp.

◆ value()

FieldID dd4hep::DDSegmentation::BitFieldElement::value ( CellID  bitfield) const

calculate this field's value given an external 64 bit bitmap

Definition at line 55 of file BitFieldCoder.cpp.

◆ width()

unsigned dd4hep::DDSegmentation::BitFieldElement::width ( ) const
inline

The field's width

Definition at line 67 of file BitFieldCoder.h.

Member Data Documentation

◆ _isSigned

bool dd4hep::DDSegmentation::BitFieldElement::_isSigned {}
protected

Definition at line 88 of file BitFieldCoder.h.

◆ _mask

CellID dd4hep::DDSegmentation::BitFieldElement::_mask {}
protected

Definition at line 83 of file BitFieldCoder.h.

◆ _maxVal

int dd4hep::DDSegmentation::BitFieldElement::_maxVal {}
protected

Definition at line 87 of file BitFieldCoder.h.

◆ _minVal

int dd4hep::DDSegmentation::BitFieldElement::_minVal {}
protected

Definition at line 86 of file BitFieldCoder.h.

◆ _name

std::string dd4hep::DDSegmentation::BitFieldElement::_name
protected

Definition at line 89 of file BitFieldCoder.h.

◆ _offset

unsigned dd4hep::DDSegmentation::BitFieldElement::_offset {}
protected

Definition at line 84 of file BitFieldCoder.h.

◆ _width

unsigned dd4hep::DDSegmentation::BitFieldElement::_width {}
protected

Definition at line 85 of file BitFieldCoder.h.


The documentation for this class was generated from the following files: