new option for tests in alifakedisplay
[u/mrichter/AliRoot.git] / T0 / vertex.C
CommitLineData
dc7ca31d 1void VertexMaker(Int_t evNumber=1)
2{
3
4 // Dynamically link some shared libs
5 if (gClassTable->GetID("AliRun") < 0) {
6 gROOT->LoadMacro("loadlibs.C");
7 loadlibs();
8 }
9
10 // Connect the Root Galice file containing Geometry, Kine and Hits
11 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
12 if (!file) file = new TFile("galice.root","UPDATE");
13
14 // Get AliRun object from file or create it if not on file
15 if (!gAlice) {
16 gAlice = (AliRun*)file->Get("gAlice");
17 if (gAlice) printf("AliRun object found on file\n");
18 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
19 }
20
21
22 vertex= new AliT0vertex();
23 TBranch *bRec=0;
24
25
26 // Event ------------------------- LOOP
27 for (j=0; j<evNumber; j++){
28 vertex->Reconstruct(j);
29 }
30 file->Write();
31 file->Close();
32
33} // end of macro
34
35
36
37