AliPhysics  aaf9c62 (aaf9c62)
DoOne.C
Go to the documentation of this file.
1 namespace {
2  void
3  AddPath(const TString& dir, Bool_t prepend=true)
4  {
5  TString d(gSystem->ExpandPathName(dir.Data()));
6  gSystem->AddIncludePath(Form("-I%s", d.Data()));
7  const char* oldPath = gROOT->GetMacroPath();
8  gROOT->SetMacroPath(Form(".:%s:%s",
9  prepend ? d.Data() : oldPath,
10  prepend ? oldPath : d.Data()));
11  }
12 }
13 
14 void
15 DoOne(UShort_t flags=0x0, const char* var="none", Bool_t forceK=false)
16 {
17  const char* fwd = "$ALICE_PHYSICS/PWGLF/FORWARD/analysis2";
18  if (gSystem->Getenv("ANA_SRC"))
19  fwd = gSystem->Getenv("ANA_SRC");
20  AddPath("$HOME/GraphSysErr");
21  AddPath(TString::Format("%s/gse", fwd), false);
22  AddPath(TString::Format("%s/dndeta/tracklets", fwd));
23  if (!gROOT->GetClass("GraphSysErr"))
24  gROOT->LoadMacro("$HOME/GraphSysErr/GraphSysErr.C+g");
25  if (!gROOT->GetListOfGlobals()->FindObject("kCorrectLoaded"))
26  gROOT->LoadMacro("Correct.C");
27  Correct(flags, "left", var, forceK);
28  Correct(flags, "middle", var, forceK);
29  Correct(flags, "right", var, forceK);
30  if (!gROOT->GetListOfGlobals()->FindObject("kCombineLoaded"))
31  gROOT->LoadMacro("Combine.C+g");
32  Printf("Now combining");
33  Combine(flags, var);
34 }
35 
36 
void DoOne(UShort_t flags=0x0, const char *var="none", Bool_t forceK=false)
Definition: DoOne.C:15
TSystem * gSystem
TH1 * Combine(TH1 *left, TH1 *middle, TH1 *right, TDirectory *out, Bool_t cutAtTwo=true)
Definition: Combine.C:241
const char * fwd
unsigned short UShort_t
Definition: External.C:28
bool Bool_t
Definition: External.C:53
void Correct(UShort_t flags=0x3, const char *side="middle", const char *var="none", Bool_t forceK=false)
Definition: Correct.C:24
void AddPath(const TString &dir, Bool_t before=true)
Definition: ExtractGSEs.C:142
TDirectoryFile * dir