]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliConfig.cxx
coverity warnings 15388 10083 10082 fixed
[u/mrichter/AliRoot.git] / STEER / AliConfig.cxx
index 1239d4f7db44cba5c2a711cdbee7e7e86f442b95..d022a8fd1c7bf6b4f983dee23a4c6508a5060061 100644 (file)
@@ -390,104 +390,6 @@ Int_t AliConfig::CreateDetectorTasks(const char *name, const char* title)
    return 0;
 }
 
-//____________________________________________________________________________
-void    AliConfig::Add (char *list)
-{
-  // Adds space separated list of objects to the
-  // configuration macro (?)
-  char *path;
-  
-  const char   *confPath = gSystem->Getenv ("ALICE_CONFIG_PATH");
-  if  (confPath) {
-    path = new char[strlen (confPath)+1];
-    strcpy (path, confPath);
-  } else {
-    const char   *alice = gSystem->Getenv ("ALICE_ROOT");
-    path = new char[strlen (alice) + 32];
-    
-    strcpy (path, ".:");
-    if (alice) {
-      strcat (path, alice);
-    }
-    strcat (path, "/macros/config");
-  }
-  
-  char   *token = strtok (path, ":");
-  
-  TList  *dirlist = new TList;
-  
-  while (token != NULL)        
-    {
-      dirlist->Add (new TObjString(token));
-      token = strtok (NULL, ":");
-    }
-  
-  token = strtok (list, " ");
-  
-  while (token != NULL)
-    { 
-      AliInfo(Form("Configuring token=%s",token));
-      
-      TObject *obj;
-      TIter   next (dirlist);
-      TString found = "\0";
-      
-      while ((obj = next ()))
-        {
-          TString dir(obj->GetName());
-          TString apath  = dir + "/" + token;
-          TString macro = apath + ".C";
-          if (!gSystem->AccessPathName (macro.Data())) 
-           {
-            gInterpreter->ExecuteMacro (macro.Data());                            
-            found = "(" + macro + ")";
-            if (macro.Contains("/")) 
-             {
-               TString dirname = gSystem->DirName(macro.Data());
-               TString macroConfigure = dirname + "/Configure.C";
-               if (!gSystem->AccessPathName (macroConfigure.Data()))
-                {
-                  gInterpreter->ExecuteMacro (macroConfigure.Data());                              
-                  found += " => Configured";
-                }                            
-             }
-            break;
-           } 
-          else 
-           {
-            TString macroDefault = apath + "/Default.C";
-            if (!gSystem->AccessPathName (macroDefault.Data()))
-              {
-                gInterpreter->ExecuteMacro (macroDefault.Data());
-                found = "(" + macro + ")";
-                TString macroConfigure = apath + "/Configure.C";
-                if (!gSystem->AccessPathName (macroConfigure.Data()))  
-                  {
-                    gInterpreter->ExecuteMacro (macroConfigure.Data());                                    
-                    found += " => Configured";
-                  }
-                break;                                     
-              }
-           }
-        }
-      
-      if (strlen(found.Data())) 
-        {
-          AliInfo(Form("found=%s  => OK",found.Data()));
-        } 
-      else 
-        {
-          AliError(" => FAILED.");
-          exit(1); 
-        }          
-      
-      token = strtok (NULL," ");
-    }
-  
-  if (dirlist) delete dirlist;
-  
-}
-
 /*****************************************************************************/
 
 TFolder* AliConfig::BuildEventFolder(const char* name,const char* title)
@@ -613,7 +515,7 @@ TFolder* AliConfig::BuildEventFolder(const char* name,const char* title)
   TFolder *configuration = eventfolder->AddFolder(fgkConfigurationFolderName, "Run configuration");
   configuration->AddFolder(fgkFieldFolderName, "Magnetic field maps");
   configuration->AddFolder(fgkGeneratorsFolderName,"list of generator objects");
-  configuration->AddFolder(fgkVirtualMCFolderName,"the Virtual MC");
+  //PH configuration->AddFolder(fgkVirtualMCFolderName,"the Virtual MC");
 
   eventfolder->AddFolder(fgkHeaderFolderName,"MonteCarlo event header");