]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Checking the number of tasks also in CheckTasks
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Apr 2011 15:09:51 +0000 (15:09 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Apr 2011 15:09:51 +0000 (15:09 +0000)
ANALYSIS/AliAnalysisManager.cxx

index 71e5049c00689fa9c3deb4d088595c200f15b74b..7e372cca18e64645255547f8a830e2d1f2b8fe4e 100644 (file)
@@ -1438,6 +1438,11 @@ void AliAnalysisManager::CheckBranches(Bool_t load)
 Bool_t AliAnalysisManager::CheckTasks() const
 {
 // Check consistency of tasks.
+   Int_t ntasks = fTasks->GetEntries();
+   if (!ntasks) {
+      Error("CheckTasks", "No tasks connected to the manager. This may be due to forgetting to compile the task or to load their library.");
+      return kFALSE;
+   }
    // Get the pointer to AliAnalysisTaskSE::Class()
    TClass *badptr = (TClass*)gROOT->ProcessLine("AliAnalysisTaskSE::Class()");
    // Loop all tasks to check if their corresponding library was loaded