]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/vertexingHF/AliAnalysisTaskSEBkgLikeSignD0.cxx
Use AliAnalysisTaskSE::AODEvent() to read the AOD that has just been produced by...
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSEBkgLikeSignD0.cxx
index 30882069e9ed831acd21cab04b4b4c0a0162bc90..4756692bb42462c53d8375ee7f5f0fe4d86e53b5 100644 (file)
@@ -216,6 +216,10 @@ void AliAnalysisTaskSEBkgLikeSignD0::UserExec(Option_t */*option*/)
   
   AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
 
+  // In case there is an AOD handler writing a standard AOD, use the AOD 
+  // event in memory rather than the input (ESD) event.
+  if (!aod && AODEvent() && IsStandardAOD()) aod = dynamic_cast<AliAODEvent*> (AODEvent());
+
   // load heavy flavour vertices
   TClonesArray *arrayVerticesHF =
     (TClonesArray*)aod->GetList()->FindObject("VerticesHF");