]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection in case there is no output handler.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Jun 2008 07:26:49 +0000 (07:26 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Jun 2008 07:26:49 +0000 (07:26 +0000)
ANALYSIS/AliAnalysisTaskSE.cxx

index c5285f22892ee190729b6e162fdd189f04ab4e99..b3152f0fa00b45e7a8d36e842013f7f11afd8909 100644 (file)
@@ -177,19 +177,21 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
 
     AliAODHandler* handler = (AliAODHandler*) 
        ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
-
-    if (!(handler->IsStandard())            && 
-       (handler->NeedsHeaderReplication()) &&
-       (fgAODHeader))
-    {
-       // Header should be replicated
-       AliAODInputHandler* aodH = dynamic_cast<AliAODInputHandler*>(fInputHandler);
-       if (aodH) {
-           // Input is AOD
-           fgAODHeader =  dynamic_cast<AliAODHeader*>(InputEvent()->GetHeader());
-           fgHeaderCopied = kTRUE;
+    if (handler) {
+       if (!(handler->IsStandard())            && 
+           (handler->NeedsHeaderReplication()) &&
+           (fgAODHeader))
+       {
+           // Header should be replicated
+           AliAODInputHandler* aodH = dynamic_cast<AliAODInputHandler*>(fInputHandler);
+           if (aodH) {
+               // Input is AOD
+               fgAODHeader =  dynamic_cast<AliAODHeader*>(InputEvent()->GetHeader());
+               fgHeaderCopied = kTRUE;
+           }
        }
     }
+    
 
 // Call the user analysis    
     UserExec(option);