]>
Commit | Line | Data |
---|---|---|
27fcc3c7 | 1 | /** |
2 | * @file PeriodQA.C | |
3 | * @author Christian Holm Christensen <cholm@nbi.dk> | |
4 | * @date Thu Nov 17 11:35:08 2011 | |
5 | * | |
6 | * @brief Script to run the QAPlotter over a tree with runs | |
7 | * | |
8 | * @ingroup pwglf_forward_qa_scripts | |
9 | */ | |
10 | class TTree; | |
11 | class TCanvas; | |
12 | ||
13 | /** | |
14 | * Run the QAPlotter | |
15 | * | |
16 | * The QAPlotter is then run over the merged <tt>trending.root</tt> | |
17 | * file and produces two files | |
18 | * | |
19 | * - <tt>index.root</tt> which contains TCanvas objects of the | |
20 | * finished plots. It also contains the TMultiGraph objects painted | |
21 | * in the canvases. | |
22 | * | |
23 | * - <tt>index.pdf</tt> which is a PDF of the TCanvases mentioned | |
24 | * above. | |
25 | * | |
26 | * The QAPlotter will also produce PNGs of each canvas. | |
27 | * | |
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 | * | |
34 | * @ingroup pwglf_forward_qa_scripts | |
35 | */ | |
36 | void | |
37 | PeriodQA(const char* input, | |
38 | const char* type, | |
39 | Int_t year, | |
40 | const char* period, | |
41 | const char* pass) | |
42 | { | |
43 | Bool_t useVar = true; | |
5cd23d34 | 44 | TString fwd(gSystem->Getenv("QA_FWD")); |
45 | TString mac(gROOT->GetMacroPath()); | |
46 | if (!fwd.IsNull()) { | |
47 | mac.Prepend(Form(".:%s:",fwd.Data())); | |
48 | gSystem->AddIncludePath(Form("-I%s", fwd.Data())); | |
49 | } | |
50 | else { | |
51 | fwd = gSystem->Getenv("ANA_SRC"); | |
52 | if (fwd.IsNull()) | |
53 | fwd = "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2"; | |
54 | mac.Prepend(Form(".:%s/qa:%s/corrs:",fwd.Data(), fwd.Data())); | |
55 | gSystem->AddIncludePath(Form("-I%s/qa", fwd.Data())); | |
56 | } | |
57 | gROOT->SetMacroPath(mac); | |
27fcc3c7 | 58 | gSystem->Load("libGpad"); |
59 | gSystem->Load("libTree"); | |
60 | ||
61 | gROOT->LoadMacro("QAPlotter.C+g"); | |
62 | QAPlotter p(type, year, period, pass, useVar); | |
63 | p.AddFile(input); | |
64 | // t.SetOutputName("trending.root"); | |
65 | if (!p.Run()) exit(1); | |
66 | } | |
67 | // | |
68 | // EOF | |
69 | // |