00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 TBrowser *b = 0;
00023 class StChain;
00024 StChain *chain=0;
00025 void Load(){
00026 gSystem->Load("St_base");
00027 gSystem->Load("StChain");
00028 gSystem->Load("xdf2root");
00029 gSystem->Load("St_Tables");
00030 gSystem->Load("St_xdfin_Maker");
00031 gSystem->Load("St_TLA_Maker");
00032 }
00033 void dst(const Int_t Nevents=1,
00034 const Char_t *fileinp = "/disk1/star/test/tfs/psc0065_01_40evts_dst.xdf")
00035 {
00036
00037 if (gClassTable->GetID("StChain") < 0) Load();
00038 St_XDFFile *xdf_in = 0;
00039 if (fileinp) xdf_in = new St_XDFFile(fileinp,"r");
00040
00041
00042 StChain *chain = new StChain("dst_ana");
00043
00044
00045 if (xdf_in) {
00046 St_xdfin_Maker *xdfin = new St_xdfin_Maker("xdfin");
00047 xdfin->Init_Done(kTRUE);
00048 chain->SetInputXDFile(xdf_in);
00049 }
00050 chain.PrintInfo();
00051
00052 int iInit = chain.Init();
00053 if (iInit) chain.Fatal(iInit,"on init");
00054 gBenchmark->Start("dst");
00055 Int_t i=0;
00056 for (Int_t i =1; i <= Nevents; i++){
00057 if (chain.Make(i)) break;
00058 if (i != Nevents) chain.Clear();
00059 printf ("===========================================\n");
00060 printf ("=========================================== Done with Event no. %d\n",i);
00061 printf ("===========================================\n");
00062 }
00063 if (Nevents > 1) {
00064 chain.Finish();
00065 delete xdf_in;
00066 gBenchmark->Print("dst");
00067 }
00068 else b = new TBrowser("dst_ana");
00069 }