]>
Commit | Line | Data |
---|---|---|
fab2db3d | 1 | // $Id$ |
2 | ||
45029468 | 3 | AliEmcalSetupTask* AddTaskEmcalSetup() |
4 | { | |
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) | |
9 | { | |
10 | ::Error("AddTaskEmcalSetup", "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 | { | |
18 | ::Error("AddTaskEmcalSetup", "This task requires an input event handler"); | |
19 | return NULL; | |
20 | } | |
21 | ||
22 | //------------------------------------------------------- | |
23 | // Init the task and do settings | |
24 | //------------------------------------------------------- | |
45029468 | 25 | AliEmcalSetupTask *eTask = new AliEmcalSetupTask("EmcalSetupTask"); |
26 | ||
27 | //------------------------------------------------------- | |
28 | // Final settings, pass to manager and set the containers | |
29 | //------------------------------------------------------- | |
30 | ||
31 | mgr->AddTask(eTask); | |
32 | ||
33 | // Create containers for input/output | |
34 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
45029468 | 35 | mgr->ConnectInput (eTask, 0, cinput1 ); |
45029468 | 36 | return eTask; |
45029468 | 37 | } |