]>
Commit | Line | Data |
---|---|---|
388ca814 | 1 | AliAnalysisTaskVertexESD *AddTaskVertexESD() |
2 | { | |
3 | // | |
4 | // Task for validation of the primary vertices (SPD,TPC,ITS+TPC) | |
5 | // | |
6 | // andrea.dainese@pd.infn.it | |
7 | // | |
8 | ||
9 | ||
10 | // Get the pointer to the existing analysis manager via the static access method. | |
11 | //============================================================================== | |
12 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
13 | if (!mgr) { | |
14 | ::Error("AddTask", "No analysis manager to connect to."); | |
15 | return NULL; | |
16 | } | |
17 | ||
18 | // Create the task | |
19 | AliAnalysisTaskVertexESD *taskVtxESD = new AliAnalysisTaskVertexESD("VertexESD"); | |
30b05a14 | 20 | taskVtxESD->SetFillNtupleBeamSpot(kTRUE); |
21 | taskVtxESD->SetRerecoVertexITSTPC(kTRUE); | |
388ca814 | 22 | AliLog::SetClassDebugLevel("AliAnalysisTaskVertexESD",10); |
23 | // Add to the manager | |
24 | mgr->AddTask(taskVtxESD); | |
25 | ||
26 | // | |
27 | // Create containers for input/output | |
28 | AliAnalysisDataContainer *cInputVtxESD = mgr->CreateContainer("cInputVtxESD",TChain::Class(),AliAnalysisManager::kInputContainer); | |
29 | ||
b583315d | 30 | AliAnalysisDataContainer *cOutputVtxESD = mgr->CreateContainer("cOutputVtxESD",TList::Class(),AliAnalysisManager::kOutputContainer,"Vertex.Performance.root"); |
388ca814 | 31 | |
32 | ||
33 | // Attach input | |
34 | mgr->ConnectInput(taskVtxESD,0,mgr->GetCommonInputContainer()); | |
35 | // Attach output | |
f55d78b9 | 36 | mgr->ConnectOutput(taskVtxESD,1,cOutputVtxESD); |
388ca814 | 37 | |
38 | return taskVtxESD; | |
39 | } |