]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisTaskSE.cxx
Merge remote-tracking branch 'origin/master' into TPCdev
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskSE.cxx
index fa0222293f5bc35980af2ad6394f4502e8c82660..58c62d68f2ad7a7074cad084994717129e52077b 100644 (file)
@@ -177,8 +177,8 @@ void AliAnalysisTaskSE::ConnectInputData(Option_t* /*option*/)
    // Connect input handlers (multi input handler is handled)
     ConnectMultiHandler();
     
-    if (fInputHandler) {
-       if ((fInputHandler->GetTree())->GetBranch("ESDfriend."))
+    if (fInputHandler && fInputHandler->GetTree()) {
+       if (fInputHandler->GetTree()->GetBranch("ESDfriend."))
            fESDfriend = ((AliESDInputHandler*)fInputHandler)->GetESDfriend();
 
        fInputEvent = fInputHandler->GetEvent();
@@ -760,13 +760,7 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
 
 
 // Call the user analysis    
-    if (!fMCEventHandler) {
-       if (isSelected) 
-           UserExec(option);
-    } else {
-       if (isSelected && (fMCEventHandler->InitOk())) 
-           UserExec(option);
-    }
+       if (isSelected) UserExec(option);
     
 // Added protection in case the derived task is not an AOD producer.
     AliAnalysisDataSlot *out0 = GetOutputSlot(0);
@@ -854,9 +848,9 @@ void AliAnalysisTaskSE::ConnectMultiHandler()
    fMultiInputHandler = dynamic_cast<AliMultiInputEventHandler *>(fInputHandler);
    if (fMultiInputHandler) {
       fInputHandler = dynamic_cast<AliInputEventHandler *>(fMultiInputHandler->GetFirstInputEventHandler());
-      fMCEventHandler = dynamic_cast<AliMCEventHandler *>(fMultiInputHandler->GetFirstMCEventHandler());
+      fMCEventHandler = dynamic_cast<AliInputEventHandler *>(fMultiInputHandler->GetFirstMCEventHandler());
    } else { 
-      fMCEventHandler = dynamic_cast<AliMCEventHandler *>((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
+      fMCEventHandler = dynamic_cast<AliInputEventHandler *>((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
    }
    if (fMCEventHandler) fMCEvent = fMCEventHandler->MCEvent();
 }