1 AliAnalysisTaskExtractPerformanceV0 *AddTaskExtractPerformanceV0( Bool_t lSwitchIsNuclear = kFALSE,
2 Bool_t lSwitchINT7 = kFALSE,
3 Bool_t lSwitchUseOnTheFly = kFALSE,
4 Bool_t lSwitchTakeAllTracks = kFALSE,
5 const TString lMasterJobSessionFlag = "")
7 // Creates, configures and attaches to the train a cascades check task.
8 // Get the pointer to the existing analysis manager via the static access method.
9 //==============================================================================
10 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
12 ::Error("AddTaskExtractPerformanceV0", "No analysis manager to connect to.");
16 // Check the analysis type using the event handlers connected to the analysis manager.
17 //==============================================================================
18 if (!mgr->GetInputEventHandler()) {
19 ::Error("AddTaskExtractPerformanceV0", "This task requires an input event handler");
22 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
24 // Create and configure the task
25 AliAnalysisTaskExtractPerformanceV0 *taskv0extractperformance = new AliAnalysisTaskExtractPerformanceV0("taskv0extractperformance");
28 taskv0extractperformance -> SetIsNuclear ( lSwitchIsNuclear );
29 taskv0extractperformance -> SetINT7Trigger ( lSwitchINT7 );
30 taskv0extractperformance -> SetUseOnTheFly ( lSwitchUseOnTheFly );
31 taskv0extractperformance -> SetTakeAllTracks ( lSwitchTakeAllTracks );
33 mgr->AddTask(taskv0extractperformance);
35 TString outputFileName = AliAnalysisManager::GetCommonFileName();
37 outputFileName += ":PWGLFExtractPerformanceV0";
38 //if (lSwitchIsNuclear) outputFileName += "_AA";
39 outputFileName += "_PP";
40 if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
41 //if(lMasterJobSessionFlag.Length()) outputFileName += lMasterJobSessionFlag.Data();
43 Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
45 AliAnalysisDataContainer *coutputList = mgr->CreateContainer("clistV0MC",
47 AliAnalysisManager::kOutputContainer,
49 AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cTreeMC",
51 AliAnalysisManager::kOutputContainer,
54 //This one you should merge in file-resident ways...
55 coutputTree->SetSpecialOutput();
57 //Recommendation: Tree as a single output slot
58 mgr->ConnectInput( taskv0extractperformance, 0, mgr->GetCommonInputContainer());
59 mgr->ConnectOutput(taskv0extractperformance, 1, coutputList);
60 mgr->ConnectOutput(taskv0extractperformance, 2, coutputTree);
62 return taskv0extractperformance;