]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/qaGui/AliTRDqaGuiESDs.cxx
Undoing changes to AliGlauberMC
[u/mrichter/AliRoot.git] / TRD / qaGui / AliTRDqaGuiESDs.cxx
CommitLineData
36f55715 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id: AliTRDqaGuiESDs.cxx 23871 2008-02-12 11:48:20Z hristov $ */
17
18#include "AliTRDqaGuiESDs.h"
19
20#include "TH1D.h"
21#include "TFile.h"
22#include "TCanvas.h"
23#include "TRootEmbeddedCanvas.h"
24#include "TGToolTip.h"
25
26ClassImp(AliTRDqaGuiESDs)
27
28//////////////////////////////////////////////////////////////////////////////////
29//
30// This class is a Graphical User Interface for the Quality Monitorig
31// of ESD (Event Summary Data)
32// It displays histograms created by
33// the AliTRDQADataMakerRec run during the reconstruction
34//
35// S. Radomski
36// Uni-Heidelberg
37// Feb. 2008
38//
39//////////////////////////////////////////////////////////////////////////////////
40
41
f5fd37e8 42const Int_t AliTRDqaGuiESDs::fgkLogList[24] = {
43 1,1,0,0,0,0,
44 1,1,1,1,1,1,
45 1,1,1,0,0,0,
46 0,0,0,0,0,0
47};
36f55715 48
02f3bfcc 49//////////////////////////////////////////////////////////////////////////////////
50AliTRDqaGuiESDs::AliTRDqaGuiESDs()
51 :TGCompositeFrame()
52 ,fPage(0)
53 {
54 //
55 // Default constructor
56 //
57
58 for (Int_t i = 0; i < 6; i++) {
59 fCanvasList[i] = 0x0;
60 fHistList[i] = 0x0;
61 for (Int_t j = 0; j < 4; j++) {
62 fNameList[j*i] = 0x0;
63 }
64 }
65
66 }
67
36f55715 68//////////////////////////////////////////////////////////////////////////////////
69AliTRDqaGuiESDs::AliTRDqaGuiESDs(TGWindow *parent, Int_t page)
70 :TGCompositeFrame(parent, 720, 400)
71 ,fPage(page)
72 {
73 //
74 // main constructor
75 //
76
77 SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
78
79 fNameList[0] = "bits";
80 fNameList[1] = "ptTRDr";
81 fNameList[2] = "ptTRDrTPCo";
82 fNameList[3] = "sector";
83 fNameList[4] = "trdzTRDr";
84 fNameList[5] = "trdzTRDrTPCo";
85
86 fNameList[6] = "clsTRDo";
87 fNameList[7] = "clsTRDr";
88 fNameList[8] = "clsTRDz";
89 fNameList[9] = "quality";
90 fNameList[10] = "pidQuality";
91 fNameList[11] = "chi2";
92
9b99c029 93 fNameList[12] = "pid0";
94 fNameList[13] = "pid2";
95 fNameList[14] = "pid4";
96 fNameList[15] = "tracksStack";
97 fNameList[16] = "electronStack";
98 fNameList[17] = "elRatioStack";
f5fd37e8 99
100 fNameList[18] = "signalPzone_0";
101 fNameList[19] = "signalPzone_1";
102 fNameList[20] = "signalPzone_2";
103 fNameList[21] = "signalPzone_3";
104 fNameList[22] = "";
105 fNameList[23] = "";
36f55715 106
107 for(Int_t i=0; i<6; i++) {
9b99c029 108 fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i+6*fPage], this, 320, 320);
36f55715 109 AddFrame(fCanvasList[i]);
110 fCanvasList[i]->GetCanvas()->SetRightMargin(0.05);
111 //TGToolTip *tip = new TGToolTip(this,fCanvasList[i], Form("Wal sie na ryja %d", i),1000);
112 //tip->Show((i%3)*320, (i/3)*320);
113 }
114
115 for(Int_t i=0; i<6; i++) {
116 fHistList[i] = 0;
117 }
36f55715 118}
119
120//////////////////////////////////////////////////////////////////////////////////
121
122void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
123 //
124 // sets a file with histograms
125 //
126
127
128 for(Int_t i=0; i<6; i++) {
129 if (fHistList[i]) delete fHistList[i];
130 }
131
132 // const char *opt[6] = {"colz", "", "", ""};
133
134 TFile *file = new TFile(filename);
135 file->cd("TRD/ESDs");
136
137 for(int i=0; i<6; i++) {
138 fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_esd_%s", fNameList[i+fPage*6]));
139 fCanvasList[i]->GetCanvas()->cd();
f5fd37e8 140
141 if (fPage == 3) {
142 if (fHistList[i]) fHistList[i]->Draw("colz");
143 gPad->SetLogz(1);
144 gPad->SetLogx(1);
145 } else {
146 gPad->SetLogy(fgkLogList[i+6*fPage]);
147 if (fHistList[i]) fHistList[i]->Draw();
148 }
149
36f55715 150 fCanvasList[i]->GetCanvas()->Update();
151 }
152}
153
154//////////////////////////////////////////////////////////////////////////////////