Fix for checking dependencies of a LEGO module
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Feb 2013 09:19:02 +0000 (09:19 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Feb 2013 09:19:02 +0000 (09:19 +0000)
ANALYSIS/AliAnalysisTaskCfg.cxx

index a915002..bba0499 100644 (file)
@@ -337,7 +337,19 @@ const char *AliAnalysisTaskCfg::GetDependency(Int_t i) const
 Bool_t AliAnalysisTaskCfg::NeedsDependency(const char *dep) const
 {
 // Check if a given library is needed by the module.
-   return fDeps.Contains(dep);
+   Int_t indmin = 0;
+   Int_t indmax = 0;
+   Int_t len = fDeps.Length();
+   TString crt;
+   while (indmax<len) {
+      indmax = fDeps.Index(",",indmin);
+      if (indmax < 0) indmax = len;
+      // indmin points to the beginning of the string while indmax to the end+1
+      crt = fDeps(indmin, indmax-indmin);
+      if (crt==dep) return kTRUE;
+      indmin = indmax+1;
+   }
+   return kFALSE;
 }
 
 //______________________________________________________________________________