fix bug that first hit of the frist event is duplicated, add some display
This commit is contained in:
parent
8ce3b4f274
commit
554247e046
|
@ -47,7 +47,7 @@ inline unsigned int getTime_us(){
|
|||
|
||||
//^================================================
|
||||
///============ time offset
|
||||
std::vector<int64_t> timeOffsetList = {0, 0, 0, 0};
|
||||
std::vector<int64_t> 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 ){
|
||||
|
|
Loading…
Reference in New Issue
Block a user