diff --git a/Bin2Root2.cpp b/Bin2Root2.cpp index 44c00e8..ee3f1ea 100644 --- a/Bin2Root2.cpp +++ b/Bin2Root2.cpp @@ -47,7 +47,7 @@ inline unsigned int getTime_us(){ //^================================================ ///============ time offset -std::vector timeOffsetList = {0, 0, 0, 0}; +std::vector timeOffsetList = {0, 0, 0, 0}; // in ps int bufferSize = 5000000; @@ -177,9 +177,12 @@ int ReadBatch(int bufferSize){ } - // printf("\n"); - // printf("hitList A : %zu\n", hitList_A.size()); - // printf("hitList B : %zu\n", hitList_B.size()); + printf("\n"); + unsigned long dtA = (hitList_A.back().TimeStamp - hitList_A.front().TimeStamp)/ 1000; + unsigned long dtB = (hitList_B.back().TimeStamp - hitList_B.front().TimeStamp)/ 1000; + + printf("hitList A | size %zu | timeRange %ld ns = %.3f sec\n", hitList_A.size(), dtA/100, dtA/1e12 ); + printf("hitList B | size %zu | timeRange %ld ns = %.3f sec\n", hitList_B.size(), dtB/100, dtB/1e12 ); return 1; @@ -324,6 +327,7 @@ int main(int argc, char **argv) { if( t0 == -1 ) { t0 = hitList_A[i].TimeStamp; event.push_back(hitList_A[i]); + continue; } if( hitList_A[i].TimeStamp - t0 < timeWindow ){