ATLAS Offline Software
|
Class implementing a lossy float compression. More...
#include <FloatCompressor.h>
Classes | |
union | floatint_t |
Type used in the compression. More... | |
Public Member Functions | |
FloatCompressor (unsigned int mantissaBits=7) | |
Constructor with the number of mantissa bits to retain. More... | |
float | reduceFloatPrecision (float value) const |
Function returning a reduced precision float value. More... | |
Private Attributes | |
unsigned int | m_mantissaBits |
Number of mantissa bits to keep. More... | |
uint32_t | m_mantissaBitmask |
Bitmask for zeroing out the non-interesting bits. More... | |
Magic numbers | |
uint32_t | m_rounding |
uint32_t | m_vmax |
Largest possible positive 32bit float minus the rounding. More... | |
Class implementing a lossy float compression.
This is just a copy of the code implemented first in CaloUtils. Used to reduce the precision of select floating point quantities during the POOL conversion.
Definition at line 30 of file FloatCompressor.h.
CxxUtils::FloatCompressor::FloatCompressor | ( | unsigned int | mantissaBits = 7 | ) |
Constructor with the number of mantissa bits to retain.
Definition at line 18 of file FloatCompressor.cxx.
float CxxUtils::FloatCompressor::reduceFloatPrecision | ( | float | value | ) | const |
Function returning a reduced precision float value.
Definition at line 98 of file FloatCompressor.cxx.
|
private |
Bitmask for zeroing out the non-interesting bits.
Definition at line 49 of file FloatCompressor.h.
|
private |
Number of mantissa bits to keep.
Definition at line 47 of file FloatCompressor.h.
|
private |
Definition at line 55 of file FloatCompressor.h.
|
private |
Largest possible positive 32bit float minus the rounding.
Definition at line 57 of file FloatCompressor.h.