]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
QA update by Sylwester
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jul 2008 17:14:23 +0000 (17:14 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jul 2008 17:14:23 +0000 (17:14 +0000)
14 files changed:
TRD/qaGui/AliTRDqaGuiBlackChamber.cxx
TRD/qaGui/AliTRDqaGuiBlackError.cxx [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiBlackError.h [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiBlackGlobal.cxx [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiBlackGlobal.h [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiBlackSM.cxx
TRD/qaGui/AliTRDqaGuiBlackSM.h
TRD/qaGui/AliTRDqaGuiClusters.cxx
TRD/qaGui/AliTRDqaGuiClusters.h
TRD/qaGui/AliTRDqaGuiClustersSM.cxx
TRD/qaGui/AliTRDqaGuiClustersStack.cxx
TRD/qaGui/AliTRDqaGuiMainBlack.cxx
TRD/qaGui/AliTRDqaGuiMainBlack.h
TRD/qaGui/testQAGui.C

index f11b3c21c6c4708404fc741e89735013db76bc40..f477a24170df2822bb7f9333b7b1ee4a0d6734a4 100644 (file)
@@ -39,6 +39,7 @@
 #include "TString.h"
 #include "TSystem.h"
 
+#include "TLine.h"
 #include "TPaveText.h"
 #include "TGLabel.h"
 #include "TGComboBox.h"
@@ -112,19 +113,19 @@ AliTRDqaGuiBlackChamber::AliTRDqaGuiBlackChamber(TGWindow *parent)
 
   fGSelectSM = new TGComboBox(fGPanel);
   for(int i=0; i<fgknSM; i++) fGSelectSM->AddEntry(Form("SM %d", i), i);
-  fGSelectSM->Resize(100, fGPrevSM->GetHeight());
+  fGSelectSM->Resize(100, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectSM->Select(fIdxSM);
 
   fGSelectChamber = new TGComboBox(fGPanel);
   for(int i=0; i<fgknChamber; i++) fGSelectChamber->AddEntry(Form("Chamber %d", i), i);
-  fGSelectChamber->Resize(100, fGPrevSM->GetHeight());
+  fGSelectChamber->Resize(100, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectChamber->Select(fIdxChamber);
 
   // vew
   fGSelectView = new TGComboBox(fGPanel);
   fGSelectView->AddEntry("pedestals",0);
   fGSelectView->AddEntry("entiries", 1);
-  fGSelectView->Resize(150, fGPrevSM->GetHeight());
+  fGSelectView->Resize(150, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectView->Select(0);
 
 
@@ -209,8 +210,6 @@ void AliTRDqaGuiBlackChamber::SetQAFile(const char *filename) {
   // sets a file with histograms
   //
 
-
-
   //const char *names[5] = {"ped", "noise", "pedDist", "noiseDist", "signal"};
   const char *names[10] = {
     "ped", "noise", "pedDist", "noiseDist", "signal",
@@ -253,13 +252,46 @@ void AliTRDqaGuiBlackChamber::SetQAFile(const char *filename) {
       fHistList[i]->SetMaximum(fRangeNoise[1]);
     }
 
-
     fCanvasList[i]->GetCanvas()->cd();
     fCanvasList[i]->GetCanvas()->SetLogy(kLogy[i+5*fView]);
     if (fHistList[i]) fHistList[i]->Draw(opt[i+5*fView]);
     //fCanvasList[i]->GetCanvas()->Update();
   }
   
+  // mcm lines
+  TLine *line;
+  for(Int_t i=1; i<8; i++) {
+
+    fCanvasList[0]->GetCanvas()->cd();
+    line = new TLine(0, i*18-0.5, 15, i*18-0.5);
+    line->SetLineStyle(2);
+    if (i!=4) line->SetLineStyle(3);
+    line->Draw();
+
+    fCanvasList[1]->GetCanvas()->cd();
+    line = new TLine(0, i*18-0.5, 15, i*18-0.5);
+    line->SetLineStyle(2);
+    if (i!=4) line->SetLineStyle(3);
+    line->Draw();    
+  }
+  
+  for(Int_t i=1; i<4; i++) {
+    
+    fCanvasList[0]->GetCanvas()->cd();
+    line = new TLine(i*4-0.5, 0, i*4-0.5, 143);
+    line->SetLineStyle(2);
+    line->Draw();
+
+    fCanvasList[1]->GetCanvas()->cd();
+    line = new TLine(i*4-0.5, 0, i*4-0.5, 143);
+    line->SetLineStyle(2);
+    line->Draw();  
+  }
+
+  
+
+
+  
   for(Int_t i=0; i<5; i++)
     fCanvasList[i]->GetCanvas()->Update();
 }
diff --git a/TRD/qaGui/AliTRDqaGuiBlackError.cxx b/TRD/qaGui/AliTRDqaGuiBlackError.cxx
new file mode 100644 (file)
index 0000000..56c295a
--- /dev/null
@@ -0,0 +1,169 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDqaGuiBlackError.cxx 23387 2008-01-17 17:25:16Z cblume $ */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+// of black (non zero zuppresed) events from TRD. 
+// It lets display and browse throu histograms created by the class 
+// AliTRDqaBlackEvents.
+// The class works in cooperation with AliTRDqaGuiMainBlack.
+//
+// S. Radomski 
+// Uni-Heidelberg
+// June 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDqaGuiBlackError.h"
+
+#include "TH1D.h"
+#include "TGraph.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TString.h"
+#include "TSystem.h"
+#include "TGaxis.h"
+
+#include "TRootEmbeddedCanvas.h"
+
+ClassImp(AliTRDqaGuiBlackError)
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiBlackError::AliTRDqaGuiBlackError() 
+{
+  //
+  // Default constructor
+  //
+
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiBlackError::AliTRDqaGuiBlackError(TGWindow *parent) 
+  : TGCompositeFrame(parent, 720, 500)
+{
+  //
+  // Main constructor
+  //
+    
+  SetLayoutManager(new TGMatrixLayout(this,3,3,0,0));
+
+  for(Int_t i=0; i<9; i++) {
+    fCanvasList[i] = new TRootEmbeddedCanvas(Form("pos_%d", i), this, 333, 245);
+    AddFrame(fCanvasList[i]);
+  }
+  
+  for(Int_t i=0; i<3; i++) {
+    fHistList[i] = 0;
+    fGraphList[i] = 0;
+    fHistListSM[i] = 0;
+  }
+
+  //AddFrame(fGCanvas);
+  /**/
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiBlackError::SetQAFile(const char *filename) {
+  //
+  // Set the file with histograms
+  //
+
+  TGaxis::SetMaxDigits(3);
+  
+  const char *names[9] = {
+    "errorHC", "errorMCM", "errorADC",
+    "trendErrorHC", "trendErrorMCM", "trendErrorADC",
+    "errorSM_HC", "errorSM_MCM", "errorSM_ADC"
+  };  
+
+  const char *title[9] = {
+    ";HC error ID", ";MCM error ID", ";ADC error ID",
+    "Error HC;event number;fraction with error (%)",
+    "Error MCM;event number;fraction with error (%)",
+    "Error ADC;event number;fraction with error (%)",
+    ";sm id;number of errors",
+    ";sm id;number of errors",
+    ";sm id;number of errors"
+  };
+
+
+  strcpy(fFileName,filename);
+  for(int i=0; i<3; i++) {
+
+    if (fHistList[i]) delete fHistList[i];
+    if (fGraphList[i]) delete fGraphList[i];
+    if (fHistListSM[i]) delete fHistListSM[i];
+
+    fHistList[i] = 0;
+    fGraphList[i] = 0;
+    fHistListSM[i] = 0;
+  }
+  
+  TFile *file = new TFile(filename);
+  
+  for(Int_t i=0; i<3; i++) {
+
+    fHistList[i] = (TH1D*)file->Get(names[i]);
+    if (fHistList[i]) {
+      fCanvasList[i]->GetCanvas()->cd();
+      fCanvasList[i]->GetCanvas()->SetLogy(1);
+      
+      fHistList[i]->Draw();
+      fHistList[i]->SetTitle(title[i]);
+    }
+    
+    fGraphList[i] = (TGraph*)file->Get(names[i+3]);
+    if (fGraphList[i]) {
+      fCanvasList[i+3]->GetCanvas()->cd();
+      fGraphList[i]->Draw("apl");
+      fGraphList[i]->GetHistogram()->SetTitle(title[i+3]);
+    }
+
+    fHistListSM[i] = (TH1D*)file->Get(names[i+6]);
+    if (fHistListSM[i]) {
+      fCanvasList[i+6]->GetCanvas()->cd();
+      //fCanvasList[i]->GetCanvas()->SetLogy(1);
+      
+      fHistListSM[i]->Draw();
+      fHistListSM[i]->SetTitle(title[i+6]);
+    }
+  }
+
+  
+  /*
+
+
+      fHistList[i]->SetMinimum(fRangePed[0]);
+      fHistList[i]->SetMaximum(fRangePed[1]);
+    }
+    
+    if ( fHistList[i] && (fIdxType == 1) && fSetRangeNoise) {
+      fHistList[i]->SetMinimum(fRangeNoise[0]);
+      fHistList[i]->SetMaximum(fRangeNoise[1]);
+    }
+
+    fCanvasList[pos]->GetCanvas()->Update();
+  }
+  */
+}
+
+//////////////////////////////////////////////////////////////////////////////////
diff --git a/TRD/qaGui/AliTRDqaGuiBlackError.h b/TRD/qaGui/AliTRDqaGuiBlackError.h
new file mode 100644 (file)
index 0000000..0937eb6
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef ALITRDQAGUIBLACKERROR_H 
+#define ALITRDQAGUIBLACKERROR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDqaGuiBlackError.h 23387 2008-01-17 17:25:16Z cblume $ */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+// of black (non zero zuppresed) events from TRD. 
+// It lets display and browse throu histograms created by the class 
+// AliTRDqaBlackEvents.
+// The class works in cooperation with AliTRDqaGuiMainBlack.
+//
+// S. Radomski 
+// Uni-Heidelberg
+// Feb. 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "TGFrame.h"  
+
+class TH1;
+class TGraph;
+class TString;
+class TRootEmbeddedCanvas;
+
+class AliTRDqaGuiBlackError : public TGCompositeFrame {
+  
+ public:
+
+  AliTRDqaGuiBlackError();
+  AliTRDqaGuiBlackError(TGWindow *parent);
+  ~AliTRDqaGuiBlackError() {}
+  
+  void SetQAFile(const char *filename);
+ protected:
+
+  char fFileName[265];                    // file with histograms
+  
+  TRootEmbeddedCanvas *fCanvasList[9];    // list of canvases
+  TH1    *fHistList[3];                   // and histograms
+  TGraph *fGraphList[3];                  // trand graphs
+  TH1    *fHistListSM[3];                 // histograms
+
+ private:
+
+  AliTRDqaGuiBlackError& operator = (const AliTRDqaGuiBlackError& /*g*/) { return *this; };
+  AliTRDqaGuiBlackError(const AliTRDqaGuiBlackError&);
+
+  ClassDef(AliTRDqaGuiBlackError,1)       // Gui class for black events
+
+};
+#endif
diff --git a/TRD/qaGui/AliTRDqaGuiBlackGlobal.cxx b/TRD/qaGui/AliTRDqaGuiBlackGlobal.cxx
new file mode 100644 (file)
index 0000000..21fd699
--- /dev/null
@@ -0,0 +1,145 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDqaGuiBlackGlobal.cxx 23387 2008-01-17 17:25:16Z cblume $ */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+// of black (non zero zuppresed) events from TRD. 
+// It lets display and browse throu histograms created by the class 
+// AliTRDqaBlackEvents.
+// The class works in cooperation with AliTRDqaGuiMainBlack.
+//
+// S. Radomski 
+// Uni-Heidelberg
+// June 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDqaGuiBlackGlobal.h"
+
+#include "TH1D.h"
+#include "TGraph.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TString.h"
+#include "TSystem.h"
+#include "TGaxis.h"
+
+#include "TRootEmbeddedCanvas.h"
+
+ClassImp(AliTRDqaGuiBlackGlobal)
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal() 
+{
+  //
+  // Default constructor
+  //
+
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiBlackGlobal::AliTRDqaGuiBlackGlobal(TGWindow *parent) 
+  : TGCompositeFrame(parent, 720, 500)
+{
+  //
+  // Main constructor
+  //
+    
+  SetLayoutManager(new TGMatrixLayout(this,2,3,0,0));
+
+  for(Int_t i=0; i<6; i++) {
+    fCanvasList[i] = new TRootEmbeddedCanvas(Form("pos_%d", i), this, 330, 350);
+    AddFrame(fCanvasList[i]);
+  }
+  
+  for(Int_t i=0; i<3; i++) {
+    fHistList[i] = 0;
+    fGraphList[i] = 0;
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiBlackGlobal::SetQAFile(const char *filename) {
+  //
+  // Set the file with histograms
+  //
+
+  TGaxis::SetMaxDigits(3);
+  
+  const char *names[6] = {
+    "smHcPed", "noiseTotal", "peakPeak",
+    "trendMCM", "nADCinEvent", ""
+  };  
+
+  const char *title[6] = {
+    "active half-chambers;super-module;half chamber",
+    ";noise (ADC)", 
+    ";peak-peak (ADC)",
+    ";event number;number of strange MCMs",
+    ";event number;number of fired ADC channels",
+    ""
+  };
+
+
+  strcpy(fFileName,filename);
+  for(int i=0; i<3; i++) {
+
+    if (fHistList[i]) delete fHistList[i];
+    if (fGraphList[i]) delete fGraphList[i];
+
+    fHistList[i] = 0;
+    fGraphList[i] = 0;
+  }
+  
+  TFile *file = new TFile(filename);
+  
+  for(Int_t i=0; i<3; i++) {
+
+    fHistList[i] = (TH1D*)file->Get(names[i]);
+    if (fHistList[i]) {
+      fCanvasList[i]->GetCanvas()->cd();
+      if (i==0) fHistList[i]->Draw("colz");
+      if (i>0) {
+       gPad->SetLogy();
+       fHistList[i]->Draw();
+      }
+      fHistList[i]->SetTitle(title[i]);
+      
+      // draw lines
+      if (i==0) {
+       for(Int_t stx=1; stx < 5; stx++) {
+         TLine *line = new TLine(-0.5, stx*12-0.5, 17.5, stx*12-0.5);
+         line->Draw(); 
+       }
+      }
+    }
+    
+    fGraphList[i] = (TGraph*)file->Get(names[i+3]);
+    if (fGraphList[i]) {
+      fCanvasList[i+3]->GetCanvas()->cd();
+      fGraphList[i]->Draw("apl");
+      fGraphList[i]->GetHistogram()->SetTitle(title[i+3]);
+    }
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////////
diff --git a/TRD/qaGui/AliTRDqaGuiBlackGlobal.h b/TRD/qaGui/AliTRDqaGuiBlackGlobal.h
new file mode 100644 (file)
index 0000000..cb0d38e
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef ALITRDQAGUIBLACKGLOBAL_H 
+#define ALITRDQAGUIBLACKGLOBAL_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDqaGuiBlackGlobal.h 23387 2008-01-17 17:25:16Z cblume $ */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+// of black (non zero zuppresed) events from TRD. 
+// It lets display and browse throu histograms created by the class 
+// AliTRDqaBlackEvents.
+// The class works in cooperation with AliTRDqaGuiMainBlack.
+//
+// S. Radomski 
+// Uni-Heidelberg
+// Feb. 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "TGFrame.h"  
+
+class TH1;
+class TGraph;
+class TString;
+class TRootEmbeddedCanvas;
+
+class AliTRDqaGuiBlackGlobal : public TGCompositeFrame {
+  
+ public:
+
+  AliTRDqaGuiBlackGlobal();
+  AliTRDqaGuiBlackGlobal(TGWindow *parent);
+  ~AliTRDqaGuiBlackGlobal() {}
+  
+  void SetQAFile(const char *filename);
+ protected:
+
+  char fFileName[265];                    // file with histograms
+  
+  TRootEmbeddedCanvas *fCanvasList[6];    // list of canvases
+  TH1    *fHistList[3];                   // and histograms
+  TGraph *fGraphList[2];                  // trand graphs
+
+ private:
+
+  AliTRDqaGuiBlackGlobal& operator = (const AliTRDqaGuiBlackGlobal& /*g*/) { return *this; };
+  AliTRDqaGuiBlackGlobal(const AliTRDqaGuiBlackGlobal&);
+
+  ClassDef(AliTRDqaGuiBlackGlobal,1)      // Gui class for black events 
+
+};
+
+#endif
index 6f88c325507d2dffdc0a4fc032388c0a0a71ebfa..0ba7ed291c4c1a4a46198c5574caa52facbc4da9 100644 (file)
@@ -51,7 +51,7 @@ AliTRDqaGuiBlackSM::AliTRDqaGuiBlackSM()
     fIdxType(0),
     fSetRangePed(0),
     fSetRangeNoise(0),
-    fFileName(0),
+    //fFileName(0),
     fGPanel(0),
     fGCanvas(0),
     fGSelect(0),
@@ -69,7 +69,7 @@ AliTRDqaGuiBlackSM::AliTRDqaGuiBlackSM(TGWindow *parent)
     fIdxType(0),
     fSetRangePed(0),
     fSetRangeNoise(0),
-    fFileName(0),
+    //fFileName(0),
     fGPanel(0),
     fGCanvas(0),
     fGSelect(0),
@@ -96,16 +96,17 @@ AliTRDqaGuiBlackSM::AliTRDqaGuiBlackSM(TGWindow *parent)
 
   fGSelect = new TGComboBox(fGPanel);
   for(int i=0; i<18; i++) fGSelect->AddEntry(Form("SM %d", i), i);
-  fGSelect->Resize(100, fGPrev->GetHeight());
+  fGSelect->Resize(100, (Int_t)(fGPrev->GetHeight()*1.4));
   fGSelect->Select(fIdx,0);
 
-  const char *textTypes[8] = {
-    "pedestals", "noise", "pedestalDist", "noiseDist", "signal", "entries", "entriesDist", "entriesRM"
+  const char *textTypes[11] = {
+    "pedestals", "noise", "peak-peak", "pedestalDist", "noiseDist", "signal", 
+    "entries", "entriesDist", "entriesRM", "errorLocMCM", "errorLocADC"
   };
   
   fGSelectType = new TGComboBox(fGPanel);
-  for(int i=0; i<8; i++) fGSelectType->AddEntry(textTypes[i], i);
-  fGSelectType->Resize(100, fGPrev->GetHeight());
+  for(int i=0; i<11; i++) fGSelectType->AddEntry(textTypes[i], i);
+  fGSelectType->Resize(100, (Int_t)(fGPrev->GetHeight()*1.4));
   fGSelectType->Select(fIdxType, 0);
 
   //fGPlay = new TGTextButton(fGPanel, "PLAY");
@@ -155,11 +156,12 @@ void AliTRDqaGuiBlackSM::SetQAFile(const char *filename) {
   // Set the file with histograms
   //
  
-  const char *names[8] = {"ped", "noise", "pedDist", "noiseDist", "signal", "entries", "entriesDist", "entriesRM"};
-  const char *opt[8] = {"col", "col", "", "", "", "colz", "", "col"};
-  const Int_t kLogy[8] = {0, 0, 1, 1, 1, 0, 1, 0};
+  const char *names[11] = {"ped", "noise", "pp","pedDist", "noiseDist", "signal", 
+                         "entries", "entriesDist", "entriesRM", "errorLocMCM", "errorLocADC" };
+  const char *opt[11] = {"col", "col", "", "", "", "", "col", "", "col", "col", "col"};
+  const Int_t kLogy[11] = {0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0};
 
-  fFileName = filename;
+  strcpy(fFileName,filename);
  
   for(int i=0; i<30; i++) {
     if (fHistList[i]) delete fHistList[i];
@@ -182,7 +184,7 @@ void AliTRDqaGuiBlackSM::SetQAFile(const char *filename) {
 
     if (fHistList[i]) fHistList[i]->Draw(opt[fIdxType]);
 
-    if (fHistList[i] && (fIdxType == 5)) {
+    if (fHistList[i] && (fIdxType == 6)) {
       fHistList[i]->SetMinimum(0);
       fHistList[i]->SetMaximum(2);
     }
@@ -210,7 +212,7 @@ void AliTRDqaGuiBlackSM::SetSM(Int_t idx) {
   
   fIdx = idx; 
   fGSelect->Select(fIdx, 0); 
-  SetQAFile(fFileName.Data());
+  SetQAFile(fFileName);
 }
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -222,7 +224,7 @@ void AliTRDqaGuiBlackSM::SelectType(Int_t idx) {
 
   fIdxType = idx;
   fGSelectType->Select(fIdxType, 0);
-  SetQAFile(fFileName.Data());
+  SetQAFile(fFileName);
 }
 
 //////////////////////////////////////////////////////////////////////////////////
index 78a9d7b49ee51b8664d6e59b280916e1df4e79d7..1338e27d5c10df3a50a03a204740eb7bcd025952 100644 (file)
@@ -71,7 +71,7 @@ class AliTRDqaGuiBlackSM : public TGCompositeFrame {
   Double_t fRangeNoise[2];      // range for noise
 
 
-  TString fFileName;            // file with histograms
+  char fFileName[265];            // file with histograms
   
   TRootEmbeddedCanvas *fCanvasList[30];  // list of canvases
   TH1 *fHistList[30];                    // and histograms
index 35c35aa94d08fe12f3d2b61044a24da51e5d388c..feeeb33fe332cb73f2d21f552372611f2f668588 100644 (file)
@@ -31,6 +31,7 @@
 #include "AliTRDqaGuiClusters.h"
 
 #include "TH1D.h"
+#include "TH2D.h"
 #include "TFile.h"
 #include "TCanvas.h"
 #include "TRootEmbeddedCanvas.h"
@@ -73,6 +74,8 @@ void AliTRDqaGuiClusters::SetQAFile(const char *filename) {
 
   for(Int_t i=0; i<4; i++) {
     if (fHistList[i]) delete fHistList[i];
+    for(Int_t j=0; j<3; j++) 
+      if (fHistRefs[i][j]) delete fHistRefs[i][j];
   }
   
   const char *opt[4] = {"colz", "", "", ""};
@@ -81,12 +84,68 @@ void AliTRDqaGuiClusters::SetQAFile(const char *filename) {
   file->cd("TRD/RecPoints");
   
   for(int i=0; i<4; i++) {
-    fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_recPoints_%s", fNameList[i]));
+
     fCanvasList[i]->GetCanvas()->cd();
     gPad->SetLogy(fgkLogList[i]);
+
+    fHistList[i] = (TH1D*)gDirectory->Get(Form("qaTRD_recPoints_%s", fNameList[i]));
     if (fHistList[i]) fHistList[i]->Draw(opt[i]);
+    // if (fgkLogList[i]) fHistList[i]->SetMinimum(0.1);
+    
+    TH1D *refHist = (TH1D*)gDirectory->Get(Form("qaTRD_recPoints_%s_%s", fNameList[i], "ref"));
+    
+    if (refHist) {
+      BuildColor(i, refHist);
+      for(Int_t j=0; j<3; j++) fHistRefs[i][j]->Draw("SAME");
+      delete refHist;
+    }
+    
     fCanvasList[i]->GetCanvas()->Update();
   }
 }
 
 //////////////////////////////////////////////////////////////////////////////////
+/*
+TH2D *AliTRDqaGuiClusters::BuildHisto(TH1D *ref, TH1D *data) {
+  
+  Int_t nbinsx = ref->GetNbinsX();
+  Double_t minx = ref->GetXaxis()->GetXmin();
+  Double_t maxx = ref->GetXaxis()->GetXmax();
+  Double_t min  = data->GetMinimum(); 
+  Double_t max  = data->GetMaximum();
+  
+  TH2D *pad = new TH2D("pad", "", nbinsx, minx, maxx, 1, 0.7, 0.9);
+
+  // rewriting
+  for(Int_t i=0; i<nbinsx; i++) {
+    Double_t x = ref->GetBinCenter(i+1);
+    pad->Fill(x, 0.8, ref->GetBinContent(i+1));
+  }
+  
+  pad->SetMinimum(-1);
+  return pad;
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiClusters::BuildColor(Int_t i, TH1D *ref) {
+  
+  const Int_t nHist = 3;
+  const Int_t clr[nHist] = {3, 5, 2};
+
+  for(Int_t j=0; j<nHist; j++) {
+    fHistRefs[i][j] = (TH1D*)fHistList[i]->Clone(Form("%s_%d", fHistList[i]->GetName(), j));
+    fHistRefs[i][j]->SetFillColor(clr[j]);
+    fHistRefs[i][j]->SetLineColor(clr[j]);   
+  }
+  
+  for(Int_t k=0; k<ref->GetNbinsX(); k++) {
+    Double_t v = ref->GetBinContent(k+1);
+    if (v < 0.3) fHistRefs[i][1]->SetBinContent(k+1, 0);
+    if (v < 0.7) fHistRefs[i][2]->SetBinContent(k+1, 0);
+  }
+  
+}
+
+//////////////////////////////////////////////////////////////////////////////////
index 81aea4d09948ef96db28a7621c0bd37113fd7eda..3a28e4b2fccb06ae3e6524c92243b7524a261ebb 100644 (file)
@@ -22,6 +22,7 @@
 #include "TGFrame.h"  
 
 class TH1D;
+class TH2D;
 class TRootEmbeddedCanvas;
 
 class AliTRDqaGuiClusters : public TGCompositeFrame {
@@ -41,6 +42,10 @@ class AliTRDqaGuiClusters : public TGCompositeFrame {
  
   TRootEmbeddedCanvas *fCanvasList[4]; // list of canvases
   TH1D *fHistList[4];                  // and histograms
+  TH1D *fHistRefs[4][3];               // histograms with colors
+
+  // TH2D *BuildHisto(TH1D *ref, TH1D *data);
+  void BuildColor(Int_t i, TH1D *ref);
 
  private:
   AliTRDqaGuiClusters& operator = (const AliTRDqaGuiClusters& /*g*/) { return *this; };
index 33ae0205dc78189bd639a0b0ece8341bc5413bc8..5e726d3200b8ad8b4747dc43fd7a1739f355cfe3 100644 (file)
@@ -88,7 +88,7 @@ AliTRDqaGuiClustersSM::AliTRDqaGuiClustersSM(TGWindow *parent)
 
   fGSelect = new TGComboBox(fGPanel);
   for(int i=0; i<18; i++) fGSelect->AddEntry(Form("SM %d", i), i);
-  fGSelect->Resize(100, fGPrev->GetHeight());
+  fGSelect->Resize(100, (Int_t)(1.4*fGPrev->GetHeight()));
   fGSelect->Select(fIdx);
 
   fGPlay = new TGTextButton(fGPanel, "PLAY");
index 016882dd4da579bdd50c0f9fd4d672ad00979413..e3f4cdd0e68ce14ee7c26bf24ac9f6de80ebe1d4 100644 (file)
@@ -108,12 +108,12 @@ AliTRDqaGuiClustersStack::AliTRDqaGuiClustersStack(TGWindow *parent)
 
   fGSelectSM = new TGComboBox(fGPanel);
   for(int i=0; i<fgknSM; i++) fGSelectSM->AddEntry(Form("SM %d", i), i);
-  fGSelectSM->Resize(100, fGPrevSM->GetHeight());
+  fGSelectSM->Resize(100, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectSM->Select(fIdxSM);
 
   fGSelectStack = new TGComboBox(fGPanel);
   for(int i=0; i<fgknStack; i++) fGSelectStack->AddEntry(Form("Stack %d", i), i);
-  fGSelectStack->Resize(100, fGPrevSM->GetHeight());
+  fGSelectStack->Resize(100, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectStack->Select(fIdxStack);
 
   fGPlay = new TGTextButton(fGPanel, "PLAY");
@@ -123,7 +123,7 @@ AliTRDqaGuiClustersStack::AliTRDqaGuiClustersStack(TGWindow *parent)
   fGSelectView->AddEntry("time -- signal MPV", 1);
   fGSelectView->AddEntry("time -- total charge", 2);
   fGSelectView->AddEntry("time -- nClusters", 3);
-  fGSelectView->Resize(150, fGPrevSM->GetHeight());
+  fGSelectView->Resize(150, (Int_t)(fGPrevSM->GetHeight()*1.4));
   fGSelectView->Select(0);
 
   TGLayoutHints *hint = new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5);
index 34b564ba3d424dc5d93167626604f2aeb9c5a840..ea3bc6570c7f788d0b5f6fba766e4dbaf343e697 100644 (file)
@@ -30,6 +30,8 @@
 #include "AliTRDqaGuiMainBlack.h"
 #include "AliTRDqaGuiBlackSM.h"
 #include "AliTRDqaGuiBlackChamber.h"
+#include "AliTRDqaGuiBlackError.h"
+#include "AliTRDqaGuiBlackGlobal.h"
 
 #include "TGTab.h"
 
@@ -41,7 +43,9 @@ AliTRDqaGuiMainBlack::AliTRDqaGuiMainBlack(TGWindow *parent)
 : TGMainFrame(parent, 400, 400),
   fGTabPanel(0),
   fGSM(0),
-  fGChamber(0)
+  fGChamber(0),
+  fGError(0),
+  fGGlobal(0)
 {
   //
   // Main constructor
@@ -50,16 +54,21 @@ AliTRDqaGuiMainBlack::AliTRDqaGuiMainBlack(TGWindow *parent)
   fGTabPanel = new TGTab(this);
   fGSM       = new AliTRDqaGuiBlackSM(fGTabPanel);
   fGChamber  = new AliTRDqaGuiBlackChamber(fGTabPanel);
-  
+  fGError    = new AliTRDqaGuiBlackError(fGTabPanel);
+  fGGlobal   = new AliTRDqaGuiBlackGlobal(fGTabPanel);
+
   fGChamber->SetRangePed(8, 11);
   fGChamber->SetRangeNoise(0.5, 2);
 
   fGSM->SetRangePed(8, 11);
   fGSM->SetRangeNoise(0.5, 3);
 
+  fGTabPanel->AddTab("Global View", fGGlobal);
   fGTabPanel->AddTab("Super Module", fGSM);
   fGTabPanel->AddTab("Chamber", fGChamber);
-   
+  fGTabPanel->AddTab("Reader Error", fGError);
+
+
   AddFrame(fGTabPanel);
   
   SetWindowName("TRD QA -- Black Events");
@@ -78,6 +87,8 @@ void AliTRDqaGuiMainBlack::SetQAFile(const char *file)
  
   fGChamber->SetQAFile(file);
   fGSM->SetQAFile(file);
+  fGError->SetQAFile(file);
+  fGGlobal->SetQAFile(file);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
index 12abcc4e277755f5eee40f32f411e9ac5412cd1d..106a13f34bbcf6bf549b81444aae739f4962a813 100644 (file)
@@ -25,6 +25,8 @@ class TGTab;
 
 class AliTRDqaGuiBlackSM;
 class AliTRDqaGuiBlackChamber;  
+class AliTRDqaGuiBlackError;
+class AliTRDqaGuiBlackGlobal;
 
 class AliTRDqaGuiMainBlack : public TGMainFrame {
 
@@ -41,6 +43,8 @@ class AliTRDqaGuiMainBlack : public TGMainFrame {
    
   AliTRDqaGuiBlackSM       *fGSM;      // Something else
   AliTRDqaGuiBlackChamber  *fGChamber; // Something 
+  AliTRDqaGuiBlackError    *fGError;  // somethig
+  AliTRDqaGuiBlackGlobal   *fGGlobal;  // global view
 
  private:  
   AliTRDqaGuiMainBlack& operator = (const AliTRDqaGuiMainBlack& /*g*/) { return *this; };
index f42af231f6ee3280b870c63dbab3bcb1329b5d49..63bede63b70ce34a4a6d73ab4b44b32d5a47006f 100644 (file)
@@ -1,6 +1,7 @@
 
 void testQAGui(const char *filename) {
   
+  // gROOT->ForceStyle();
   gROOT->SetStyle("Plain");
   gStyle->SetPalette(1);
   gStyle->SetOptStat(0);
@@ -11,6 +12,8 @@ void testQAGui(const char *filename) {
   gStyle->SetTitleW(0.45);
   gStyle->SetTitleH(0.05);
 
+  gStyle->SetLabelFont(52, "XY");
+
 
   gSystem->Load("libGui.so");
   gSystem->Load("libTRDgui.so");