本文整理汇总了C++中TStopwatch::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ TStopwatch::Delete方法的具体用法?C++ TStopwatch::Delete怎么用?C++ TStopwatch::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStopwatch
的用法示例。
在下文中一共展示了TStopwatch::Delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
cout << "Opened output file " << ctrl->outputFileName.Data() << endl;
}
} else {
generalOut = NULL;
}
/* Reset variables needed for unpacking, histogramming, etc. */
cnt->ResetRunCounters();
Int_t TSerrors = 0;
long long int currTS = 0; long long int lastTS = 0;
Int_t remaining = 0;
/********************************************************/
/* THE MAIN EVENT -- SORTING LOOP */
/********************************************************/
/* Loop over file, reading data, and building events... */
while (!gotsignal) {
if (ctrl->pgh == 2) {
gHeader.type = DECOMP;
remaining = GetGRETINA(inf, generalOut, gBuf, sizeof(gBuf), gHeader.type, 0, ctrl, cnt);
gHeader.timestamp = gMode2.timestamp;
} else if (ctrl->pgh == 3) {
gHeader.type = RAW;
remaining = GetGRETINA(inf, generalOut, gBuf, sizeof(gBuf), gHeader.type, 0, ctrl, cnt);
gHeader.timestamp = gMode3.led_timestamp;
}
/* Check against timestamps in file being out of order... */
if (gHeader.timestamp < lastTS) {
if (!ctrl->suppressTS)
cout << "TS out of order : lastTS " << lastTS << " current "
<< gHeader.timestamp << endl;
TSerrors++;
}
lastTS = gHeader.timestamp;
if ( (gHeader.timestamp != 0) && (currTS == 0) ) {
currTS = gHeader.timestamp;
}
if (cnt->bytes_read_since_last_time > 2*1024*1024) {
cerr << "Processing " << cnt->bytes_read/(1024*1024) << " MB" <<"\r";
cnt->MBread+=2;
cnt->bytes_read_since_last_time = 0;
}
/**********************************************************/
/* More GRETINA information before another global header. */
/**********************************************************/
while (remaining && !gotsignal) {
remaining = GetGRETINA(inf, generalOut, gBuf, sizeof(gBuf), gHeader.type,
remaining, ctrl, cnt);
if (ctrl->pgh == 2) { gHeader.timestamp = gMode2.timestamp; }
else if (ctrl->pgh == 3) { gHeader.timestamp = gMode3.led_timestamp; }
if (cnt->bytes_read_since_last_time > 2*1024*1024) {
cerr << "Processing " << cnt->bytes_read/(1024*1024) << " MB" << "\r";
cnt->MBread+=2;
cnt->bytes_read_since_last_time = 0;
}
} /* end of ' while (remaining) ' */
} /* End of "while we still have data and no interrupt signal" */
timer.Stop();
cout << "\n CPU time: " << timer.CpuTime() << "\tReal time: " << timer.RealTime() << endl;
cout << " Average processing speed: " << (cnt->bytes_read/(1024*1024))/timer.RealTime()
<< "MB/s -- File size was " << cnt->bytes_read/(1024*1024) << " MB \n" << endl;
cnt->PrintRunStatistics(ctrl->pgh, ctrl->withWAVE, ctrl->superPulse, ctrl->analyze2AND3);
cnt->ResetRunCounters();
} /* End of iterating over different run # */
if (ctrl->outputON) {
cout << endl;
cout << "Closing output file...";
fclose(generalOut);
cout << "Done. " << endl;
}
/* Declare victory!!! */
cout << endl;
timer.Delete();
cout << "We finished without crashing!! Yay us! :)" << endl;
cout << endl;
return 1;
}