StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dump.C
1  // -------------- E X T R A C T C T B H I T S --------------------
2  St_DataSet *gds=head->GetDataSet("geant"); assert(gds);
3  St_g2t_ctf_hit *g2t_ctb_hit = (St_g2t_ctf_hit *) gds->Find("g2t_ctb_hit");
4  assert(g2t_ctb_hit);
5 
6  printf("All CTB hits=%d\n",(int)g2t_ctb_hit->GetNRows());
7 
8  g2t_ctf_hit_st *ctb_hit = g2t_ctb_hit->GetTable(); assert(ctb_hit);
9  for (i = 0; i < g2t_ctb_hit->GetNRows(); i++,ctb_hit++){
10  float de_mev=ctb_hit->de*1000.;
11  float tof_ns=ctb_hit->tof*1.e9;
12  int id=ctb_hit->volume_id;
13  printf(" CTB hit volume=%d, de=%f, tof=%f\n",id,de_mev,tof_ns);
14  }
15 
virtual TDataSet * Find(const char *path) const
Definition: TDataSet.cxx:362