]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSDigits2RecPoints.C
Copy/paste error fixed (Panos)
[u/mrichter/AliRoot.git] / ITS / AliITSDigits2RecPoints.C
index 962cccc716279f85c2cfc6af0f69b190e273e13f..8241d2a169f885059abf735e3759a800c79efefe 100644 (file)
@@ -1,15 +1,44 @@
-void AliITSDigits2RecPoints(Int_t evNumber1=0,Int_t evNumber2=0, const char *filename="galice.root"){
-    TStopwatch timer;
+#if !defined(__CINT__) || defined(__MAKECINT__)
+
+#include "Riostream.h"
+#include "TClassTable.h"
+#include "TDatime.h"
+#include "TStopwatch.h"
+#include "AliRun.h"
+#include "AliRunDigitizer.h"
+#include "AliITSDigitizer.h"
+#include "AliITS.h"
+#include "AliITSDetType.h"
+#include "AliITSresponseSDD.h"
+#include "AliITSreconstruction.h"
+
+#endif
+#define DEBUG
+
+Int_t AliITSDigits2RecPoints(TString filename="galice.root",TString fileRP=""){
+    // Standard ITS Digits to RecPoints.
 
-    if(gAlice){
-       delete gAlice;
-       gAlice = 0;
-    } // end if gAlice
+    // Dynamically link some shared libs
+    if (gClassTable->GetID("AliRun") < 0) {
+      gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C");
+    }else if (gAlice){
+      delete gAlice->GetRunLoader();
+      delete gAlice;
+      gAlice=0;
+     } // end if
+
+    TStopwatch timer;
+#ifdef DEBUG
     cout << "Creating reconstructed points from digits for the ITS..." << endl;
+#endif
     AliITSreconstruction *itsr = new AliITSreconstruction(filename);
+
     timer.Start();
+    if(!(fileRP.IsNull()))itsr->SetOutputFile(fileRP);
     itsr->Init();
     itsr->Exec(); 
-    timer.Stop(); timer.Print();    
+    timer.Stop(); 
+    timer.Print();
     delete itsr;
+    return 0;
 }