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(TGWindow *parent, Int_t page)
51 :TGCompositeFrame(parent, 720, 400)
58 SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
60 fNameList[0] = "bits";
61 fNameList[1] = "ptTRDr";
62 fNameList[2] = "ptTRDrTPCo";
63 fNameList[3] = "sector";
64 fNameList[4] = "trdzTRDr";
65 fNameList[5] = "trdzTRDrTPCo";
67 fNameList[6] = "clsTRDo";
68 fNameList[7] = "clsTRDr";
69 fNameList[8] = "clsTRDz";
70 fNameList[9] = "quality";
71 fNameList[10] = "pidQuality";
72 fNameList[11] = "chi2";
74 fNameList[12] = "pid0";
75 fNameList[13] = "pid2";
76 fNameList[14] = "pid4";
77 fNameList[15] = "tracksStack";
78 fNameList[16] = "electronStack";
79 fNameList[17] = "elRatioStack";
81 fNameList[18] = "signalPzone_0";
82 fNameList[19] = "signalPzone_1";
83 fNameList[20] = "signalPzone_2";
84 fNameList[21] = "signalPzone_3";
88 for(Int_t i=0; i<6; i++) {
89 fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i+6*fPage], this, 320, 320);
90 AddFrame(fCanvasList[i]);
91 fCanvasList[i]->GetCanvas()->SetRightMargin(0.05);
92 //TGToolTip *tip = new TGToolTip(this,fCanvasList[i], Form("Wal sie na ryja %d", i),1000);
93 //tip->Show((i%3)*320, (i/3)*320);
96 for(Int_t i=0; i<6; i++) {
101 //////////////////////////////////////////////////////////////////////////////////
103 void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
105 // sets a file with histograms
109 for(Int_t i=0; i<6; i++) {
110 if (fHistList[i]) delete fHistList[i];
113 // const char *opt[6] = {"colz", "", "", ""};
115 TFile *file = new TFile(filename);
116 file->cd("TRD/ESDs");
118 for(int i=0; i<6; i++) {
119 fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_esd_%s", fNameList[i+fPage*6]));
120 fCanvasList[i]->GetCanvas()->cd();
123 if (fHistList[i]) fHistList[i]->Draw("colz");
127 gPad->SetLogy(fgkLogList[i+6*fPage]);
128 if (fHistList[i]) fHistList[i]->Draw();
131 fCanvasList[i]->GetCanvas()->Update();
135 //////////////////////////////////////////////////////////////////////////////////