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: AliTRDqaGuiBlackError.cxx 23387 2008-01-17 17:25:16Z cblume $ */
18 //////////////////////////////////////////////////////////////////////////////////
20 // This class is a Graphical User Interface for the Quality Monitorig
21 // of black (non zero zuppresed) events from TRD.
22 // It lets display and browse throu histograms created by the class
23 // AliTRDqaBlackEvents.
24 // The class works in cooperation with AliTRDqaGuiMainBlack.
30 //////////////////////////////////////////////////////////////////////////////////
32 #include "AliTRDqaGuiBlackError.h"
42 #include "TRootEmbeddedCanvas.h"
44 ClassImp(AliTRDqaGuiBlackError)
46 //////////////////////////////////////////////////////////////////////////////////
48 AliTRDqaGuiBlackError::AliTRDqaGuiBlackError()
51 // Default constructor
56 //////////////////////////////////////////////////////////////////////////////////
58 AliTRDqaGuiBlackError::AliTRDqaGuiBlackError(TGWindow *parent)
59 : TGCompositeFrame(parent, 720, 500)
65 SetLayoutManager(new TGMatrixLayout(this,3,3,0,0));
67 for(Int_t i=0; i<9; i++) {
68 fCanvasList[i] = new TRootEmbeddedCanvas(Form("pos_%d", i), this, 333, 245);
69 AddFrame(fCanvasList[i]);
72 for(Int_t i=0; i<3; i++) {
82 //////////////////////////////////////////////////////////////////////////////////
84 void AliTRDqaGuiBlackError::SetQAFile(const char *filename) {
86 // Set the file with histograms
89 TGaxis::SetMaxDigits(3);
91 const char *names[9] = {
92 "errorHC", "errorMCM", "errorADC",
93 "trendErrorHC", "trendErrorMCM", "trendErrorADC",
94 "errorSM_HC", "errorSM_MCM", "errorSM_ADC"
97 const char *title[9] = {
98 "half-chamber;HC error ID", "MCM;MCM error ID", "ADC;ADC error ID",
99 "fraction with HC error (%);event number",
100 "fraction with MCM error (%);event number",
101 "fraction with ADC error (%);event number",
102 ";sm id;number of errors",
103 ";sm id;number of errors",
104 ";sm id;number of errors"
108 strcpy(fFileName,filename);
110 for(int i=0; i<3; i++) {
112 if (fHistList[i]) delete fHistList[i];
113 if (fGraphList[i]) delete fGraphList[i];
114 if (fHistListSM[i]) delete fHistListSM[i];
121 TFile *file = new TFile(filename);
123 for(Int_t i=0; i<3; i++) {
125 fHistList[i] = (TH1D*)file->Get(names[i]);
127 fCanvasList[i]->GetCanvas()->cd();
128 fCanvasList[i]->GetCanvas()->SetLogy(1);
130 fHistList[i]->Draw();
131 fHistList[i]->SetTitle(title[i]);
134 fGraphList[i] = (TGraph*)file->Get(names[i+3]);
136 fCanvasList[i+3]->GetCanvas()->cd();
137 fGraphList[i]->Draw("apl");
138 fGraphList[i]->SetMarkerStyle(7);
139 fGraphList[i]->GetHistogram()->SetTitle(title[i+3]);
142 fHistListSM[i] = (TH1D*)file->Get(names[i+6]);
143 if (fHistListSM[i]) {
144 fCanvasList[i+6]->GetCanvas()->cd();
145 //fCanvasList[i]->GetCanvas()->SetLogy(1);
147 fHistListSM[i]->Draw();
148 fHistListSM[i]->SetTitle(title[i+6]);
156 fHistList[i]->SetMinimum(fRangePed[0]);
157 fHistList[i]->SetMaximum(fRangePed[1]);
160 if ( fHistList[i] && (fIdxType == 1) && fSetRangeNoise) {
161 fHistList[i]->SetMinimum(fRangeNoise[0]);
162 fHistList[i]->SetMaximum(fRangeNoise[1]);
165 fCanvasList[pos]->GetCanvas()->Update();
170 //////////////////////////////////////////////////////////////////////////////////