Updated QA version (Sylwester)
[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
9b99c029 42const Int_t AliTRDqaGuiESDs::fgkLogList[18] = {1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0};
36f55715 43
44//////////////////////////////////////////////////////////////////////////////////
45AliTRDqaGuiESDs::AliTRDqaGuiESDs(TGWindow *parent, Int_t page)
46 :TGCompositeFrame(parent, 720, 400)
47 ,fPage(page)
48 {
49 //
50 // main constructor
51 //
52
53 SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
54
55 fNameList[0] = "bits";
56 fNameList[1] = "ptTRDr";
57 fNameList[2] = "ptTRDrTPCo";
58 fNameList[3] = "sector";
59 fNameList[4] = "trdzTRDr";
60 fNameList[5] = "trdzTRDrTPCo";
61
62 fNameList[6] = "clsTRDo";
63 fNameList[7] = "clsTRDr";
64 fNameList[8] = "clsTRDz";
65 fNameList[9] = "quality";
66 fNameList[10] = "pidQuality";
67 fNameList[11] = "chi2";
68
9b99c029 69 fNameList[12] = "pid0";
70 fNameList[13] = "pid2";
71 fNameList[14] = "pid4";
72 fNameList[15] = "tracksStack";
73 fNameList[16] = "electronStack";
74 fNameList[17] = "elRatioStack";
75
76
36f55715 77
78 for(Int_t i=0; i<6; i++) {
9b99c029 79 fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i+6*fPage], this, 320, 320);
36f55715 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);
84 }
85
86 for(Int_t i=0; i<6; i++) {
87 fHistList[i] = 0;
88 }
89
90}
91
92//////////////////////////////////////////////////////////////////////////////////
93
94void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
95 //
96 // sets a file with histograms
97 //
98
99
100 for(Int_t i=0; i<6; i++) {
101 if (fHistList[i]) delete fHistList[i];
102 }
103
104 // const char *opt[6] = {"colz", "", "", ""};
105
106 TFile *file = new TFile(filename);
107 file->cd("TRD/ESDs");
108
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();
115 }
116}
117
118//////////////////////////////////////////////////////////////////////////////////