00001 // $Id: Example_read_table_ntup.C,v 1.2 2000/04/12 16:13:40 kathy Exp $ 00002 // $Log: Example_read_table_ntup.C,v $ 00003 // Revision 1.2 2000/04/12 16:13:40 kathy 00004 // have changed so that macro loads only table libraries needed instead of all table libraries 00005 // 00006 // Revision 1.1 2000/01/21 18:20:46 kathy 00007 // now have macro that writes a table-based ntuple and another that reads the ntuple back in and draws from it 00008 // 00009 // 00010 //======================================================================= 00011 // owner: Kathy Turner 00012 // what it does: 00013 // - read a root table ntuple made from Example_read_dst_write_table_ntup.C 00014 // - make plots 00015 // 00016 // NOTE: the NtupName is the NAME of the table that's on the ntuple! 00017 //======================================================================= 00018 00019 void Example_read_table_ntup( 00020 const Char_t *NtupFile="globtrk_ntup.root", 00021 const Char_t *NtupName="globtrk") 00022 { 00023 00024 cout << " Input ntup file = " << NtupFile << endl; 00025 cout << " Input ntup name = " << NtupName << endl; 00026 00027 gSystem->Load("StUtilities"); 00028 gSystem->Load("StAnalysisUtilities"); 00029 00030 f1 = new TFile(NtupFile); 00031 00032 //cout << "List file" << endl; 00033 f1.ls(); 00034 00035 //cout << "Print file" << endl; 00036 f1.Print(); 00037 00038 //cout << "Print ntup" << endl; 00039 //globtrk->Print(); 00040 00041 globtrk->Draw("x_first0:x_first1"); 00042 00043 globtrk->Draw("x_first0:x_first1","n_point<50 && n_fit_point<40"); 00044 00045 f1.Close(); 00046 } 00047 00048 00049 00050
1.5.9