00001 // $Id: GetTableByType.C,v 1.2 1999/12/20 15:27:46 fine Exp $ 00002 //======================================================================= 00003 // owner: Valeri Fine (fine@bnl.gov) 00004 // what it does: returns the name('s) of objects byt title (type) 00005 //======================================================================= 00006 00007 St_DataSet *GetTableByType(const Char_t *tableType="dst_point") 00008 { 00009 // returns the name('s) of St_Dataset objects by title 00010 // the St_Table by its type 00011 // For example: 00012 00013 // root4star [2] .x bfc.C(1) 00014 // root4star [4] .x GetTableByType.C("dst_track") 00015 // globtrk : bfc/.make/dst/.data/dst/globtrk 00016 // globtrk2 : bfc/.make/dst/.data/dst/globtrk2 00017 // primtrk : bfc/.make/dst/.data/dst/primtrk 00018 // The above means the bfc - bug full chain has 3 different tables 00019 // of "dst_track" type. All of them are produced by "dst" maker and 00020 // are held by its "dst" dataset. 00021 // 00022 00023 St_DataSetIter next(chain,0); St_DataSet *t = 0; St_DataSet *lastT = 0; 00024 while (t = next()) 00025 if (!strcmp(t->GetTitle(),tableType)){ lastT = t; cout << t->GetName() << " : " << t->Path() << endl; } 00026 return lastT; 00027 } 00028 // $Log: GetTableByType.C,v $ 00029 // Revision 1.2 1999/12/20 15:27:46 fine 00030 // it prints the full path now 00031 //
1.5.9