Check the status of the command pipe, it might be 0x0 if the process cannot allocate...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Nov 2008 18:00:42 +0000 (18:00 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Nov 2008 18:00:42 +0000 (18:00 +0000)
STEER/AliSimulation.cxx

index 197e090..79a1937 100644 (file)
@@ -1261,6 +1261,11 @@ Bool_t AliSimulation::ConvertRawFilesToDate(const char* dateFileName,
          dateFileName, runLoader->GetNumberOfEvents(),runLoader->GetHeader()->GetRun());
   FILE* pipe = gSystem->OpenPipe(command, "w");
 
+  if (!pipe) {
+    AliError(Form("Cannot execute command: %s",command));
+    return kFALSE;
+  }
+
   Int_t selEvents = 0;
   for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {