Digits and reconstruction with TObject
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Apr 2002 07:23:54 +0000 (07:23 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Apr 2002 07:23:54 +0000 (07:23 +0000)
START/VertexMaker.C [new file with mode: 0644]

diff --git a/START/VertexMaker.C b/START/VertexMaker.C
new file mode 100644 (file)
index 0000000..b0222ff
--- /dev/null
@@ -0,0 +1,37 @@
+void VertexMaker(Int_t evNumber=1) 
+{
+  
+  // Dynamically link some shared libs
+  if (gClassTable->GetID("AliRun") < 0) {
+    gROOT->LoadMacro("loadlibs.C");
+    loadlibs();
+  }
+  
+  // Connect the Root Galice file containing Geometry, Kine and Hits
+    TFile *file =  (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
+    if (!file) file = new TFile("digits.root","UPDATE");
+   
+  // Get AliRun object from file or create it if not on file
+  if (!gAlice) {
+    gAlice = (AliRun*)file->Get("gAlice");
+    if (gAlice) printf("AliRun object found on file\n");
+    if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
+  }
+
+
+  vertex= new AliSTARTvertex();
+  TBranch *bRec=0;
+
+  
+ // Event ------------------------- LOOP  
+  for (Int_t j=0; j<evNumber; j++){
+    vertex->Reconstruct(j);
+  }
+  file->Write();
+  file->Close();
+
+} // end of macro
+
+
+
+