reduce printf

This commit is contained in:
splitPoleDAQ 2024-01-23 15:26:35 -05:00
parent 06f9191095
commit 9398bfbe16
3 changed files with 4 additions and 4 deletions

View File

@ -346,7 +346,7 @@ int main(int argc, char **argv) {
hasEvent = false;
}
printf("hit Porcessed %u/%u....%.2f%%\n\033[A\r", hitProcessed, totHitCount, hitProcessed*100./totHitCount);
if( hitProcessed % 10000 == 0 ) printf("hit Porcessed %u/%u hit....%.2f%%\n\033[A\r", hitProcessed, totHitCount, hitProcessed*100./totHitCount);
///===================== find the next first timestamp
t0 = -1;

View File

@ -354,7 +354,7 @@ inline void FSUReader::ScanNumBlock(int verbose, uShort saveData){
blockPos.push_back(filePos);
blockTimeStamp.push_back(data->aggTime);
blockID ++;
if(verbose) printf("%u, %.2f%% %u/%lu\n\033[A\r", blockID, filePos*100./inFileSize, filePos, inFileSize);
if(verbose && blockID % 10000 == 0) printf("%u, %.2f%% %u/%lu\n\033[A\r", blockID, filePos*100./inFileSize, filePos, inFileSize);
}
totNumBlock = blockID;
@ -417,7 +417,7 @@ inline std::string FSUReader::SaveHit2NewFile(std::string saveFolder){
for( ulong i = 0; i < hitCount; i++){
printf("Saving %lu/%lu (%.2f%%)\n\033[A\r", i, hitCount, i*100./hitCount);
if( i% 10000 == 0 ) printf("Saving %lu/%lu Hit (%.2f%%)\n\033[A\r", i, hitCount, i*100./hitCount);
fwrite( &(hit[i].sn), 2, 1, outFile);
fwrite( &(hit[i].ch), 1, 1, outFile);

View File

@ -206,7 +206,7 @@ inline void FSUTSReader::ScanFile(int verbose){
if(verbose > 1 ) printf("hitIndex : %u, Pos : %u - %u\n" , hitIndex, hitStartPos[hitIndex], hitStartPos[hitIndex+1]);
if(verbose) printf(" %u, %.2f%% %u/%lu\n\033[A\r", hitIndex, filePos*100./inFileSize, filePos, inFileSize);
if(verbose) printf(" %u, %.2f%% %u/%lu byte \n\033[A\r", hitIndex, filePos*100./inFileSize, filePos, inFileSize);
}
hitCount = hitIndex + 1;