]>
Commit | Line | Data |
---|---|---|
5c75ba4f | 1 | /** |
2 | * @file RunFileQA.C | |
3 | * @author Christian Holm Christensen <cholm@master.hehi.nbi.dk> | |
4 | * @date Fri Jan 6 11:43:37 2012 | |
5 | * | |
6 | * @brief Script to run a run QA | |
7 | * | |
bd6f5206 | 8 | * @ingroup pwglf_forward_qa_scripts |
5c75ba4f | 9 | */ |
10 | /** | |
11 | * script to run a run QA. Note, on errors, the ROOT session is terminated | |
12 | * | |
13 | * @param input Input file | |
14 | * @param output Output tree file (optional) | |
15 | * | |
bd6f5206 | 16 | * @ingroup pwglf_forward_qa_scripts |
5c75ba4f | 17 | */ |
18 | void | |
19 | RunFileQA(const char* input, const char* output=0) | |
20 | { | |
21 | int ret = 0; | |
bd6f5206 | 22 | gROOT->SetMacroPath(Form(".:$(ALICE_ROOT)/PWGLF/FORWARD/analysis2/qa:" |
23 | "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2/corrs:%s", | |
5c75ba4f | 24 | gROOT->GetMacroPath())); |
bd6f5206 | 25 | gSystem->AddIncludePath("-I\${ALICE_ROOT}/PWGLF/FORWARD/analysis2/qa"); |
5c75ba4f | 26 | gSystem->Load("libGpad"); |
27 | gSystem->Load("libTree"); | |
28 | ||
29 | gROOT->LoadMacro("QABase.h+g"); | |
30 | gROOT->LoadMacro("QATrender.C+g"); | |
31 | ||
32 | QATrender t(true, false); | |
33 | t.AddFile(input); | |
34 | if (output && output[0] != '\0') | |
35 | t.SetOutputName(output); | |
36 | if (!t.Run()) exit(1); | |
37 | } | |
38 | // | |
39 | // EOF | |
40 | // |