1 AliAnalysisTaskVZEROEqFactorTask *AddTaskVZEROEqFactorTask( const TString lMasterJobSessionFlag = "")
3 // Creates, configures and attaches to the train a cascades check task.
4 // Get the pointer to the existing analysis manager via the static access method.
5 //==============================================================================
6 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
8 ::Error("AddTaskExtractPerformanceV0", "No analysis manager to connect to.");
12 // Check the analysis type using the event handlers connected to the analysis manager.
13 //==============================================================================
14 if (!mgr->GetInputEventHandler()) {
15 ::Error("AddTaskExtractPerformanceV0", "This task requires an input event handler");
18 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
20 // Create and configure the task
21 AliAnalysisTaskVZEROEqFactorTask *taskVZEROAuxiliary = new AliAnalysisTaskVZEROEqFactorTask("taskVZEROAuxiliary");
23 mgr->AddTask(taskVZEROAuxiliary);
24 TString outputFileName = AliAnalysisManager::GetCommonFileName();
26 outputFileName += ":PWGLF_VZEROEqFactorTask";
27 if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
29 Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
31 AliAnalysisDataContainer *coutputList = mgr->CreateContainer("cList_VZERO",
33 AliAnalysisManager::kOutputContainer,
36 //Recommendation: Tree as a single output slot
37 mgr->ConnectInput( taskVZEROAuxiliary, 0, mgr->GetCommonInputContainer());
38 mgr->ConnectOutput(taskVZEROAuxiliary, 1, coutputList);
40 return taskVZEROAuxiliary;