]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.cxx
Correct overloading of virtual functions in the derived classes (icc)
[u/mrichter/AliRoot.git] / STEER / AliSimulation.cxx
index b0f5284837dc8683036e588066e07a3f903b80f1..676103e31bed903965153c2a9411b35a3a4c977c 100644 (file)
 #include "AliSimulation.h"
 #include "AliVertexGenFile.h"
 
+#include "AliDAQConfig.h"
+
 ClassImp(AliSimulation)
 
 
@@ -403,8 +405,8 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
 
   delete runLoader;
 
-  AliInfo("execution time:");
-  StdoutToAliInfo(stopwatch.Print(););
+  AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
+              stopwatch.RealTime(),stopwatch.CpuTime()));
 
   return kTRUE;
 }
@@ -430,8 +432,8 @@ Bool_t AliSimulation::RunSDigitization(const char* detectors)
       TStopwatch stopwatchDet;
       stopwatchDet.Start();
       det->Hits2SDigits();
-      AliInfo(Form("execution time for %s:", det->GetName()));
-      StdoutToAliInfo(stopwatchDet.Print(););
+      AliInfo(Form("Execution time for %s: R:%.2fs C:%.2fs",
+          det->GetName(),stopwatchDet.RealTime(),stopwatchDet.CpuTime()));
     }
   }
 
@@ -443,8 +445,8 @@ Bool_t AliSimulation::RunSDigitization(const char* detectors)
 
   delete runLoader;
 
-  AliInfo("execution time:");
-  StdoutToAliInfo(stopwatch.Print(););
+  AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
+          stopwatch.RealTime(),stopwatch.CpuTime()));
 
   return kTRUE;
 }
@@ -508,9 +510,9 @@ Bool_t AliSimulation::RunDigitization(const char* detectors,
 
   delete manager;
 
-  AliInfo("execution time:");
-  StdoutToAliInfo(stopwatch.Print(););
-
+  AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
+              stopwatch.RealTime(),stopwatch.CpuTime()));
+  
   return kTRUE;
 }
 
@@ -522,7 +524,7 @@ Bool_t AliSimulation::RunHitsDigitization(const char* detectors)
   TStopwatch stopwatch;
   stopwatch.Start();
 
-  AliRunLoader* runLoader = LoadRun();
+  AliRunLoader* runLoader = LoadRun("READ");
   if (!runLoader) return kFALSE;
 
   TString detStr = detectors;
@@ -543,9 +545,11 @@ Bool_t AliSimulation::RunHitsDigitization(const char* detectors)
   }
 
   delete runLoader;
+  //PH Temporary fix to avoid interference with the PHOS loder/getter
+  //PH The problem has to be solved in more general way 09/06/05
 
-  AliInfo("execution time:");
-  StdoutToAliInfo(stopwatch.Print(););
+  AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
+              stopwatch.RealTime(),stopwatch.CpuTime()));
 
   return kTRUE;
 }
@@ -598,8 +602,8 @@ Bool_t AliSimulation::WriteRawData(const char* detectors,
     }
   }
 
-  AliInfo("execution time:");
-  StdoutToAliInfo(stopwatch.Print(););
+  AliInfo(Form("Execution time: R:%.2fs C:%.2fs",
+              stopwatch.RealTime(),stopwatch.CpuTime()));
 
   return kTRUE;
 }
@@ -653,24 +657,6 @@ Bool_t AliSimulation::ConvertRawFilesToDate(const char* dateFileName)
 {
 // convert raw data DDL files to a DATE file with the program "dateStream"
 
-  // DATE setup
-  const Int_t kNDetectors = 17;
-  const char* kDetectors[kNDetectors] = {"TPC", "ITSSPD", "ITSSDD", "ITSSSD", 
-                                         "TRD", "TOF", "PHOS", "RICH", 
-                                         "EMCAL", "MUON", "MUTR", "ZDC", 
-                                         "PMD", "START", "VZERO", "CRT",
-                                         "FMD"};
-  const Int_t kDetectorDDLs[kNDetectors]   = {216, 20, 12, 16, 
-                                              18, 72, 20, 20, 
-                                              22, 20, 2, 1, 
-                                              6, 1, 1, 1,
-                                              1};
-  const Float_t kDetectorLDCs[kNDetectors] = {46, 2, 2, 1, 
-                                              4, 2, 1, 2, 
-                                              1, 2, 1, 1,
-                                              1, 0.5, 0.5, 1,
-                                              1};
-
   char* path = gSystem->Which(gSystem->Getenv("PATH"), "dateStream");
   if (!path) {
     AliError("the program dateStream was not found");
@@ -710,11 +696,8 @@ Bool_t AliSimulation::ConvertRawFilesToDate(const char* dateFileName)
         if (!file) continue;
         fseek(file, 0, SEEK_END);
         unsigned long size = ftell(file);
-        fseek(file, 0, SEEK_SET);
-        if (!size) {
-          fclose(file);
-          continue;
-        }
+       fclose(file);
+        if (!size) continue;
 
         if (ldcID != prevLDC) {
           fprintf(pipe, " LDC Id %d\n", ldcID);
@@ -739,6 +722,7 @@ Bool_t AliSimulation::ConvertDateToRoot(const char* dateFileName,
 
   // ALIMDC setup
   const Int_t kDBSize = 1000000000;
+  const Int_t kTagDBSize = 1000000000;
   const Bool_t kFilter = kFALSE;
   const Int_t kCompression = 1;
 
@@ -755,9 +739,13 @@ Bool_t AliSimulation::ConvertDateToRoot(const char* dateFileName,
 
   gSystem->Exec("rm -rf /tmp/mdc1");
   gSystem->Exec("rm -rf /tmp/mdc2");
+
+  gSystem->Exec("mkdir /tmp/mdc1");
+  gSystem->Exec("mkdir /tmp/mdc2");
+
   char command[256];
-  sprintf(command, "alimdc %d %d %d %s", 
-         kDBSize, kFilter, kCompression, dateFileName);
+  sprintf(command, "alimdc %d %d %d %d %s", 
+         kDBSize, kTagDBSize, kFilter, kCompression, dateFileName);
   Int_t result = gSystem->Exec(command);
   sprintf(command, "mv /tmp/mdc1/*.root %s", rootFileName);
   gSystem->Exec(command);