end-of-line normalization
[u/mrichter/AliRoot.git] / ANALYSIS / macros / PhysSelQA / PSQA.C
CommitLineData
a65a7e70 1#include "AliPSQA.h"
2
3void PSQA() {
4 //
5 // Produce QA output of physics selection.
6 // Opens selected files for QA, then processes the historgrams necessary,
7 // prints results to a root file and/or text files specified by user.
8 //
9 // Please read the README in case the documentation provided in this macro, .h, and .cxx files is not enough!
10 //
11 //gROOT->LoadMacro("AliPSQA.cxx++g");
12 AliPSQA * QAobject = new AliPSQA; // Initialize relevant object
13 //
14 // configure relevant parameters
15 //
16 Bool_t runFromLocalInputFiles = kTRUE; // if kTRUE, run over either cache or test, otherwise use alien files
17 Bool_t saveTxtFiles = kTRUE;
18 Bool_t saveRootFile = kTRUE;
19 Bool_t drawGraphs = kTRUE;
20 //
21 // settings
22 //
23 QAobject->InitializeRuns("../QAoutputPerPeriod/12d_Pass1/GoodRunList.list");
24 QAobject->SetLocalPath("../InputFilesFromGridPerPeriod/12d_Pass1/"); // Location of files to be processed locally (whether test or cache)
25 QAobject->SetTxtOutDirectory("../QAoutputPerPeriod/12d_Pass1/"); // Path for macro output text files
26 QAobject->SetRootOutDirectory("../QAoutputPerPeriod/12d_Pass1/"); // Path for macro output root files
27 QAobject->SetOutRootName("LHC12d_PSQA.root");
28 //
29 QAobject->SetPSInput(""); // Subdirectory for files to be processed, which pass to use
30 QAobject->SetROOTInput("event_stat.root"); //root file to be processed
31 QAobject->InitializeTriggers("triggerNames.list","triggerMaskChannels.list"); // trig names to be used, plus trig channels (fast vs regular)
32 QAobject->InitializePlots("plots.list"); //Initialize macro with QA plots to be used
33 QAobject->SetTxtFileName("PSQA_"); // This is appended with the run name and .txt
34 //
35 // enable settings
36 //
37 QAobject->SetLocalMode(runFromLocalInputFiles);
38 QAobject->SetSaveQAValToTxtFile(saveTxtFiles);
39 QAobject->SetSaveQAToROOTFile(saveRootFile);
40 //
41 // run and extract
42 //
43 Bool_t goodQACheck = QAobject->ComputeQAPerRun();
44 //
45 // Print a list of the runs that failed, with some hint as to why they failed. Implementation file has comments.
46 //
47 QAobject->GetBadFiles()->Print();
48 //
49 if (goodQACheck == kFALSE){return;} // No plots saved at all, skip altogether the option to plot all canvases.
50 //
51 QAobject->SetDrawAllTGraphs(drawGraphs); // If kTRUE, will draw all TGraphErrors saved in the ROOT file.
52 if (QAobject->GetDrawAllTGraphs()){
53 QAobject->DrawAllTGraphs();
54 }
55
56};
57