1 AliAnalysisTaskExtractPerformanceV0 *AddTaskExtractPerformanceV0( Bool_t lSwitchIsNuclear = kTRUE,
2 Bool_t lSwitchIsLowEnergyPP = kFALSE,
3 Bool_t lSwitchUseOnTheFly = kFALSE,
4 const TString lMasterJobSessionFlag = "")
6 // Creates, configures and attaches to the train a cascades check task.
7 // Get the pointer to the existing analysis manager via the static access method.
8 //==============================================================================
9 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11 ::Error("AddTaskExtractPerformanceV0", "No analysis manager to connect to.");
15 // Check the analysis type using the event handlers connected to the analysis manager.
16 //==============================================================================
17 if (!mgr->GetInputEventHandler()) {
18 ::Error("AddTaskExtractPerformanceV0", "This task requires an input event handler");
21 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
23 // Create and configure the task
24 AliAnalysisTaskExtractPerformanceV0 *taskv0extractperformance = new AliAnalysisTaskExtractPerformanceV0("taskv0extractperformance");
27 taskv0extractperformance -> SetIsNuclear ( lSwitchIsNuclear );
28 taskv0extractperformance -> SetIsLowEnergyPP ( lSwitchIsLowEnergyPP );
29 taskv0extractperformance -> SetUseOnTheFly ( lSwitchUseOnTheFly );
31 mgr->AddTask(taskv0extractperformance);
33 TString outputFileName = AliAnalysisManager::GetCommonFileName();
35 outputFileName += ":PWG2CheckPerformanceLambda";
36 //if (lSwitchIsNuclear) outputFileName += "_AA";
37 outputFileName += "_PP";
38 if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
39 //if(lMasterJobSessionFlag.Length()) outputFileName += lMasterJobSessionFlag.Data();
41 Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
43 AliAnalysisDataContainer *coutputList = mgr->CreateContainer("clistV0MC",
45 AliAnalysisManager::kOutputContainer,
47 AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cTreeMC",
49 AliAnalysisManager::kOutputContainer,
52 //This one you should merge in file-resident ways...
53 coutputTree->SetSpecialOutput();
55 mgr->ConnectInput( taskv0extractperformance, 0, mgr->GetCommonInputContainer());
56 mgr->ConnectOutput(taskv0extractperformance, 1, coutputList);
57 mgr->ConnectOutput(taskv0extractperformance, 2, coutputTree);
59 return taskv0extractperformance;