]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
o add wrapper to switch between different functions
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Nov 2013 11:42:05 +0000 (11:42 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Nov 2013 11:42:05 +0000 (11:42 +0000)
TPC/Upgrade/macros/AnaDelta.C

index 508d27d6a10c005441da8adcc9e85d9649bff38c..fe42c675eb43c9b2bfba7041b4b88db5dfd62a16 100644 (file)
@@ -31,8 +31,23 @@ TVectorD* MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
 TVectorD* MakeArbitraryBinning(const char* bins);
 
 void DumpHn(THn *hn, TTreeSRedirector &stream);
+void AnaDeltaBase(TString file, TString outDir=".");
+void AnaDeltaTree(TString file, TString outFile="deltas_tree.root");
 
-void AnaDelta(TString file, TString outDir=".")
+void AnaDelta(Int_t type, TString file, TString output="")
+{
+  switch (type) {
+    case 0:
+      AnaDeltaBase(file,output);
+      break;
+    case 1:
+      AnaDeltaTree(file,output);
+      break;
+  }
+}
+
+
+void AnaDeltaBase(TString file, TString outDir)
 {
   //
   //
@@ -52,8 +67,9 @@ void AnaDelta(TString file, TString outDir=".")
 }
 
 
-void AnaDeltaTree(TString file, TString outFile="deltas_tree.root")
+void AnaDeltaTree(TString file, TString outFile)
 {
+  if (outFile.IsNull()) outFile="deltas_tree.root";
   TFile f(file);
   gROOT->cd();
   TTree *t = (TTree*)f.Get("delta");