ROOT logo
/**
 * @file   PeriodQA.C
 * @author Christian Holm Christensen <cholm@nbi.dk>
 * @date   Thu Nov 17 11:35:08 2011
 * 
 * @brief  Script to run the QAPlotter over a tree with runs 
 * 
 * @ingroup pwglf_forward_qa_scripts
 */
class TTree;
class TCanvas;

/** 
 * Run the QAPlotter
 * 
 * The QAPlotter is then run over the merged <tt>trending.root</tt>
 * file and produces two files
 * 
 * - <tt>index.root</tt> which contains TCanvas objects of the
 *   finished plots.  It also contains the TMultiGraph objects painted
 *   in the canvases.
 *
 * - <tt>index.pdf</tt> which is a PDF of the TCanvases mentioned
 *   above.
 * 
 * The QAPlotter will also produce PNGs of each canvas. 
 *
 * @param input  Input file
 * @param type   Data type (data or sim)
 * @param year   Year 
 * @param period Period (e.g., LHC10h)
 * @param pass   Pass (e.g., pass1, cpass1, passMC)
 * 
 * @ingroup pwglf_forward_qa_scripts
 */
void
PeriodQA(const char* input, 
	 const char* type, 
	 Int_t       year, 
	 const char* period,
	 const char* pass) 
{
  Bool_t useVar = true;
  TString fwd(gSystem->Getenv("QA_FWD"));
  TString mac(gROOT->GetMacroPath());
  if (!fwd.IsNull()) {
    mac.Prepend(Form(".:%s:",fwd.Data()));
    gSystem->AddIncludePath(Form("-I%s", fwd.Data()));
  }
  else { 
    fwd = gSystem->Getenv("ANA_SRC");
    if (fwd.IsNull()) 
      fwd = "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2";
    mac.Prepend(Form(".:%s/qa:%s/corrs:",fwd.Data(), fwd.Data()));
    gSystem->AddIncludePath(Form("-I%s/qa", fwd.Data()));
  }
  gROOT->SetMacroPath(mac);
  gSystem->Load("libGpad");
  gSystem->Load("libTree");

  gROOT->LoadMacro("QAPlotter.C+g");
  QAPlotter p(type, year, period, pass, useVar);
  p.AddFile(input);
  // t.SetOutputName("trending.root");
  if (!p.Run()) exit(1);
}
//
// EOF
//
 PeriodQA.C:1
 PeriodQA.C:2
 PeriodQA.C:3
 PeriodQA.C:4
 PeriodQA.C:5
 PeriodQA.C:6
 PeriodQA.C:7
 PeriodQA.C:8
 PeriodQA.C:9
 PeriodQA.C:10
 PeriodQA.C:11
 PeriodQA.C:12
 PeriodQA.C:13
 PeriodQA.C:14
 PeriodQA.C:15
 PeriodQA.C:16
 PeriodQA.C:17
 PeriodQA.C:18
 PeriodQA.C:19
 PeriodQA.C:20
 PeriodQA.C:21
 PeriodQA.C:22
 PeriodQA.C:23
 PeriodQA.C:24
 PeriodQA.C:25
 PeriodQA.C:26
 PeriodQA.C:27
 PeriodQA.C:28
 PeriodQA.C:29
 PeriodQA.C:30
 PeriodQA.C:31
 PeriodQA.C:32
 PeriodQA.C:33
 PeriodQA.C:34
 PeriodQA.C:35
 PeriodQA.C:36
 PeriodQA.C:37
 PeriodQA.C:38
 PeriodQA.C:39
 PeriodQA.C:40
 PeriodQA.C:41
 PeriodQA.C:42
 PeriodQA.C:43
 PeriodQA.C:44
 PeriodQA.C:45
 PeriodQA.C:46
 PeriodQA.C:47
 PeriodQA.C:48
 PeriodQA.C:49
 PeriodQA.C:50
 PeriodQA.C:51
 PeriodQA.C:52
 PeriodQA.C:53
 PeriodQA.C:54
 PeriodQA.C:55
 PeriodQA.C:56
 PeriodQA.C:57
 PeriodQA.C:58
 PeriodQA.C:59
 PeriodQA.C:60
 PeriodQA.C:61
 PeriodQA.C:62
 PeriodQA.C:63
 PeriodQA.C:64
 PeriodQA.C:65
 PeriodQA.C:66
 PeriodQA.C:67
 PeriodQA.C:68
 PeriodQA.C:69
 PeriodQA.C:70