]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaGui/AliTRDqaGuiClusters.cxx
New QA gui by Sylwester
[u/mrichter/AliRoot.git] / TRD / qaGui / AliTRDqaGuiClusters.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: AliTRDqaGuiClusters.cxx 23871 2008-02-12 11:48:20Z hristov $ */
17
18 //////////////////////////////////////////////////////////////////////////////////
19 //
20 // This class is a Graphical User Interface for the Quality Monitorig 
21 // of clusters on the full detector level.
22 // It displays histograms created by the AliTRDQADataMakerRec 
23 // run during the reconstruction 
24 //
25 // S. Radomski 
26 // Uni-Heidelberg
27 // Feb. 2008
28 // 
29 //////////////////////////////////////////////////////////////////////////////////
30
31 #include "AliTRDqaGuiClusters.h"
32
33 #include "TH1D.h"
34 #include "TFile.h"
35 #include "TCanvas.h"
36 #include "TRootEmbeddedCanvas.h"
37
38 ClassImp(AliTRDqaGuiClusters)
39
40 const Int_t AliTRDqaGuiClusters::fgkLogList[4] = {0,1,0,1};
41
42 //////////////////////////////////////////////////////////////////////////////////
43 AliTRDqaGuiClusters::AliTRDqaGuiClusters(TGWindow *parent) 
44   : TGCompositeFrame(parent, 720, 400) {
45   //
46   // main constructor
47   //
48   
49   SetLayoutManager(new TGMatrixLayout(this,2,2,1,1));
50
51   fNameList[0] = "detMap";
52   fNameList[1] = "nCls";
53   fNameList[2] = "signal";
54   fNameList[3] = "ampMPV";
55
56   for(Int_t i=0; i<4; i++) {
57     fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i], this, 480, 320);
58     AddFrame(fCanvasList[i]);
59   }
60   
61   for(Int_t i=0; i<4; i++) {
62     fHistList[i] = 0;
63   }
64
65 }
66
67 //////////////////////////////////////////////////////////////////////////////////
68
69 void AliTRDqaGuiClusters::SetQAFile(const char *filename) {
70   //
71   // sets the file with histograms
72   //
73
74   for(Int_t i=0; i<4; i++) {
75     if (fHistList[i]) delete fHistList[i];
76   }
77   
78   const char *opt[4] = {"colz", "", "", ""};
79
80   TFile *file = new TFile(filename);
81   file->cd("TRD/RecPoints");
82   
83   for(int i=0; i<4; i++) {
84     fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_recPoints_%s", fNameList[i]));
85     fCanvasList[i]->GetCanvas()->cd();
86     gPad->SetLogy(fgkLogList[i]);
87     if (fHistList[i]) fHistList[i]->Draw(opt[i]);
88     fCanvasList[i]->GetCanvas()->Update();
89   }
90 }
91
92 //////////////////////////////////////////////////////////////////////////////////