1 AliAnalysisTaskTaggedPhotons* AddTaskTaggedPhotons(Bool_t bPHOS = kFALSE)
3 // Creates an tagged photons task,
4 // configures it and adds it to the analysis manager.
6 // Get the pointer to the existing analysis manager via the static access method.
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskTaggedPhotons", "No analysis manager to connect to.");
13 // Check the analysis type using the event handlers connected to the analysis manager.
14 if (!mgr->GetInputEventHandler()) {
15 ::Error("AddTaskTaggedPhotons", "This task requires an input event handler");
22 if(bPHOS)det = "PHOS";
25 AliAnalysisTaskTaggedPhotons * task = new AliAnalysisTaskTaggedPhotons(Form("Tagged%s",det.Data()));
31 TString outputfile = AliAnalysisManager::GetCommonFileName();
32 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("tagged%s",det.Data()), TList::Class(),
33 AliAnalysisManager::kOutputContainer, Form("%s:PWG4_tagged%s",outputfile.Data(),det.Data()));
34 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
35 mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
37 mgr->ConnectOutput (task, 1, coutput2 );