]>
Commit | Line | Data |
---|---|---|
97a28f97 | 1 | #available variables: |
2 | # $dataType e.g. data or sim | |
3 | # $year e.g. 2011 | |
4 | # $period e.g. LHC13g | |
5 | # $runNumber e.g. 169123 | |
6 | # $pass e.g. cpass1,pass1,passMC | |
7 | ||
8 | runLevelQA() | |
9 | { | |
10 | qaFile=$1 | |
11 | MACRODIR=$ALICE_ROOT/PWGPP/EMCAL/QA/macros | |
12 | SaveImages=0 | |
13 | ||
14 | suffix=".root" | |
15 | new_suffix=".root" | |
16 | ||
17 | echo "processing $qaFile" | |
18 | echo | |
19 | ||
20 | aliroot -b << EOF | |
21 | gSystem->AddIncludePath("-I${ALICE_ROOT}/include") | |
22 | gSystem->SetBuildDir("./",kTRUE) | |
23 | .L $MACRODIR/CreateEMCALRunQA.C+g | |
24 | CreateEMCALRunQA("$qaFile","$runNumber","$period","$pass",$SaveImages) | |
25 | .q | |
26 | EOF | |
27 | ||
28 | if [[ $qaFile == *outer* ]] | |
29 | then | |
30 | suffix=_outer.root | |
31 | new_suffix=_barrel.root | |
32 | fi | |
33 | ||
34 | if [[ $qaFile == *barrel* ]] | |
35 | then | |
36 | suffix=_barrel.root | |
37 | new_suffix=_outer.root | |
38 | fi | |
39 | ||
40 | if [[ "$suffix" != ".root" ]] | |
41 | then | |
42 | ||
43 | mv trending.root trending$suffix | |
44 | mv ${period}_${pass}_${runNumber}_QAplots.root ${period}_${pass}_${runNumber}_QAplots$suffix | |
45 | ||
46 | qaFile=${qaFile/$suffix/$new_suffix} | |
47 | ||
48 | echo | |
49 | echo "processing $qaFile" | |
50 | echo | |
51 | ||
52 | aliroot -b << EOF | |
53 | gSystem->AddIncludePath("-I${ALICE_ROOT}/include") | |
54 | gSystem->SetBuildDir("./",kTRUE) | |
55 | .L $MACRODIR/CreateEMCALRunQA.C+g | |
56 | CreateEMCALRunQA("$qaFile","$runNumber","$period","$pass",$SaveImages) | |
57 | .q | |
58 | EOF | |
59 | ||
60 | mv trending.root trending$new_suffix | |
61 | mv ${period}_${pass}_${runNumber}_QAplots.root ${period}_${pass}_${runNumber}_QAplots$new_suffix | |
62 | ||
63 | echo | |
64 | ||
65 | hadd -v 1 -f trending.root trending_*.root | |
66 | rm -f trending_*.root | |
67 | ||
68 | fi | |
69 | ||
70 | rm -f *.d *.so *.txt | |
71 | ||
72 | } | |
73 | ||
74 | periodLevelQA() | |
75 | { | |
76 | ||
77 | trendingFile=$1 | |
78 | MACRODIR=$ALICE_ROOT/PWGPP/EMCAL/QA/macros | |
79 | SaveImages=0 | |
80 | ||
81 | echo | |
82 | echo "Producing PeriodLevel QA plots" | |
83 | echo | |
84 | ||
85 | root -b << EOF | |
86 | gSystem->AddIncludePath("-I${ALICE_ROOT}/include"); | |
87 | gSystem->SetBuildDir("./",kTRUE) | |
88 | .L $MACRODIR/PlotEMCALQATrendingTree.C | |
89 | PlotEMCALQATrendingTree("$trendingFile",$SaveImages) | |
90 | .q | |
91 | EOF | |
92 | ||
93 | mv trendingPlots.root ${period}_${pass}_trendingPlots.root | |
94 | ||
95 | echo | |
96 | ||
97 | hadd -v 1 -f ${period}_${pass}_EMCALQA.root */*QAplot*.root ${period}_${pass}_trendingPlots.root $trendingFile | |
98 | ||
99 | echo | |
100 | echo "Producing QA PDF file" | |
101 | echo | |
102 | ||
103 | root -b -l << EOF | |
104 | gSystem->AddIncludePath("-I${ALICE_ROOT}/include") | |
105 | gSystem->SetBuildDir("./",kTRUE) | |
106 | .L $MACRODIR/MakeQAPdf.C+g | |
107 | MakeQAPdf("${period}_${pass}_EMCALQA.root") | |
108 | .q | |
109 | EOF | |
110 | ||
111 | rm -f *.d *.C *.so ${period}_${pass}_trendingPlots.root | |
112 | ||
113 | } |