Added possibility to stream selected AOD events to a different AOD file. To do this inside a task:
1. Make sure an AOD handler is connected to the current analysis manager before creating the task.
2. Add in the task constructor or in LocalInit():
AliAODHandler *aodH = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
if (!aodH) Fatal("UserCreateOutputObjects", "No AOD handler. Aborting.");
aodH->AddFilteredAOD("AliAOD.Muons.root", "MuonEvents"); // for example
The pointer to the extension should not be backed-up upon adding the AOD extension, but this can be done in CreateOutputObjects()
3. Check the selection criteria in UserExec(). If fulfilled, select the event:
AliAODExtension *extMuons = aodH->GetFilteredAOD("AliAOD.Muons.root");
extMuons->SelectEvent();