]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisTaskME.cxx
Fix bug in building local list of valid files.
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskME.cxx
index 45d133e79a5341ae25885dc2f710e21d5344576a..6900da35b982c8d917a05f235d978173b20ef6cb 100644 (file)
@@ -32,7 +32,7 @@
 #include "AliLog.h"
 
 
-ClassImp(AliAnalysisTaskME);
+ClassImp(AliAnalysisTaskME)
 
 ////////////////////////////////////////////////////////////////////////
 
@@ -87,14 +87,16 @@ AliAnalysisTaskME::AliAnalysisTaskME(const AliAnalysisTaskME& obj):
 AliAnalysisTaskME& AliAnalysisTaskME::operator=(const AliAnalysisTaskME& other)
 {
 // Assignment
-    AliAnalysisTask::operator=(other);
-    fDebug           = other.fDebug;
-    fEntry           = other.fEntry;
-    fFreshBufferOnly = other.fFreshBufferOnly;
-    fInputHandler    = other.fInputHandler;
-    fOutputAOD       = other.fOutputAOD;
-    fTreeA           = other.fTreeA;    
-    fOfflineTriggerMask = other.fOfflineTriggerMask;
+    if (this != &other) {
+       AliAnalysisTask::operator=(other);
+       fDebug           = other.fDebug;
+       fEntry           = other.fEntry;
+       fFreshBufferOnly = other.fFreshBufferOnly;
+       fInputHandler    = other.fInputHandler;
+       fOutputAOD       = other.fOutputAOD;
+       fTreeA           = other.fTreeA;    
+       fOfflineTriggerMask = other.fOfflineTriggerMask;
+    }
     return *this;
 }
 
@@ -155,12 +157,13 @@ void AliAnalysisTaskME::Exec(Option_t* option)
 //
 // Was event selected ? If no event selection mechanism, the event SHOULD be selected (AG)
     UInt_t isSelected = AliVEvent::kAny;
-    if( fInputHandler && fInputHandler->GetEventSelection()) {
+    if(fInputHandler && fInputHandler->GetEventSelection()) {
       // Get the actual offline trigger mask for the event and AND it with the
       // requested mask. If no mask requested select by default the event.
       if (fOfflineTriggerMask)
        isSelected = fOfflineTriggerMask & fInputHandler->IsEventSelected();
     }
+    
     if (!isSelected) { 
        if (fDebug > 1) AliInfo("Event rejected \n");
        fInputHandler->EventSkipped();
@@ -168,7 +171,7 @@ void AliAnalysisTaskME::Exec(Option_t* option)
     }
 // Call the user analysis    
     
-    if (fInputHandler->IsBufferReady()) {
+    if (fInputHandler && fInputHandler->IsBufferReady()) {
        if ((fFreshBufferOnly && fInputHandler->IsFreshBuffer()) || !fFreshBufferOnly)
        {
            if (outputHandler) outputHandler->SetFillAOD(kTRUE);