]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/qaGui/AliTRDqaGuiBlackGlobal.cxx
1) Centrality dependent thresholds parameters
[u/mrichter/AliRoot.git] / TRD / qaGui / AliTRDqaGuiBlackGlobal.cxx
CommitLineData
a73a87be 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: AliTRDqaGuiBlackGlobal.cxx 23387 2008-01-17 17:25:16Z cblume $ */
17
18//////////////////////////////////////////////////////////////////////////////////
19//
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.
25//
26// S. Radomski
27// Uni-Heidelberg
28// June 2008
29//
30//////////////////////////////////////////////////////////////////////////////////
31
32#include "AliTRDqaGuiBlackGlobal.h"
33
34#include "TH1D.h"
35#include "TGraph.h"
36#include "TFile.h"
37#include "TCanvas.h"
38#include "TString.h"
39#include "TSystem.h"
40#include "TGaxis.h"
41
42#include "TRootEmbeddedCanvas.h"
43
44ClassImp(AliTRDqaGuiBlackGlobal)
45
46//////////////////////////////////////////////////////////////////////////////////
47
48AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal()
49{
50 //
51 // Default constructor
52 //
53
02f3bfcc 54 for (Int_t i = 0; i < 6; i++) {
55 fCanvasList[i] = 0x0;
56 }
57 for (Int_t i = 0; i < 3; i++) {
58 fHistList[i] = 0x0;
59 }
60 for (Int_t i = 0; i < 2; i++) {
61 fGraphList[i] = 0x0;
62 }
63
64 strncpy(fFileName,"",256);
65
a73a87be 66}
67
68//////////////////////////////////////////////////////////////////////////////////
69
70AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal(TGWindow *parent)
71 : TGCompositeFrame(parent, 720, 500)
72{
73 //
74 // Main constructor
75 //
76
77 SetLayoutManager(new TGMatrixLayout(this,2,3,0,0));
78
79 for(Int_t i=0; i<6; i++) {
80 fCanvasList[i] = new TRootEmbeddedCanvas(Form("pos_%d", i), this, 330, 350);
81 AddFrame(fCanvasList[i]);
82 }
83
84 for(Int_t i=0; i<3; i++) {
85 fHistList[i] = 0;
86 fGraphList[i] = 0;
87 }
88}
89
90//////////////////////////////////////////////////////////////////////////////////
91
92void AliTRDqaGuiBlackGlobal::SetQAFile(const char *filename) {
93 //
94 // Set the file with histograms
95 //
96
97 TGaxis::SetMaxDigits(3);
98
99 const char *names[6] = {
6a9add6f 100 "noiseTotal", "peakPeak", "mcmEvDist_999",
101 "trendMCM", "fracPP_0", "nADCinEvent"
a73a87be 102 };
103
104 const char *title[6] = {
a73a87be 105 ";noise (ADC)",
106 ";peak-peak (ADC)",
6a9add6f 107 ";#Delta Event Number from MCM",
108
109 "number of active MCMs;event number",
110 "number of ADCs with PP > 10;event number",
111 "number of ADC chanels;event number"
a73a87be 112 };
113
114
02f3bfcc 115 strncpy(fFileName,filename,256);
a73a87be 116
117 for(int i=0; i<3; i++) {
118
119 if (fHistList[i]) delete fHistList[i];
120 if (fGraphList[i]) delete fGraphList[i];
121
122 fHistList[i] = 0;
123 fGraphList[i] = 0;
124 }
125
126 TFile *file = new TFile(filename);
127
128 for(Int_t i=0; i<3; i++) {
129
130 fHistList[i] = (TH1D*)file->Get(names[i]);
131 if (fHistList[i]) {
6a9add6f 132
a73a87be 133 fCanvasList[i]->GetCanvas()->cd();
6a9add6f 134 gPad->SetLogy();
135 fHistList[i]->Draw();
a73a87be 136 fHistList[i]->SetTitle(title[i]);
a73a87be 137 }
138
6a9add6f 139
a73a87be 140 fGraphList[i] = (TGraph*)file->Get(names[i+3]);
141 if (fGraphList[i]) {
142 fCanvasList[i+3]->GetCanvas()->cd();
143 fGraphList[i]->Draw("apl");
6a9add6f 144 fGraphList[i]->SetMarkerStyle(7);
a73a87be 145 fGraphList[i]->GetHistogram()->SetTitle(title[i+3]);
146 }
147 }
148}
149
150//////////////////////////////////////////////////////////////////////////////////