AliPhysics  vAN-20150827 (3e81cbb)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskMonitNorm.C
Go to the documentation of this file.
2 {
3  //
4 
5  //
6 
7 
8  // Get the pointer to the existing analysis manager via the static access method.
9  //==============================================================================
10  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11  if (!mgr) {
12  ::Error("AddTask", "No analysis manager to connect to.");
13  return NULL;
14  }
15 
16  // Create the task
17  AliAnalysisTaskSEMonitNorm *taskMonitNorm = new AliAnalysisTaskSEMonitNorm("Monit_Norm");
18 
19  AliLog::SetClassDebugLevel("AliAnalysisTaskSEMonitNorm",10);
20  // Add to the manager
21  mgr->AddTask(taskMonitNorm);
22 
23  //
24  // Create containers for input/output
25  AliAnalysisDataContainer *cInputVtxESD = mgr->CreateContainer("cInputMonitNorm",TChain::Class(),AliAnalysisManager::kInputContainer);
26 
27  AliAnalysisDataContainer *cOutputList = mgr->CreateContainer("cOutputList", TList::Class(),AliAnalysisManager::kOutputContainer, "AnalysisResults.root");
28 
29  AliAnalysisDataContainer *cOutputMonitNorm1 = mgr->CreateContainer("cOutputMonitNorm1",AliCounterCollection::Class(),AliAnalysisManager::kOutputContainer, "AnalysisResults.root");
30 
31  AliAnalysisDataContainer *cOutputMonitNorm2 = mgr->CreateContainer("cOutputMonitNorm2",AliCounterCollection::Class(),AliAnalysisManager::kOutputContainer, "AnalysisResults.root");
32 
33  AliAnalysisDataContainer *cOutputMonitNorm3 = mgr->CreateContainer("cOutputMonitNorm3",AliCounterCollection::Class(),AliAnalysisManager::kOutputContainer, "AnalysisResults.root");
34 
35  AliAnalysisDataContainer *cOutputMonitNorm4 = mgr->CreateContainer("cOutputMonitNorm4",AliCounterCollection::Class(),AliAnalysisManager::kOutputContainer, "AnalysisResults.root");
36 
37  // Attach input
38  mgr->ConnectInput(taskMonitNorm,0,mgr->GetCommonInputContainer());
39  // Attach output
40  mgr->ConnectOutput(taskMonitNorm,1,cOutputList);
41  mgr->ConnectOutput(taskMonitNorm,2,cOutputMonitNorm1);
42  mgr->ConnectOutput(taskMonitNorm,3,cOutputMonitNorm2);
43  mgr->ConnectOutput(taskMonitNorm,4,cOutputMonitNorm3);
44  mgr->ConnectOutput(taskMonitNorm,5,cOutputMonitNorm4);
45 
46  return taskMonitNorm;
47 }
Class for monitoring of information used for open charm normalization (triggers, candles, ...)
AliAnalysisTaskSEMonitNorm * AddTaskMonitNorm()