StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RunTrackMate.C
1 //________________________________________________________________________________
2 void RunTrackMate(Int_t nevents=999,
3  //const char *eventFile1="/star/data46/reco/dAuCombined/ReversedFullField/P04if/2003/055/st_physics_4055005_raw_0010010.event.root",
4  //const char *eventFile2="/star/data46/reco/dAuCombined/ReversedFullField/P04if.ittf/2003/055/st_physics_4055005_raw_0010010.event.root",
5  const char *eventFile1="/star/data07/calib/fisyak/ITTF/Tests/tpt.NoEst/productionHigh_FullField/st_physics_5050060_raw_1010010.event.root",
6  const char *eventFile2="/star/data07/calib/fisyak/ITTF/Tests/ittf.noSvt/productionHigh_FullField/st_physics_5050060_raw_1010010.event.root",
7  const char* fileIndex="TEST",
8  const char* outDir=".")
9 {
10 
11  gROOT->LoadMacro("bfc.C");
12  TString Chain("in,StEvent,nodefault");
13  bfc(-2,Chain.Data(),0,0,0);
14  gSystem->Load("StTrackMateMaker");
15  cout << "Job will run on File: " << eventFile1 << endl;
16  cout << "Corresponding ITTF File: " << eventFile2 << endl;
17  // 1st IOMaker, for tpt file
18  StIOMaker* ioMaker1 = new StIOMaker("IO1","r",eventFile1);//,"bfcTree");
19 // ioMaker1->SetIOMode("r");
20 // ioMaker1->SetBranch("*",0,"0"); //deactivate all branches
21 // ioMaker1->SetBranch("eventBranch",0,"r"); //activate event Branch
22 
23  // 2nd IOMaker, for ittf file
24  StIOMaker* ioMaker2 = new StIOMaker("IO2","r",eventFile2);//,"bfcTree");
25 // ioMaker2->SetIOMode("r");
26 // ioMaker2->SetBranch("*",0,"0"); //deactivate all branches
27 // ioMaker2->SetBranch("eventBranch",0,"r"); //activate event Branch
28 
29  StTrackMateMaker* goodStuff = new StTrackMateMaker;
30  goodStuff->SetFileIndex(fileIndex);
31  goodStuff->SetOutDir(outDir);
32  // chain->SetDEBUG(2);
33  // now execute the chain member functions
34 
35  chain->PrintInfo();
36  Int_t initStat = chain->Init(); // This should call the Init() method in ALL makers
37  if (initStat) chain->Fatal(initStat, "during Init()");
38  if (nevents > 0) chain->EventLoop(1,nevents);
39 }