19 #include "daqReader.h"
21 int main(
int argc,
char *argv[])
23 rtsLogOutput(RTS_LOG_STDERR);
32 LOG(ERR,
"Need a filename...");
37 LOG(ERR,
"Error constructing daqReader with %s", argv[1]);
42 LOG(ERR,
"Bad status constructing daqReader with %s",argv[1]);
47 char *mem = reader->get(0,0);
49 LOG(ERR,
"Event %d not valid");
53 if(reader->status == EVP_STAT_EOR) {
54 LOG(NOTE,
"End of run");
58 if(reader->status != EVP_STAT_OK) {
59 LOG(ERR,
"Error on %dth event...");
63 LOG(INFO,
"**** Event %d (file: %d): bytes %d, token %d, FILE %s",reader->seq, reader->event_number,reader->bytes,
64 reader->token,(
int)reader->file_name) ;
66 LOG(NOTE,
"**** Event %d: bytes %d, token %d, trg_cmd %d, FILE %s",reader->event_number,reader->bytes,
67 reader->token,reader->trgcmd,(
int)reader->file_name) ;
73 stime = ctime((
long int *)&reader->evt_time) ;
74 *(stime+strlen(stime)-1) = 0 ;
76 LOG(NOTE,
" Trigger Word 0x%02X, time %u (%s), daqbits 0x%04X, evpgroups 0x%04X",reader->trgword,reader->evt_time,(
int)stime,reader->daqbits,reader->evpgroups) ;