45 void Example_read_dst_print_tables(
48 "/afs/rhic.bnl.gov/star/data/samples/gstar.dst.root")
51 gSystem->Load(
"St_base");
52 gSystem->Load(
"StChain");
54 gSystem->Load(
"libglobal_Tables");
55 gSystem->Load(
"libgen_Tables");
56 gSystem->Load(
"libsim_Tables");
57 gSystem->Load(
"libtpc_Tables");
59 gSystem->Load(
"StIOMaker");
60 gSystem->Load(
"StarClassLibrary");
62 cout <<
" .. Example_read_dst_print_tables.C, have loaded libraries " << endl;
73 IOMk->SetBranch(
"*",0,
"0");
76 IOMk->SetBranch(
"dstBranch",0,
"r");
82 for (
int iev=0;iev<nevents; iev++)
85 int iret = chain->
Make();
88 cout << endl << endl <<
89 " !!! Now print info about event # " << iev << endl;
93 Event = chain->GetDataSet(
"dst");
96 if (Event) Event->
ls();
101 TDataSet *ds=chain->GetDataSet(
"dst/globtrk");
105 cout <<
" Now print info about globtrk table " << endl;
115 St_dst_track *glob = (St_dst_track *) globtrkiter.Find(
"globtrk");
139 cout <<
" table header info: name = " << glob->GetName() << endl;
140 cout <<
" table header info: type = " << glob->GetType() << endl;
141 cout <<
" table header info: #rows used = " << glob->GetNRows() << endl;
142 cout <<
" table header info: #rows allocated = " << glob->GetTableSize() << endl;
143 cout <<
" table header info: row size (bytes) = " << glob->GetRowSize() << endl;
144 cout <<
" table header info: #columns = " << glob->GetNumberOfColumns() << endl;
147 dst_track_st *sth = glob->GetTable();
148 cout <<
" globtrk: row0 " << endl;
149 cout <<
" r0 = " << sth->r0 << endl;
150 cout <<
" impact = " << sth->impact << endl;
151 cout <<
" invpt = " << sth->invpt << endl;
152 cout <<
" z0 = " << sth->z0 << endl;
159 cout <<
" globtrk: row1 " << endl;
160 cout <<
" r0 = " << sth->r0 << endl;
161 cout <<
" impact = " << sth->impact << endl;
162 cout <<
" invpt = " << sth->invpt << endl;
163 cout <<
" z0 = " << sth->z0 << endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const