StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
tpcReader.cxx
1 #include <string.h>
2 #include <sys/types.h>
3 #include <assert.h>
4 #include "DAQ_READER/daqReader.h"
5 #include <DAQ_READER/daq_dta.h>
6 #include <DAQ_READER/daq_det.h>
7 #include "tpcReader.h"
8 
9 struct tpc_t tpc;
10 
11 int tpcReader(char *m) { assert(0); }
12 
13 int tpcReader(char *m, int sector ) {
14  if(!m) return -1;
15  daqReader *rrr = (daqReader *)m;
16  daq_dta *dd= rrr->det("tpx")->get("legacy",sector);
17  int size = 0;
18  if (!dd) dd= rrr->det("tpc")->get("legacy",sector);
19  if (dd && (size = dd->iterate())) {
20  memcpy(&tpc,dd->Void,dd->get_size_t());
21  }
22  return dd ? dd->ncontent : 0;
23 }
Definition: daq_tpc.h:22