1 AliAnalysisTaskJFSystematics *AddTaskJFSystematics(char *jf1 = "jetsMC",char *jf2 = "jets")
\r
4 // Get the pointer to the existing analysis manager via the static access method.
\r
5 //==============================================================================
\r
6 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
\r
8 ::Error("AddTaskJFSystematics", "No analysis manager to connect to.");
\r
12 // Check the analysis type using the event handlers connected to the analysis manager.
\r
13 //==============================================================================
\r
14 if (!mgr->GetInputEventHandler()) {
\r
15 ::Error("AddTaskJFSystematics", "This task requires an input event handler");
\r
19 // Create the task and configure it.
\r
20 //===========================================================================
\r
22 AliAnalysisTaskJFSystematics* pwg4jfs = new AliAnalysisTaskJFSystematics("Jet Spectrum");
\r
25 pwg4jfs->SetAnalysisType(AliAnalysisTaskJFSystematics::kSysJetOrder);
\r
26 // if(iAODanalysis)pwg4spec->SetAODInput(kTRUE);
\r
27 // pwg4spec->SetDebugLevel(11);
\r
28 pwg4jfs->SetBranchGen(jf1);
\r
29 pwg4jfs->SetBranchRec(jf2);
\r
30 mgr->AddTask(pwg4jfs);
\r
32 // Create ONLY the output containers for the data produced by the task.
\r
33 // Get and connect other common input/output containers via the manager as below
\r
34 //==============================================================================
\r
35 AliAnalysisDataContainer *coutput1_jfs = mgr->CreateContainer(Form("pwg4jfs_%s_%s",jf1,jf2),
\r
36 TList::Class(),AliAnalysisManager::kOutputContainer,
\r
37 Form("%s:PWG4_jfs_%s_%s",AliAnalysisManager::GetCommonFileName(),jf1,jf2));
\r
39 mgr->ConnectInput (pwg4jfs, 0, mgr->GetCommonInputContainer());
\r
40 mgr->ConnectOutput (pwg4jfs, 0, mgr->GetCommonOutputContainer());
\r
41 mgr->ConnectOutput (pwg4jfs, 1, coutput1_jfs );
\r