StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
testReader2.C
1 //******************************************************
2 //*** Chops events out of .daq file
3 //***
4 //*** usage: daqFileChopper fn.daq arglist
5 //***
6 //*** arglist is passed to the function
7 //*** FilterEvent(), which returns true
8 //*** if the event is to be saved
9 //***
10 //*** output goes to standard out...
11 //*****************************************************
12 
13 #include <stdio.h>
14 #include <unistd.h>
15 #include <getopt.h>
16 #include <sys/types.h>
17 #include <stdlib.h>
18 
19 #include <rtsLog.h> // for my LOG() call
20 #include <rtsSystems.h>
21 
22 // this needs to be always included
23 #include <DAQ_READER/daqReader.h>
24 #include <SUNRT/clock.h>
25 
26 int main(int argc, char *argv[])
27 {
28  rtsLogOutput(RTS_LOG_STDERR) ;
29  rtsLogLevel(WARN) ;
30 
31  printf("Hit enter: ");
32  char str[120];
33  scanf("%s",str);
34 
35  for(int i=0;i<1000;i++) {
36 
37  __sync_synchronize();
38 
39  daqReader *rdr = new daqReader("/net/evb01/a/test/st_physics_18156048_raw_3500024.daq");
40 
41  __sync_synchronize();
42  //char *ret = rdr->get(0,EVP_TYPE_ANY);
43 
44 
45  __sync_synchronize();
46  delete rdr;
47  }
48 
49  printf("Hit enter again before delete: ");
50  scanf("%s",str);
51 
52 
53 }