66 int exponent =
int(floor(log10(fabs(
weight)))+1);
67 if ( abs(exponent) > 9 ) {
68 throw GaudiException(
"The MC weight abs value is bigger than 1E9,encoding failed",
"AtlasMcWeight", StatusCode::FAILURE );
74 int e_sign = ( exponent > 0. ? 0 : 1 );
78 snprintf(senc,13,
"%u%u%u",wt_pref, wt_exp, wt_prec);
82 std::cout <<
" AtlasMcWeight::encode weight = " <<
weight << std::endl;
83 printf(
"encode parts =%d %d %d \n", wt_pref, wt_exp, wt_prec);
84 printf(
"encoded string=%s \n", senc);
85 std::cout <<
" weight=" <<
weight << std::endl;
86 std::cout <<
" str weight=" << senc << std::endl;
87 std::cout <<
" exp weight=" << atoll(senc) << std::endl;
88 std::cout <<
" encoded weight=" << wt_encode << std::endl;