Error("ExecuteMacro", "The macro did not add any tasks to the manager");
return -1;
}
- Long64_t ptrTask = (Long64_t)mgr->GetTasks()->At(ntasks0);
- if (retval >= ptrTask) {
+// Long64_t ptrTask = (Long64_t)mgr->GetTasks()->At(ntasks0);
+ if (retval) {
TObject::SetBit(AliAnalysisTaskCfg::kLoaded, kTRUE);
fRAddTask = reinterpret_cast<TObject*>(retval);
if (fConfigDeps && dynamic_cast<TObject*>(fRAddTask)) {
for (Int_t i=0; i<nlibs; i++) {
library = GetLibrary(i);
library.Prepend("lib");
- Int_t loaded = strlen(gSystem->GetLibraries(library,"",kFALSE));
+ TString libext = library;
+ libext.Append(".");
+ Int_t loaded = strlen(gSystem->GetLibraries(libext,"",kFALSE));
if (!loaded) loaded = gSystem->Load(library);
if (loaded < 0) {
Error("CheckLoadLibraries", "Cannot load library %s", library.Data());
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;
}
//______________________________________________________________________________