]>
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"); | |
20 | AliLog::SetClassDebugLevel("AliAnalysisTaskVertexESD",10); | |
21 | // Add to the manager | |
22 | mgr->AddTask(taskVtxESD); | |
23 | ||
24 | // | |
25 | // Create containers for input/output | |
26 | AliAnalysisDataContainer *cInputVtxESD = mgr->CreateContainer("cInputVtxESD",TChain::Class(),AliAnalysisManager::kInputContainer); | |
27 | ||
b583315d | 28 | AliAnalysisDataContainer *cOutputVtxESD = mgr->CreateContainer("cOutputVtxESD",TList::Class(),AliAnalysisManager::kOutputContainer,"Vertex.Performance.root"); |
388ca814 | 29 | |
30 | ||
31 | // Attach input | |
32 | mgr->ConnectInput(taskVtxESD,0,mgr->GetCommonInputContainer()); | |
33 | // Attach output | |
34 | mgr->ConnectOutput(taskVtxESD,0,cOutputVtxESD); | |
35 | ||
36 | return taskVtxESD; | |
37 | } |