]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/hfe/AliHFEefficiency.cxx
Add fast merging option (Diego)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEefficiency.cxx
index cbf3397691dbee5526a8b85ef715021a92cab64c..30bb40e96919c1de3828780f6bdc9bfab856cf96 100644 (file)
@@ -161,6 +161,10 @@ void AliHFEefficiency::UserExec(Option_t *){
   fFilter->SetRecEvent(fInputEvent);
   if(fMCEvent){
     AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+   if ( ! mcH ) {
+     AliError("Cannot get MC truth event handler");
+     return;
+    }  
     if(mcH &&(!mcH->InitOk())) return;
     if(mcH &&(!mcH->TreeK())) return;
     if(mcH &&(!mcH->TreeTR())) return;