]>
Commit | Line | Data |
---|---|---|
fab2db3d | 1 | // $Id$ |
2 | ||
4b4fc849 | 3 | AliEmcalSetupTask* AddTaskEmcalSetup( |
6b6a028a | 4 | const char *geop = 0, /*path to geometry folder*/ |
5 | const char *oadp = 0, /*path to OADB folder*/ | |
6 | const char *ocdp = 0, /*path to OCDB (if "uselocal", a copy placed in ALIROOT will be used*/ | |
7 | const char *objs = 0, /*objects for which alignment should be applied*/ | |
8 | const Bool_t noOCDB = 0) /*if true then do not mess with OCDB */ | |
45029468 | 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 | { | |
15 | ::Error("AddTaskEmcalSetup", "No analysis manager to connect to."); | |
16 | return NULL; | |
17 | } | |
18 | ||
19 | // Check the analysis type using the event handlers connected to the analysis manager. | |
20 | //============================================================================== | |
21 | if (!mgr->GetInputEventHandler()) | |
22 | { | |
23 | ::Error("AddTaskEmcalSetup", "This task requires an input event handler"); | |
24 | return NULL; | |
25 | } | |
26 | ||
27 | //------------------------------------------------------- | |
28 | // Init the task and do settings | |
29 | //------------------------------------------------------- | |
45029468 | 30 | AliEmcalSetupTask *eTask = new AliEmcalSetupTask("EmcalSetupTask"); |
6b6a028a | 31 | eTask->SetNoOCDB(noOCDB); |
4b4fc849 | 32 | if (geop) eTask->SetGeoPath(geop); |
33 | if (oadp) eTask->SetOadbPath(oadp); | |
34 | if (ocdp) eTask->SetOcdbPath(ocdp); | |
e8481053 | 35 | if (objs) eTask->SetObjs(objs); |
45029468 | 36 | |
37 | //------------------------------------------------------- | |
38 | // Final settings, pass to manager and set the containers | |
39 | //------------------------------------------------------- | |
40 | ||
41 | mgr->AddTask(eTask); | |
42 | ||
43 | // Create containers for input/output | |
44 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
012dab22 | 45 | mgr->ConnectInput(eTask, 0, cinput1 ); |
45029468 | 46 | return eTask; |
45029468 | 47 | } |