1 AliAnalysisTaskJetServices *AddTaskJetServices()
\r
3 // Get the pointer to the existing analysis manager via the static access method.
\r
4 //==============================================================================
\r
5 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
7 ::Error("AddTaskJetServices", "No analysis manager to connect to.");
\r
11 // Check the analysis type using the event handlers connected to the analysis manager.
\r
12 //==============================================================================
\r
13 if (!mgr->GetInputEventHandler()) {
\r
14 ::Error("AddTaskJetServices", "This task requires an input event handler");
\r
18 TString type = mgr->GetInputEventHandler()->GetDataType();
\r
20 // Create the task and configure it.
\r
21 //===========================================================================
\r
23 AliAnalysisTaskJetServices* pwg4serv = new AliAnalysisTaskJetServices("JetServices");
\r
27 pwg4serv->SetAODInput(kTRUE);
\r
29 mgr->AddTask(pwg4serv);
\r
31 // Create ONLY the output containers for the data produced by the task.
\r
32 // Get and connect other common input/output containers via the manager as below
\r
33 //==============================================================================
\r
34 AliAnalysisDataContainer *coutput1_Serv = mgr->CreateContainer("pwg4serv", TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWG4_services",AliAnalysisManager::GetCommonFileName()));
\r
36 mgr->ConnectInput (pwg4serv, 0, mgr->GetCommonInputContainer());
\r
37 mgr->ConnectOutput (pwg4serv, 0, mgr->GetCommonOutputContainer());
\r
38 mgr->ConnectOutput (pwg4serv, 1, coutput1_Serv );
\r