16 #include <sys/types.h>
22 #include <rtsSystems.h>
24 #include <daqFormats.h>
25 #include <SFS/sfs_index.h>
28 #include <DAQ_READER/daqReader.h>
29 #include <DAQ_READER/daq_det.h>
30 #include <DAQ_READER/daq_dta.h>
31 #include <DAQ_BTOW/daq_btow.h>
32 #include <DAQ_L4/daq_l4.h>
33 #include <HLT/HLTFormats.h>
53 printf(
"# tm, x, y, z, n, mb, hlt70, hlt150, hltall\n");
58 daq_dta *dd = rdr->det(
"l4")->get(
"gl3");
65 while (dd && dd->iterate()) {
69 if(strcmp(h->name,
"HLT_EVE") == 0) {
75 if(strcmp(h->name,
"HLT_PT") == 0) {
77 n = pt->nPrimaryTracks;
81 if(firsttm == 0) firsttm = rdr->evt_time;
87 if(rdr->daqbits64 & (1ll << 1)) mb = 1;
88 if(rdr->daqbits64 & (1ll << 12)) hlt70 = 1;
89 if(rdr->daqbits64 & (1ll << 13)) hlt150 = 1;
90 if(rdr->daqbits64 & (1ll << 14)) hltall = 1;
93 if(!mb && !hlt70 && !hlt150 && !hltall)
return;
95 printf(
"%d %f %f %f %d %d %d %d %d\n", rdr->evt_time - firsttm, x, y, z, n, mb, hlt70, hlt150, hltall);
230 LOG(ERR,
"Usage: daqFileHacker filename");
233 int main(
int argc,
char *argv[])
235 rtsLogOutput(RTS_LOG_STDERR) ;
245 for(
int file=1;file<argc;file++) {
253 char *ret = evp->get(0,EVP_TYPE_ANY);
257 LOG(ERR,
"evp status is non-null [0x08X, %d dec]",evp->status,evp->status) ;
263 switch(evp->status) {
267 LOG(OPER,
"Done after scanning %d events (%d bad)",good,bad);
271 LOG(WARN,
"Problem getting event - skipping [good %d, bad %d]",good,bad);
274 LOG(CRIT,
"evp->status CRITICAL (?)") ;
279 if(evp->status == EVP_STAT_EOR) {
280 LOG(INFO,
"Done after scanning %d events (%d bad)",good,bad) ;