45#include "MdcRecoUtil/ComPackBase.h"
55#include "MdcRecoUtil/ComPackFlatFloat.h"
60 if ( val_one > val_two )
77 cout <<
" ErrMsg(fatal) "
78 <<
"Error : Range is zero!" << endl;
86 cout <<
" ErrMsg(fatal) "
87 <<
"Warning : Number of bits truncated! "
88 <<
"Reason : Number of bits too large for " <<
_maxlongbits
89 <<
" bit packing operations! "
90 <<
"This is probably caused by a serious typo somewhere!" << endl;
101 _upacfac = 1.0 / _pacfac;
109 double dpack = ( theval -
_minVal ) * _pacfac;
116 else if ( dpack < 0 )
125 double& unpackedval )
const {
131 if ( 0 == numsteps )
return;
133 const double incstep = double(
_valRange ) / double( numsteps );
139 unpack( tagVal, unTagVal );
140 cout << i <<
" is converted to :" << tagVal <<
". Upon unpacking :" << unTagVal << endl;
141 toterror += fabs( i - unTagVal );
StatusCode unpack(const d_ULong, double &) const
virtual ~ComPackFlatFloat()
void testMe(size_t, double &)
StatusCode pack(const double, d_ULong &) const
ComPackFlatFloat(const double, const double, size_t)