1 AliAnalysisTaskPerformanceStrange *AddTaskPerformanceStrange(Short_t lCollidingSystems=0, /*0 = pp, 1 = AA*/
2 TString lAnalysisCut="no" )
4 // Creates, configures and attaches to the train a strangeness task.
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskPerformanceStrange", "No analysis manager to connect to.");
13 // Check the analysis type using the event handlers connected to the analysis manager.
14 //==============================================================================
15 if (!mgr->GetInputEventHandler()) {
16 ::Error("AddTaskPerformanceStrange", "This task requires an input event handler");
19 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
21 // Create and configure the task
22 AliAnalysisTaskPerformanceStrange *taskperformancestrange = new AliAnalysisTaskPerformanceStrange("TaskPerformanceStrange");
23 taskperformancestrange->SetCollidingSystems(lCollidingSystems);
24 taskperformancestrange->SetAnalysisType(type);
25 taskperformancestrange->SetAnalysisCut(lAnalysisCut);
26 mgr->AddTask(taskperformancestrange);
28 // Create ONLY the output containers for the data produced by the task.
29 // Get and connect other common input/output containers via the manager as below
30 //==============================================================================
31 TString outputFileName = AliAnalysisManager::GetCommonFileName();
32 outputFileName += ":PWG2Strange";
33 if (lCollidingSystems) outputFileName += "_AA";
34 else outputFileName += "_PP";
35 if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
37 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clistPerformanceStrange",
39 AliAnalysisManager::kOutputContainer,
42 mgr->ConnectInput(taskperformancestrange, 0, mgr->GetCommonInputContainer());
43 mgr->ConnectOutput(taskperformancestrange, 1, coutput1);
44 return taskperformancestrange;