20int main(
int argc,
char* argv[])
24 cout <<
"You made a mistake... " << endl << endl;
25 cout <<
"Usage: tdecex filename" << endl;
26 cout <<
" where 'filename' is the CODA file"<<endl;
27 cout << endl <<
"... exiting." << endl;
33 cout <<
"ERROR: Cannot open CODA data" << endl;
34 cout <<
"Perhaps you mistyped it" << endl;
35 cout <<
"... exiting." << endl;
45 unsigned NUMEVT=50000;
47 for (; ievent<NUMEVT; ievent++) {
49 ( (ievent <= 1000) && ((ievent%100) == 0) ) ||
50 ( (ievent > 1000) && ((ievent%1000) == 0) ) ) )
51 cout << endl <<
" ---- Event " << ievent <<endl;
55 cout <<
"This is end of file !" << endl;
56 cout <<
"... exiting " << endl;
59 cout << hex <<
"ERROR: codaRread status = " << status << endl;
63 status = evdata->LoadEvent( datafile.
getEvBuffer() );
64 if( status != CodaDecoder::HED_OK && status != CodaDecoder::HED_WARN ) {
65 cerr <<
"ERROR " << status <<
" while decoding event " << ievent
66 <<
". Exiting." << endl;
74 cout << endl <<
" Finished processing " << ievent <<
" events " << endl;