Strict checking of external packages names.
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 May 2009 13:14:31 +0000 (13:14 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 May 2009 13:14:31 +0000 (13:14 +0000)
ANALYSIS/AliAnalysisAlien.cxx

index 5b47028..7559fac 100644 (file)
@@ -1138,12 +1138,18 @@ void AliAnalysisAlien::WriteAnalysisMacro()
          Bool_t hasCORRFW = kFALSE;
          while ((obj=next())) {
             pkgname = obj->GetName();
-            if (pkgname.Contains("STEERBase")) hasSTEERBase = kTRUE;
-            if (pkgname.Contains("ESD"))       hasESD = kTRUE;
-            if (pkgname.Contains("AOD"))       hasAOD = kTRUE;
-            if (pkgname.Contains("ANALYSIS") && !pkgname.Contains("ANALYSISalice")) hasANALYSIS = kTRUE;
-            if (pkgname.Contains("ANALYSISalice")) hasANALYSISalice = kTRUE;
-            if (pkgname.Contains("CORRFW"))    hasCORRFW = kTRUE;
+            if (pkgname == "STEERBase" ||
+                pkgname == "STEERBase.par") hasSTEERBase = kTRUE;
+            if (pkgname == "ESD" ||
+                pkgname == "ESD.par")       hasESD = kTRUE;
+            if (pkgname == "AOD" ||
+                pkgname == "AOD.par")       hasAOD = kTRUE;
+            if (pkgname == "ANALYSIS" ||
+                pkgname == "ANALYSIS.par")  hasANALYSIS = kTRUE;
+            if (pkgname == "ANALYSISalice" ||
+                pkgname == "ANALYSISalice.par") hasANALYSISalice = kTRUE;
+            if (pkgname == "CORRFW" ||
+                pkgname == "CORRFW.par")    hasCORRFW = kTRUE;
          }   
          if (!hasSTEERBase) out << "   gSystem->Load(\"libSTEERBase\");" << endl;
          else out << "   if (!SetupPar(\"STEERBase\")) return;" << endl;
@@ -1161,11 +1167,18 @@ void AliAnalysisAlien::WriteAnalysisMacro()
          next.Reset();
          while ((obj=next())) {
             pkgname = obj->GetName();
-            if (pkgname.Contains("STEERBase") ||
-                pkgname.Contains("ESD") ||
-                pkgname.Contains("AOD") ||
-                pkgname.Contains("ANALYSIS") ||
-                pkgname.Contains("CORRFW")) continue;
+            if (pkgname == "STEERBase" ||
+                pkgname == "STEERBase.par" ||
+                pkgname == "ESD" ||
+                pkgname == "ESD.par" ||
+                pkgname == "AOD" ||
+                pkgname == "AOD.par" ||
+                pkgname == "ANALYSIS" ||
+                pkgname == "ANALYSIS.par" ||
+                pkgname == "ANALYSISalice" ||
+                pkgname == "ANALYSISalice.par" ||
+                pkgname == "CORRFW" ||
+                pkgname == "CORRFW.par") continue;
             out << "   if (!SetupPar(\"" << obj->GetName() << "\")) return;" << endl;
          }   
       }