AddTask added
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Aug 2012 17:52:08 +0000 (17:52 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Aug 2012 17:52:08 +0000 (17:52 +0000)
PWGGA/PHOSTasks/PHOS_PbPb/AddTaskPHOSPi0Flow.C [new file with mode: 0644]
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.cxx
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.h

diff --git a/PWGGA/PHOSTasks/PHOS_PbPb/AddTaskPHOSPi0Flow.C b/PWGGA/PHOSTasks/PHOS_PbPb/AddTaskPHOSPi0Flow.C
new file mode 100644 (file)
index 0000000..0c60148
--- /dev/null
@@ -0,0 +1,44 @@
+AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow (char* fname="PHOSPi0Flow.root",
+                                            char* contname=NULL)
+{
+  //Add a task AliAnalysisTaskPi0Flow to the analysis train
+  //Author: Henrik Qvigstad
+  /* $Id$ */
+
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+  if (!mgr) {
+    ::Error("AddTaskPHOSPi0Flow", "No analysis manager to connect to");
+    return NULL;
+  }
+  
+  if (!mgr->GetInputEventHandler()) {
+    ::Error("AddTaskPHOSPi0Flow", "This task requires an input event handler");
+    return NULL;
+  }
+
+  AliAnalysisTaskPi0Flow* task = new AliAnalysisTaskPi0Flow("PHOSPi0Flow");
+  // Reduce binning for reduece memory footprint
+  // TODO: 
+  const int kNEdges = 4;
+  Double_t cbin[kNEdges] = {0., 10., 40., 80.};
+  TArrayD tbin(kNEdges, cbin);
+  task->SetCentralityBinning(tbin);
+  //task->SetEventMixingRPBinning(9);
+  //task->SetMixingArraysLength(10);
+  
+  mgr->AddTask(task);
+
+  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
+
+  // container output into particular file
+  if (fname && contname)
+    mgr->ConnectOutput(task, 1, mgr->CreateContainer(contname,TList::Class(), AliAnalysisManager::kOutputContainer, fname));
+  
+  // container output into common file
+  if (!fname) {
+    if (!contname) contname = "PHOSPi0FlowResults";
+    mgr->ConnectOutput(task, 1, mgr->CreateContainer(contname,TList::Class(), AliAnalysisManager::kOutputContainer, mgr->GetCommonFileName()));                       
+  }
+  
+  return task;
+}
index 7be0e96..ac42249 100644 (file)
@@ -42,6 +42,7 @@
 // Authors : Dmitri Peressounko
 // Date    : 28.05.2011
 // Modified: 03.08.2012 Henrik Qvigstad
+/* $Id$ */
 
 ClassImp(AliAnalysisTaskPi0Flow);
 
index 35abd24..fe891b8 100644 (file)
@@ -5,6 +5,7 @@
 // Authors : Dmitri Peressounko
 // Date    : 28.05.2011
 // Modified: 03.08.2012 Henrik Qvigstad
+/* $Id$ */
 
 class TObjArray;
 class TH1F;