]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaGui/AliTRDqaGuiESDs.cxx
Code cleanup in AliITSDetTypeRec and vertexers + minor bug fix in AliITSVertexer3D...
[u/mrichter/AliRoot.git] / TRD / qaGui / AliTRDqaGuiESDs.cxx
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
26 ClassImp(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
42 const 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 };
48
49 //////////////////////////////////////////////////////////////////////////////////
50 AliTRDqaGuiESDs::AliTRDqaGuiESDs(TGWindow *parent, Int_t page) 
51   :TGCompositeFrame(parent, 720, 400)
52   ,fPage(page)
53  {
54   //
55   // main constructor
56   //
57   
58   SetLayoutManager(new TGMatrixLayout(this,2,3,1,1));
59
60   fNameList[0] = "bits";
61   fNameList[1] = "ptTRDr";
62   fNameList[2] = "ptTRDrTPCo";
63   fNameList[3] = "sector";
64   fNameList[4] = "trdzTRDr";
65   fNameList[5] = "trdzTRDrTPCo";
66
67   fNameList[6] = "clsTRDo";
68   fNameList[7] = "clsTRDr";
69   fNameList[8] = "clsTRDz";
70   fNameList[9] = "quality";
71   fNameList[10] = "pidQuality";
72   fNameList[11] = "chi2";
73   
74   fNameList[12] = "pid0";
75   fNameList[13] = "pid2";
76   fNameList[14] = "pid4";
77   fNameList[15] = "tracksStack";
78   fNameList[16] = "electronStack";
79   fNameList[17] = "elRatioStack";
80   
81   fNameList[18] = "signalPzone_0";
82   fNameList[19] = "signalPzone_1";
83   fNameList[20] = "signalPzone_2";
84   fNameList[21] = "signalPzone_3";
85   fNameList[22] = "";
86   fNameList[23] = "";
87
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);
94   }
95   
96   for(Int_t i=0; i<6; i++) {
97     fHistList[i] = 0;
98   }
99 }
100
101 //////////////////////////////////////////////////////////////////////////////////
102
103 void AliTRDqaGuiESDs::SetQAFile(const char *filename) {
104   //
105   // sets a file with histograms
106   //
107
108
109   for(Int_t i=0; i<6; i++) {
110     if (fHistList[i]) delete fHistList[i];
111   }
112   
113   //  const char *opt[6] = {"colz", "", "", ""};
114
115   TFile *file = new TFile(filename);
116   file->cd("TRD/ESDs");
117   
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();
121  
122     if (fPage == 3) {
123       if (fHistList[i]) fHistList[i]->Draw("colz");
124       gPad->SetLogz(1);
125       gPad->SetLogx(1);
126     } else {
127       gPad->SetLogy(fgkLogList[i+6*fPage]);
128       if (fHistList[i]) fHistList[i]->Draw();
129     }
130
131     fCanvasList[i]->GetCanvas()->Update();
132   }
133 }
134
135 //////////////////////////////////////////////////////////////////////////////////