]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/FMDReconstructor.C
Transition to NewIO
[u/mrichter/AliRoot.git] / FMD / FMDReconstructor.C
index 6151f0e7651f6d43ed8dd42452aea8d6ec58b088..952e13e0200f09a8edd18d0d17a184229c6bc0b0 100644 (file)
@@ -9,9 +9,24 @@ void FMDReconstructor (Int_t evNumber=1)
     cout << "SPLIT" << endl;
   else
     cout << "NO SPLIT" << endl ;
-  TFile * f = new TFile("galice.root","UPDATE");
-  gAlice = (AliRun*) f->Get("gAlice") ;
+    
+  
+  
+  //TFile * f = new TFile("galice.root","UPDATE");
+  //gAlice = (AliRun*) f->Get("gAlice") ;
+  
+  AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::fgkDefaultEventFolderName,"read");
+  if (rl == 0x0)
+   {
+     cerr<<"Can not open session for file galice.root\n";
+     return;
+   }
+
+  rl->LoadgAlice();
+  gAlice = rl->GetAliRun();
+
   AliFMD* FMD  = (AliFMD *)gAlice->GetDetector("FMD");
-  gAlice->RunReco("FMD") ;
+
+  gAlice->RunReco("FMD");
 }