Helper for packing a float into/out of a bit field, with a minimum of 0.
More...
#include <CaloCellPackerUtils.h>
Helper for packing a float into/out of a bit field, with a minimum of 0.
This is just like Floatfield
, specialized for the case where xmin==0
.
Definition at line 130 of file CaloCellPackerUtils.h.
◆ Floatfield2()
CaloCellPackerUtils::Floatfield2::Floatfield2 |
( |
unsigned int |
mask = 1 , |
|
|
double |
xmax = 1 |
|
) |
| |
Constructor.
- Parameters
-
The | bit mask. Should contain a single contiguous string of 1's. |
xmax | The largest storable value. |
Definition at line 61 of file CaloCellPackerUtils.cxx.
◆ in() [1/2]
unsigned int CaloCellPackerUtils::Floatfield2::in |
( |
double |
x | ) |
const |
Shift and mask a value into the bitfield.
- Parameters
-
- Returns
- The converted value shifted and masked to go into the bitfield.
◆ in() [2/2]
unsigned int CaloCellPackerUtils::Bitfield::in |
( |
unsigned int |
x | ) |
const |
|
inherited |
Shift and mask a value into the bitfield.
- Parameters
-
- Returns
- The value shifted and masked to go into the bitfield.
◆ out()
double CaloCellPackerUtils::Floatfield2::out |
( |
unsigned int |
x | ) |
const |
Extract a value from the bitfield.
- Parameters
-
- Returns
- The value extracted from the bitfield.
◆ m_fact
double CaloCellPackerUtils::Floatfield2::m_fact |
|
private |
◆ m_ifact
double CaloCellPackerUtils::Floatfield2::m_ifact |
|
private |
◆ m_mask
unsigned int CaloCellPackerUtils::Bitfield::m_mask |
|
protectedinherited |
◆ m_shift
unsigned int CaloCellPackerUtils::Bitfield::m_shift |
|
protectedinherited |
◆ m_xmax
double CaloCellPackerUtils::Floatfield2::m_xmax |
|
private |
The documentation for this class was generated from the following files: