]>
Commit | Line | Data |
---|---|---|
9a8f3aee | 1 | AliAnalysisTaskExtractPerformanceCascade *AddTaskExtractPerformanceCascade( Bool_t lSwitchIsNuclear = kFALSE, |
2213f6fc | 2 | Bool_t lSwitchINT7 = kFALSE, |
76029adc | 3 | const TString lMasterJobSessionFlag = "") |
4 | { | |
5 | // Creates, configures and attaches to the train a cascades check task. | |
6 | // Get the pointer to the existing analysis manager via the static access method. | |
7 | //============================================================================== | |
8 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
9 | if (!mgr) { | |
10 | ::Error("AddTaskExtractPerformanceCascade", "No analysis manager to connect to."); | |
11 | return NULL; | |
12 | } | |
13 | ||
14 | // Check the analysis type using the event handlers connected to the analysis manager. | |
15 | //============================================================================== | |
16 | if (!mgr->GetInputEventHandler()) { | |
17 | ::Error("AddTaskExtractPerformanceCascade", "This task requires an input event handler"); | |
18 | return NULL; | |
19 | } | |
20 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
21 | ||
22 | // Create and configure the task | |
23 | AliAnalysisTaskExtractPerformanceCascade *taskextractperformance = new AliAnalysisTaskExtractPerformanceCascade("taskextractperformance"); | |
24 | ||
25 | //Configuration | |
26 | taskextractperformance -> SetIsNuclear ( lSwitchIsNuclear ); | |
2213f6fc | 27 | taskextractperformance -> SetINT7Trigger ( lSwitchINT7 ); |
76029adc | 28 | |
29 | mgr->AddTask(taskextractperformance); | |
30 | ||
31 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); | |
32 | ||
33 | outputFileName += ":PWGLFExtractPerformanceCascade"; | |
34 | //if (lSwitchIsNuclear) outputFileName += "_AA"; | |
35 | outputFileName += "_PP"; | |
36 | if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC"; | |
37 | //if(lMasterJobSessionFlag.Length()) outputFileName += lMasterJobSessionFlag.Data(); | |
38 | ||
39 | Printf("Set OutputFileName : \n %s\n", outputFileName.Data() ); | |
40 | ||
41 | AliAnalysisDataContainer *coutputList = mgr->CreateContainer("clistMC", | |
42 | TList::Class(), | |
43 | AliAnalysisManager::kOutputContainer, | |
44 | outputFileName ); | |
45 | AliAnalysisDataContainer *coutputTreeCascade = mgr->CreateContainer("cTreeCascadeMC", | |
46 | TTree::Class(), | |
47 | AliAnalysisManager::kOutputContainer, | |
48 | outputFileName ); | |
49 | ||
50 | //This one you should merge in file-resident ways... | |
51 | coutputTreeCascade->SetSpecialOutput(); | |
52 | ||
53 | //Recommendation: Tree as a single output slot | |
54 | mgr->ConnectInput( taskextractperformance, 0, mgr->GetCommonInputContainer()); | |
55 | mgr->ConnectOutput(taskextractperformance, 1, coutputList); | |
56 | mgr->ConnectOutput(taskextractperformance, 2, coutputTreeCascade); | |
57 | ||
58 | return taskextractperformance; | |
59 | } |