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[18] = {1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0};
44 //////////////////////////////////////////////////////////////////////////////////
45 AliTRDqaGuiESDs::AliTRDqaGuiESDs(TGWindow *parent, Int_t page)
46 :TGCompositeFrame(parent, 720, 400)
53 SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
55 fNameList[0] = "bits";
56 fNameList[1] = "ptTRDr";
57 fNameList[2] = "ptTRDrTPCo";
58 fNameList[3] = "sector";
59 fNameList[4] = "trdzTRDr";
60 fNameList[5] = "trdzTRDrTPCo";
62 fNameList[6] = "clsTRDo";
63 fNameList[7] = "clsTRDr";
64 fNameList[8] = "clsTRDz";
65 fNameList[9] = "quality";
66 fNameList[10] = "pidQuality";
67 fNameList[11] = "chi2";
69 fNameList[12] = "pid0";
70 fNameList[13] = "pid2";
71 fNameList[14] = "pid4";
72 fNameList[15] = "tracksStack";
73 fNameList[16] = "electronStack";
74 fNameList[17] = "elRatioStack";
78 for(Int_t i=0; i<6; i++) {
79 fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i+6*fPage], this, 320, 320);
80 AddFrame(fCanvasList[i]);
81 fCanvasList[i]->GetCanvas()->SetRightMargin(0.05);
82 //TGToolTip *tip = new TGToolTip(this,fCanvasList[i], Form("Wal sie na ryja %d", i),1000);
83 //tip->Show((i%3)*320, (i/3)*320);
86 for(Int_t i=0; i<6; i++) {
92 //////////////////////////////////////////////////////////////////////////////////
94 void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
96 // sets a file with histograms
100 for(Int_t i=0; i<6; i++) {
101 if (fHistList[i]) delete fHistList[i];
104 // const char *opt[6] = {"colz", "", "", ""};
106 TFile *file = new TFile(filename);
107 file->cd("TRD/ESDs");
109 for(int i=0; i<6; i++) {
110 fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_esd_%s", fNameList[i+fPage*6]));
111 fCanvasList[i]->GetCanvas()->cd();
112 gPad->SetLogy(fgkLogList[i+6*fPage]);
113 if (fHistList[i]) fHistList[i]->Draw();
114 fCanvasList[i]->GetCanvas()->Update();
118 //////////////////////////////////////////////////////////////////////////////////