]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/macros/AddTaskCopyESD.C
Macro of user defined Physics Selection OADB Objects for the pA run
[u/mrichter/AliRoot.git] / ANALYSIS / macros / AddTaskCopyESD.C
CommitLineData
a9253433 1//=============================================================================
2//
3// *** AddTaskCopyESD.C ***
4//
5// This macro initialize a complete AnalysisTask object for Copying ESD.
6//
7//=============================================================================
8
9AliAnalysisTaskCopyESD *AddTaskCopyESD()
10{
11
12 // pointer to the analysis manager
13 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
14 if (!mgr) {
15 Error("AddTaskTOFCalib", "No analysis manager to connect to.");
16 return NULL;
17 }
18
19 // check the input handler
20 if (!mgr->GetInputEventHandler()) {
21 ::Error("AddTask", "This task requires an input event handler");
22 return NULL;
23 }
24 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
25
26 // create the task
27 AliAnalysisTaskCopyESD *copy = new AliAnalysisTaskCopyESD("ESD copying task");
28 mgr->AddTask(copy);
29
30 // connecting the input/output containers
31 AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
32 AliAnalysisDataContainer *coutput0 = mgr->GetCommonOutputContainer();
33
34 mgr->ConnectInput (copy, 0, cinput0 );
35 mgr->ConnectOutput(copy, 0, coutput0);
36
37 return copy;
38}