]>
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) | |
33438b4c | 15 | * @param prodYear Production year |
16 | * @param prodLetter Production letter | |
5c75ba4f | 17 | * |
bd6f5206 | 18 | * @ingroup pwglf_forward_qa_scripts |
5c75ba4f | 19 | */ |
20 | void | |
7fbaa8da | 21 | RunFileQA(const char* input, const char* output=0, |
22 | Int_t prodYear=0, const char* prodLetter="") | |
5c75ba4f | 23 | { |
24 | int ret = 0; | |
7fbaa8da | 25 | gROOT->SetMacroPath(Form(".:%s", gROOT->GetMacroPath())); |
5c75ba4f | 26 | gSystem->Load("libGpad"); |
27 | gSystem->Load("libTree"); | |
28 | ||
29 | gROOT->LoadMacro("QABase.h+g"); | |
30 | gROOT->LoadMacro("QATrender.C+g"); | |
31 | ||
7fbaa8da | 32 | QATrender t(true, false, prodYear, prodLetter[0]); |
5c75ba4f | 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 | // |