]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSSDigits2Digits.C
Adding the correction for wrongly simulated pid TOF signal
[u/mrichter/AliRoot.git] / ITS / AliITSSDigits2Digits.C
index 8675dbbaf8b5ba58b78fe1ef513fb996706093e4..7ebdb2e4ada76fdfe832d3f1af261926d822d171 100644 (file)
@@ -1,19 +1,34 @@
-void AliITSSDigits2Digits(const char *filename = "galice.root"){
+void AliITSSD2D(TString inFile, TString outFile);
+
+void AliITSSDigits2Digits(TString inFile= "galice.root", TString outFile = "")
+ {
     // This macro takes SDigits and produces Digits. No merging is done
     // and only one galice.root file is used. 
     // Dynamically link some shared libs 
     TStopwatch timer;
-
-    if(gAlice){
-       delete gAlice;
-       gAlice = 0;
+    if(gAlice)
+     {
+       delete AliRunLoader::Instance();
+       delete gAlice;
+       gAlice = 0x0;
     } // end if gAlice
     cout << "Creating digits from summable digits for the ITS..." << endl;
-    AliRunDigitizer * manager = new AliRunDigitizer(1,1);
-    manager->SetInputStream(0,filename);
-    AliITSDigitizer *dITS  = new AliITSDigitizer(manager);
-    timer.Start();
-    manager->Exec("");
-    timer.Stop(); timer.Print();
-    delete dITS;
+    AliITSSD2D(inFile,outFile);
+    timer.Stop(); 
+    timer.Print();
 }
+
+void AliITSSD2D(TString inFile, TString outFile){
+  AliRunDigitizer * manager = new AliRunDigitizer(1,1);
+  manager->SetInputStream(0,inFile);
+  if(outFile != "")manager->SetOutputFile(outFile);
+  AliITSDigitizer *dITS  = new AliITSDigitizer(manager);
+  manager->Exec("");
+  delete manager;
+}
+
+
+
+
+
+