1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliTRDqaGuiESDs.cxx 23871 2008-02-12 11:48:20Z hristov $ */
18 #include "AliTRDqaGuiESDs.h"
23 #include "TRootEmbeddedCanvas.h"
24 #include "TGToolTip.h"
26 ClassImp(AliTRDqaGuiESDs)
28 //////////////////////////////////////////////////////////////////////////////////
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
39 //////////////////////////////////////////////////////////////////////////////////
42 const Int_t AliTRDqaGuiESDs::fgkLogList[24] = {
49 //////////////////////////////////////////////////////////////////////////////////
50 AliTRDqaGuiESDs::AliTRDqaGuiESDs()
55 // Default constructor
58 for (Int_t i = 0; i < 6; i++) {
61 for (Int_t j = 0; j < 4; j++) {
68 //////////////////////////////////////////////////////////////////////////////////
69 AliTRDqaGuiESDs::AliTRDqaGuiESDs(TGWindow *parent, Int_t page)
70 :TGCompositeFrame(parent, 720, 400)
77 SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
79 fNameList[0] = "bits";
80 fNameList[1] = "ptTRDr";
81 fNameList[2] = "ptTRDrTPCo";
82 fNameList[3] = "sector";
83 fNameList[4] = "trdzTRDr";
84 fNameList[5] = "trdzTRDrTPCo";
86 fNameList[6] = "clsTRDo";
87 fNameList[7] = "clsTRDr";
88 fNameList[8] = "clsTRDz";
89 fNameList[9] = "quality";
90 fNameList[10] = "pidQuality";
91 fNameList[11] = "chi2";
93 fNameList[12] = "pid0";
94 fNameList[13] = "pid2";
95 fNameList[14] = "pid4";
96 fNameList[15] = "tracksStack";
97 fNameList[16] = "electronStack";
98 fNameList[17] = "elRatioStack";
100 fNameList[18] = "signalPzone_0";
101 fNameList[19] = "signalPzone_1";
102 fNameList[20] = "signalPzone_2";
103 fNameList[21] = "signalPzone_3";
107 for(Int_t i=0; i<6; i++) {
108 fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i+6*fPage], this, 320, 320);
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);
115 for(Int_t i=0; i<6; i++) {
120 //////////////////////////////////////////////////////////////////////////////////
122 void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
124 // sets a file with histograms
128 for(Int_t i=0; i<6; i++) {
129 if (fHistList[i]) delete fHistList[i];
132 // const char *opt[6] = {"colz", "", "", ""};
134 TFile *file = new TFile(filename);
135 file->cd("TRD/ESDs");
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();
142 if (fHistList[i]) fHistList[i]->Draw("colz");
146 gPad->SetLogy(fgkLogList[i+6*fPage]);
147 if (fHistList[i]) fHistList[i]->Draw();
150 fCanvasList[i]->GetCanvas()->Update();
154 //////////////////////////////////////////////////////////////////////////////////