]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.cxx
Check the status of the command pipe, it might be 0x0 if the process cannot allocate...
[u/mrichter/AliRoot.git] / STEER / AliSimulation.cxx
index 9ad6ad5059f5d7cc3320c284970fb6cb271b492c..79a19372f23cb7d4f8a63277f58d5756741b8561 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++) {
 
@@ -1924,6 +1929,7 @@ void AliSimulation::WriteGRPEntry()
     TString target;
     gen->GetTarget(target,a,z);
     TString beamType = projectile + "-" + target;
+    beamType.ReplaceAll(" ","");
     if (!beamType.CompareTo("-")) {
 
        grpObj->SetBeamType("UNKNOWN");
@@ -1989,7 +1995,7 @@ void AliSimulation::WriteGRPEntry()
   // Now store the entry in OCDB
   AliCDBManager* man = AliCDBManager::Instance();
 
-  AliCDBId id("GRP/GRP/Data", man->GetRun(), man->GetRun());
+  AliCDBId id("GRP/GRP/Data", man->GetRun(), man->GetRun(), 1, 1);
   AliCDBMetaData *metadata= new AliCDBMetaData();
 
   metadata->SetResponsible("alice-off@cern.ch");