Example #1
0
void PrintManager(TObject *mgrObj) {
   AliAnalysisManager *mgr = (AliAnalysisManager *)mgrObj;
   if (!mgr->InitAnalysis()) return;
   mgr->RunLocalInit();
   mgr->PrintStatus();

   Printf("Analysis Manager : %s '%s'",mgr->GetName(),mgr->GetTitle() );
   TObjArray *a = mgr->GetTasks();
   if (a) Printf("Tasks total : %d",a->GetEntries());
   TIter next(mgr->GetTasks());
   AliAnalysisTask *task;
   while ((task = (AliAnalysisTask *) next())) {
      if (task->IsA() == AliRsnMiniAnalysisTask::Class()) {
         Printf("   Task [RSN-MINI] : %s '%s'",task->GetName(),task->GetTitle());
         AliRsnMiniAnalysisTask *rsnMiniTask = (AliRsnMiniAnalysisTask *)task;
         rsnMiniTask->Print();
      } else if (task->IsA() == AliRsnAnalysisTask::Class()) {
         Printf("   Task [RSN-----] : %s '%s'",task->GetName(),task->GetTitle());
         AliRsnAnalysisTask *rsnTask = (AliRsnAnalysisTask *)task;
         rsnTask->Print();
         AliVEventHandler *ih = mgr->GetInputEventHandler();
         if (ih == AliMultiInputEventHandler::Class()) {
            AliMultiInputEventHandler *ihMulti = (AliMultiInputEventHandler *) ih;
            TIter nextIH(ihMulti->InputEventHandlers());
            AliRsnInputHandler *rsnIH = 0;
            while ((ih = (AliVEventHandler *) nextIH())) {
               if (ih->IsA() == AliRsnInputHandler::Class()) {
                  rsnIH = ih;
                  AliRsnDaughterSelector *ds =  rsnIH->GetSelector();
                  ds->Print();
               }
            }

         }
      } else {
         Printf("   Task [--------] : %s '%s'",task->GetName(),task->GetTitle());
      }

   }

}