#include "TString.h"
#include "TSystem.h"
+#include "TLine.h"
#include "TPaveText.h"
#include "TGLabel.h"
#include "TGComboBox.h"
//////////////////////////////////////////////////////////////////////////////////
AliTRDqaGuiBlackChamber::AliTRDqaGuiBlackChamber()
- : fSetRangePed(0),
+ : fView(0),
+ fSetRangePed(0),
fSetRangeNoise(0),
fIdxSM(0),
fIdxChamber(0),
fGCanvasDown(0),
fGSelectSM(0),
fGSelectChamber(0),
+ fGSelectView(0),
fGPrevSM(0),
- fGPrevChamber(0),
+ fGPrevChamber(0),
fGNextSM(0),
fGNextChamber(0)
{
//////////////////////////////////////////////////////////////////////////////////
-AliTRDqaGuiBlackChamber::AliTRDqaGuiBlackChamber(TGWindow *parent)
+AliTRDqaGuiBlackChamber::AliTRDqaGuiBlackChamber(TGWindow *parent)
: TGCompositeFrame(parent, 720, 500),
+ fView(0),
fSetRangePed(0),
fSetRangeNoise(0),
fIdxSM(0),
fGCanvasDown(0),
fGSelectSM(0),
fGSelectChamber(0),
+ fGSelectView(0),
fGPrevSM(0),
fGPrevChamber(0),
fGNextSM(0),
// main constructor
//
- // steering panel
+ // steering panel
SetLayoutManager(new TGVerticalLayout(this));
-
fGPanel = new TGHorizontalFrame(this);
// fGLabel = new TGLabel(fGPanel, "Current Chamber: ");
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, (Int_t)(fGPrevSM->GetHeight()*1.4));
+ fGSelectView->Select(0);
+
+
//fGPlay = new TGTextButton(fGPanel, "PLAY");
TGLayoutHints *hint = new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5);
fGPanel->AddFrame(fGNextChamber, hint);
fGPanel->AddFrame(fGNextSM, hint);
+ fGPanel->AddFrame(fGSelectView, hint);
//fGPanel->AddFrame(fGPlay, hint);
AddFrame(fGPanel);
fGSelectSM->Connect("Selected(Int_t)", "AliTRDqaGuiBlackChamber", this, "SelectSM(Int_t)");
fGSelectChamber->Connect("Selected(Int_t)", "AliTRDqaGuiBlackChamber", this, "SelectChamber(Int_t)");
+ fGSelectView->Connect("Selected(Int_t)", "AliTRDqaGuiBlackChamber", this, "SelectView(Int_t)");
+
//fGPlay->Connect("Clicked()", "AliTRDqaGuiBlackChamber", this, "Play()");
// histograms
// sets a file with histograms
//
-
- const char *names[5] = {"ped", "noise", "pedDist", "noiseDist", "signal"};
- const char *opt[5] = {"colz", "colz", "", "", ""};
- const Int_t kLogy[5] = {0, 0, 1, 1, 0};
+ //const char *names[5] = {"ped", "noise", "pedDist", "noiseDist", "signal"};
+ const char *names[10] = {
+ "ped", "noise", "pedDist", "noiseDist", "signal",
+ "entries", "entriesRM", "entriesDist", "", ""
+ };
+ const char *opt[10] = {"colz", "colz", "", "", "", "colz", "colz", "", "", ""};
+ const Int_t kLogy[10] = {0, 0, 1, 1, 1, 0, 0, 1, 1,1};
strcpy(fFileName, filename);
for(Int_t i=0; i<5; i++) {
Int_t index = fIdxSM * 30 + fIdxChamber;
- const char *nn = Form("%s_%d", names[i], index);
+ const char *nn = Form("%s_%d", names[i+5*fView], index);
//printf("%s\n", nn);
fHistList[i] = (TH1*)file->Get(nn); //Form("%s_$d", names[fIdxType], index));
if (!fHistList[i]) continue;
-
- if ( (i == 0) && fSetRangePed) {
+
+ if ( (fView == 1) && (i == 0)) {
+ fHistList[i]->SetMinimum(0);
+ fHistList[i]->SetMaximum(2);
+ }
+
+ if ( (fView == 0) && (i == 0) && fSetRangePed) {
fHistList[i]->SetMinimum(fRangePed[0]);
fHistList[i]->SetMaximum(fRangePed[1]);
}
- if ( (i == 1) && fSetRangeNoise) {
+ if ( (fView == 0) && (i == 1) && fSetRangeNoise) {
fHistList[i]->SetMinimum(fRangeNoise[0]);
fHistList[i]->SetMaximum(fRangeNoise[1]);
}
-
fCanvasList[i]->GetCanvas()->cd();
- fCanvasList[i]->GetCanvas()->SetLogy(kLogy[i]);
- if (fHistList[i]) fHistList[i]->Draw(opt[i]);
- fCanvasList[i]->GetCanvas()->Update();
+ 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();
}
//////////////////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiBlackChamber::SetView(Int_t idxView) {
+ //
+ // sets active view
+ //
+
+ fView = idxView;
+ fGSelectView->Select(idxView);
+ SetQAFile(fFileName);
+}
+//////////////////////////////////////////////////////////////////////////////////