]>
Commit | Line | Data |
---|---|---|
5e8eab11 | 1 | /** |
2 | * @file RunQA.C | |
3 | * @author Christian Holm Christensen <cholm@nbi.dk> | |
4 | * @date Thu Nov 17 11:35:08 2011 | |
5 | * | |
27fcc3c7 | 6 | * @brief Script to run the QATrender over a single run |
5e8eab11 | 7 | * |
bd6f5206 | 8 | * @ingroup pwglf_forward_qa_scripts |
5e8eab11 | 9 | */ |
27fcc3c7 | 10 | class TTree; |
11 | class TCanvas; | |
5e8eab11 | 12 | |
5e8eab11 | 13 | /** |
27fcc3c7 | 14 | * Run the QATrender |
5e8eab11 | 15 | * |
16 | * The QATrender is run over the list of files (runs) to produce the | |
27fcc3c7 | 17 | * file <tt>trending.root</tt> which contains a TTree of QA |
5e8eab11 | 18 | * information - one entry per run. |
19 | * | |
20 | * The QATrender will also produce two files per run: | |
21 | * | |
27fcc3c7 | 22 | * - <tt>index.root</tt> which contains TCanvas objects of |
5e8eab11 | 23 | * the finished plots. |
24 | * | |
27fcc3c7 | 25 | * - <tt>index.pdf</tt> which is a PDF of the TCanvases |
5e8eab11 | 26 | * mentioned above. |
27 | * | |
27fcc3c7 | 28 | * @param input Input file |
29 | * @param type Data type (data or sim) | |
30 | * @param year Year | |
31 | * @param period Period (e.g., LHC10h) | |
32 | * @param pass Pass (e.g., pass1, cpass1, passMC) | |
33 | * @param runNo Run number | |
5e8eab11 | 34 | * |
bd6f5206 | 35 | * @ingroup pwglf_forward_qa_scripts |
5e8eab11 | 36 | */ |
37 | void | |
27fcc3c7 | 38 | RunQA(const char* input, |
39 | const char* type, | |
40 | Int_t year, | |
41 | const char* period, | |
42 | const char* pass, | |
43 | Long_t runNo) | |
5e8eab11 | 44 | { |
27fcc3c7 | 45 | Bool_t keep = true; |
5cd23d34 | 46 | TString fwd(gSystem->Getenv("QA_FWD")); |
47 | TString mac(gROOT->GetMacroPath()); | |
48 | if (!fwd.IsNull()) { | |
49 | mac.Prepend(Form(".:%s:",fwd.Data())); | |
50 | gSystem->AddIncludePath(Form("-I%s", fwd.Data())); | |
51 | } | |
52 | else { | |
53 | fwd = gSystem->Getenv("ANA_SRC"); | |
54 | if (fwd.IsNull()) | |
55 | fwd = "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2"; | |
56 | mac.Prepend(Form(".:%s/qa:%s/corrs:",fwd.Data(), fwd.Data())); | |
57 | gSystem->AddIncludePath(Form("-I%s/qa", fwd.Data())); | |
58 | } | |
59 | gROOT->SetMacroPath(mac); | |
5e8eab11 | 60 | gSystem->Load("libGpad"); |
61 | gSystem->Load("libTree"); | |
62 | ||
9a684059 | 63 | gROOT->LoadMacro("QATrender.C+g"); |
27fcc3c7 | 64 | QATrender t(keep, type, year, period, pass, runNo); |
65 | t.AddFile(input); | |
66 | // t.SetOutputName("trending.root"); | |
67 | if (!t.Run()) exit(1); | |
5e8eab11 | 68 | } |
69 | // | |
70 | // EOF | |
71 | // |