]>
Commit | Line | Data |
---|---|---|
cc9e563c | 1 | void AddTaskCPQA(Bool_t useMC = kFALSE, Bool_t useTender = kFALSE) { |
2 | ||
3 | Printf("adding task QA for central production\n"); | |
4 | ||
5 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
6 | if(!mgr){ | |
7 | ::Error("AddTaskCPQA", "No analysis manager to connect to."); | |
8 | return NULL; | |
9 | } | |
10 | ||
11 | if(!mgr->GetInputEventHandler()){ | |
12 | ::Error("AddTaskCPQA", "This task requires an input event handler."); | |
13 | return NULL; | |
14 | } | |
15 | ||
16 | ||
17 | ||
18 | AliAnalysisTaskCPQA *task = new AliAnalysisTaskCPQA("QADiffractive"); | |
19 | task->UseMC(useMC); | |
20 | ||
21 | ||
22 | if(useTender) { | |
6a637a06 | 23 | gROOT->LoadMacro("$ALICE_ROOT/TENDER/TenderSupplies/AddTaskTender.C"); |
cc9e563c | 24 | gROOT->LoadMacro("AddTaskTender.C"); |
25 | AliAnalysisTask* tender=0x0; | |
26 | if(!useMC) | |
27 | { | |
28 | tender = AddTaskTender(kTRUE); | |
29 | // tender->SetDebugLevel(10); | |
30 | } | |
31 | else | |
32 | { | |
33 | tender = AddTaskTender(kFALSE); | |
34 | // tender->SetDebugLevel(10); | |
35 | } | |
36 | } | |
37 | ||
38 | ||
39 | if(!useMC && 0) | |
40 | { | |
41 | ||
63b6cbd0 | 42 | gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskPhysicsSelection.C"); |
cc9e563c | 43 | |
44 | AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(useMC); | |
45 | physSelTask->GetPhysicsSelection()->SetUseBXNumbers(kFALSE); | |
46 | ||
47 | if(!useMC){ | |
48 | ||
49 | gROOT->LoadMacro("ConfigurePhysSelection.C"); | |
50 | AliOADBPhysicsSelection * oadb = ConfigurePhysSelection(runNb); | |
51 | ||
52 | AliOADBFillingScheme * fsDefault = 0; | |
53 | ||
54 | physSelTask->GetPhysicsSelection()->SetCustomOADBObjects(oadb,fsDefault); | |
55 | ||
56 | // task->SelectCollisionCandidates(AliVEvent::kUserDefined); | |
57 | } | |
58 | task->SelectCollisionCandidates(AliVEvent::kMB); | |
59 | } | |
60 | ||
61 | TString basefilename = AliAnalysisManager::GetCommonFileName(); | |
62 | ||
63 | AliAnalysisDataContainer *output = mgr->CreateContainer("UDQAClist", TList::Class(), AliAnalysisManager::kOutputContainer, basefilename.Data()); | |
64 | ||
65 | // add our task to the manager | |
66 | mgr->AddTask(task); | |
67 | ||
68 | // finaly connect input and output | |
69 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
70 | mgr->ConnectOutput(task, 1, output); | |
71 | ||
72 | ||
73 | return; | |
74 | } |