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: AliTRDqaGuiBlackGlobal.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 "AliTRDqaGuiBlackGlobal.h"
42 #include "TRootEmbeddedCanvas.h"
44 ClassImp(AliTRDqaGuiBlackGlobal)
46 //////////////////////////////////////////////////////////////////////////////////
48 AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal()
51 // Default constructor
54 for (Int_t i = 0; i < 6; i++) {
57 for (Int_t i = 0; i < 3; i++) {
60 for (Int_t i = 0; i < 2; i++) {
64 strncpy(fFileName,"",256);
68 //////////////////////////////////////////////////////////////////////////////////
70 AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal(TGWindow *parent)
71 : TGCompositeFrame(parent, 720, 500)
77 SetLayoutManager(new TGMatrixLayout(this,2,3,0,0));
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]);
84 for(Int_t i=0; i<3; i++) {
90 //////////////////////////////////////////////////////////////////////////////////
92 void AliTRDqaGuiBlackGlobal::SetQAFile(const char *filename) {
94 // Set the file with histograms
97 TGaxis::SetMaxDigits(3);
99 const char *names[6] = {
100 "noiseTotal", "peakPeak", "mcmEvDist_999",
101 "trendMCM", "fracPP_0", "nADCinEvent"
104 const char *title[6] = {
107 ";#Delta Event Number from MCM",
109 "number of active MCMs;event number",
110 "number of ADCs with PP > 10;event number",
111 "number of ADC chanels;event number"
115 strncpy(fFileName,filename,256);
117 for(int i=0; i<3; i++) {
119 if (fHistList[i]) delete fHistList[i];
120 if (fGraphList[i]) delete fGraphList[i];
126 TFile *file = new TFile(filename);
128 for(Int_t i=0; i<3; i++) {
130 fHistList[i] = (TH1D*)file->Get(names[i]);
133 fCanvasList[i]->GetCanvas()->cd();
135 fHistList[i]->Draw();
136 fHistList[i]->SetTitle(title[i]);
140 fGraphList[i] = (TGraph*)file->Get(names[i+3]);
142 fCanvasList[i+3]->GetCanvas()->cd();
143 fGraphList[i]->Draw("apl");
144 fGraphList[i]->SetMarkerStyle(7);
145 fGraphList[i]->GetHistogram()->SetTitle(title[i+3]);
150 //////////////////////////////////////////////////////////////////////////////////