00001 class StChain;
00002 StChain *chain=0;
00003
00004 int rdMuDst2LcpTree( const char *muDstList="400K.lis",
00005 int maxList=6,
00006 char * wrkDir="./wrkLcpX/",
00007 int off48=0,
00008 int maxEve=3000,
00009 float maxEta=1.0
00010 ){
00011
00012 if (gClassTable->GetID("TTable") < 0) {
00013 gSystem->Load("libTable");
00014 gSystem->Load("libPhysics");
00015 }
00016 printf("Use muDst list= '%s'\n",muDstList);
00017
00018 gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
00019 loadSharedLibraries();
00020 cout << " loading done " << endl;
00021
00022
00023 assert(gSystem->Load("LCP")==0 );
00024
00025
00026
00027 chain = new StChain("StChain");
00028
00029 StMuDbReader* db = StMuDbReader::instance();
00030 muDstMk = new StMuDstMaker(0,0,"",muDstList,"MuDst.root",maxList);
00031
00032
00033
00034 StMuLcp2TreeMaker *myMk = new StMuLcp2TreeMaker("jasEE","MuDst");
00035 myMk->SetOutDir(wrkDir);
00036 myMk->SetOff48(off48);
00037
00038
00039
00040
00041 myMk->SetMaxEta(maxEta);
00042
00043
00044
00045
00046 chain->Init();
00047 chain->ls(3);
00048
00049
00050 int eventCounter=0;
00051
00052 printf(" requested maxEve=%d\n",maxEve);
00053
00054 while ( 1) {
00055 eventCounter++;;
00056 if(eventCounter >maxEve) break;
00057 chain->Clear();
00058 int stat = chain->Make();
00059 if(stat) break;
00060 if(eventCounter%1000) continue;
00061 StMuEvent* e = muDstMk->muDst()->event();
00062
00063 int n = muDstMk->muDst()->primaryTracks()->GetEntries();
00064 printf(".C: eve=%d Nprim=%d\n",eventCounter,n);
00065
00066 }
00067
00068
00069
00070
00071 }
00072
00073
00074
00075
00076
00077
00078
00079