]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/qa/PeriodQA.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / qa / PeriodQA.C
CommitLineData
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 */
10class TTree;
11class 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 */
36void
37PeriodQA(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//