]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity fixes
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Mar 2011 14:56:25 +0000 (14:56 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Mar 2011 14:56:25 +0000 (14:56 +0000)
STEER/AliConfig.cxx
STEER/AliConfig.h
STEER/AliRecoParam.cxx
STEER/AliReconstruction.cxx

index 5b0dfc96f5ef7e96d9d1ce88cc208b4096730a05..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;
-  
-  dirlist.SetOwner(kTRUE);
-  
-  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," ");
-    }
-  
-}
-
 /*****************************************************************************/
 
 TFolder* AliConfig::BuildEventFolder(const char* name,const char* title)
index 65ad5c2c66325e09dd3bb431340e77b7b4cf262e..693916a0a88970ef0b648a742620abf886d17935 100644 (file)
@@ -36,7 +36,6 @@ public:
   virtual ~ AliConfig (); 
 
   void       Add(TDatabasePDG *pdg);
-  void       Add(char *list);
   
   void       Add(AliGenerator *generator,const char* eventfolder = fgkDefaultEventFolderName);
   void       Add (TVirtualMC *mc,const char* eventfolder = fgkDefaultEventFolderName);
index d3d5cafa36f1732b786b50a50fcd924fcf12d731..915aba78b190b845f9e48d6ad45003ffac93f729 100644 (file)
@@ -338,6 +338,7 @@ Bool_t AliRecoParam::AddDetRecoParamArray(Int_t iDet, TObjArray* parArray)
   // for a given detector
   // Basic check on the consistency of the array
   Bool_t defaultFound = kFALSE;
+  if (!parArray) return defaultFound;
   for(Int_t i = 0; i < parArray->GetEntriesFast(); i++) {
     AliDetectorRecoParam *par = (AliDetectorRecoParam*)parArray->At(i);
     if (!par) continue;
index 89cd7e1d60000221b99ef79a90e42ed514d3a66c..3e1c2d2989ef8290296f97f6077eb95812bf610e 100644 (file)
@@ -1700,8 +1700,9 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
 
   if (iEvent >= fRunLoader->GetNumberOfEvents()) {
     fRunLoader->SetEventNumber(iEvent);
-    fRunLoader->GetHeader()->Reset(fRawReader->GetRunNumber(), 
-                                  iEvent, iEvent);
+    if (fRawReader)
+      fRunLoader->GetHeader()->Reset(fRawReader->GetRunNumber(), 
+                                    iEvent, iEvent);
     fRunLoader->TreeE()->Fill();
     if (fRawReader && fRawReader->UseAutoSaveESD())
       fRunLoader->TreeE()->AutoSave("SaveSelf");
@@ -2082,6 +2083,7 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
   }
   if (fRunGlobalQA) {
     AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
+    if (qadm)
       qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
     if (qadm && IsInTasks(AliQAv1::kESDS))
       qadm->Exec(AliQAv1::kESDS, fesd);