882 |
*/ |
*/ |
883 |
Long64_t PamelaDBOperations::OBT(UInt_t obt){ |
Long64_t PamelaDBOperations::OBT(UInt_t obt){ |
884 |
// |
// |
885 |
if ( obt < (pobtfirst/2) && pobtfirst > (numeric_limits<UInt_t>::max()/2) ) return((Long64_t)(obt+numeric_limits<UInt_t>::max())); |
if ( IsDebug() ) printf(" obt conversion: ob is %u obtfirst is %u (numeric_limits<UInt_t>::max()/2) is %u \n",obt,pobtfirst,(UInt_t)(numeric_limits<UInt_t>::max()/2)); |
886 |
|
// |
887 |
|
if ( obt < (pobtfirst/2) && pobtfirst > (numeric_limits<UInt_t>::max()/2) ){ |
888 |
|
if ( IsDebug() ) printf(" rise up obt %lld \n",(obt+numeric_limits<UInt_t>::max())); |
889 |
|
return((Long64_t)(obt+numeric_limits<UInt_t>::max())); |
890 |
|
}; |
891 |
// |
// |
892 |
if ( obt > (pobtfirst*2) && obt > (numeric_limits<UInt_t>::max()/2) ){ |
if ( obt > (pobtfirst*2) && obt > (numeric_limits<UInt_t>::max()/2) ){ |
893 |
|
if ( IsDebug() ) printf(" rise down pktnum %lld \n", (Long64_t)obt-(Long64_t)numeric_limits<UInt_t>::max()); |
894 |
return((Long64_t)obt-(Long64_t)numeric_limits<UInt_t>::max()); |
return((Long64_t)obt-(Long64_t)numeric_limits<UInt_t>::max()); |
895 |
}; |
}; |
896 |
// |
// |
897 |
|
if ( IsDebug() ) printf(" as it is %lld \n",(Long64_t)obt); |
898 |
return((Long64_t)obt); |
return((Long64_t)obt); |
899 |
}; |
}; |
900 |
|
|