1 AliAnalysisTaskJFSystematics *AddTaskJFSystematics(char *jf1 = "jets",char *jf2 = "jetsAODMC_UA104")
\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("JF Systematics");
\r
25 pwg4jfs->SetAnalysisType(AliAnalysisTaskJFSystematics::kSysJetOrder);
\r
26 // if(iAODanalysis)pwg4spec->SetAODInput(kTRUE);
\r
27 // pwg4jfs->SetDebugLevel(11);
\r
28 TString type = mgr->GetInputEventHandler()->GetDataType();
\r
30 pwg4jfs->SetAODInput(kTRUE);
\r
33 pwg4jfs->SetBranchGen(jf2);
\r
34 pwg4jfs->SetBranchRec(jf1);
\r
35 mgr->AddTask(pwg4jfs);
\r
37 // Create ONLY the output containers for the data produced by the task.
\r
38 // Get and connect other common input/output containers via the manager as below
\r
39 //==============================================================================
\r
40 AliAnalysisDataContainer *coutput1_jfs = mgr->CreateContainer(Form("pwg4jfs_%s_%s",jf1,jf2),
\r
41 TList::Class(),AliAnalysisManager::kOutputContainer,
\r
42 Form("%s:PWG4_jfs_%s_%s",AliAnalysisManager::GetCommonFileName(),jf1,jf2));
\r
44 mgr->ConnectInput (pwg4jfs, 0, mgr->GetCommonInputContainer());
\r
45 mgr->ConnectOutput (pwg4jfs, 0, mgr->GetCommonOutputContainer());
\r
46 mgr->ConnectOutput (pwg4jfs, 1, coutput1_jfs );
\r