2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #include "AliEvePMDModuleEditor.h"
11 #include <EveDet/AliEvePMDModule.h>
12 #include <TEveGedEditor.h>
14 #include <TVirtualPad.h>
20 #include <TGNumberEntry.h>
21 #include <TGColorSelect.h>
22 #include <TGDoubleSlider.h>
25 #include <TGLViewer.h>
26 #include <TEveManager.h>
32 //______________________________________________________________________________
33 // AliEvePMDModuleEditor
36 ClassImp(AliEvePMDModuleEditor)
38 AliEvePMDModuleEditor::AliEvePMDModuleEditor(const TGWindow *p, Int_t width, Int_t height,
39 UInt_t options, Pixel_t back) :
40 TGedFrame(p, width, height, options | kVerticalFrame, back),
49 // Initialize widget pointers to 0
51 MakeTitle("AliEvePMDModule");
56 void AliEvePMDModuleEditor::CreateInfoFrame()
58 fInfoFrame = CreateEditorTabSubFrame("Info");
60 TGCompositeFrame *title1 = new TGCompositeFrame(fInfoFrame, 145, 10,
66 title1->AddFrame(new TGLabel(title1, "AliEvePMDModule Info"),
67 new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
68 title1->AddFrame(new TGHorizontal3DLine(title1),
69 new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
70 fInfoFrame->AddFrame(title1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
74 fInfoLabel0 = new TGLabel(fInfoFrame);
75 fInfoLabel0->SetTextJustify(kTextLeft);
76 fInfoFrame->AddFrame(fInfoLabel0, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
79 fInfoLabel1 = new TGLabel(fInfoFrame);
80 fInfoLabel1->SetTextJustify(kTextLeft);
81 fInfoFrame->AddFrame(fInfoLabel1, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
84 fInfoLabel2 = new TGLabel(fInfoFrame);
85 fInfoLabel2->SetTextJustify(kTextLeft);
86 fInfoFrame->AddFrame(fInfoLabel2, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
89 fInfoLabel3 = new TGLabel(fInfoFrame);
90 fInfoLabel3->SetTextJustify(kTextLeft);
91 fInfoFrame->AddFrame(fInfoLabel3, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
94 fInfoLabel4 = new TGLabel(fInfoFrame);
95 fInfoLabel4->SetTextJustify(kTextLeft);
96 fInfoFrame->AddFrame(fInfoLabel4, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
99 fInfoLabel5 = new TGLabel(fInfoFrame);
100 fInfoLabel5->SetTextJustify(kTextLeft);
101 fInfoFrame->AddFrame(fInfoLabel5, new TGLayoutHints(kLHintsLeft|kLHintsExpandX,
106 TGHorizontalFrame* f = new TGHorizontalFrame(fInfoFrame, 210, 20, kFixedWidth);
108 TGHorizontalFrame* g = new TGHorizontalFrame(f, labelW, 0, kFixedWidth);
109 TGLabel* l = new TGLabel(g, "Histos:");
110 g->AddFrame(l, new TGLayoutHints(kLHintsLeft, 0,0,4,0));
115 b = new TGTextButton(f, "Show");
116 f->AddFrame(b, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0));
117 b->Connect("Clicked()", "AliEvePMDModuleEditor", this, "DisplayHistos()");
119 fInfoFrame->AddFrame(f, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
123 AliEvePMDModuleEditor::~AliEvePMDModuleEditor()
126 /******************************************************************************/
128 void AliEvePMDModuleEditor::SetModel(TObject* obj)
130 fM = dynamic_cast<AliEvePMDModule*>(obj);
132 // Set values of widgets
134 fInfoLabel0->SetText(Form("Cells hit per Module : %d", fM->GetNPads()));
135 fInfoLabel1->SetText(Form("ADC per Module : %d", fM->GetAdc()));
136 fInfoLabel2->SetText(Form("Tot Cells for PRE : %d", fM->GetPRETotPads()));
137 fInfoLabel3->SetText(Form("Tot ADC for PRE : %d", fM->GetPRETotAdc()));
138 fInfoLabel4->SetText(Form("Tot Cells for CPV : %d", fM->GetCPVTotPads()));
139 fInfoLabel5->SetText(Form("Tot ADC for CPV : %d", fM->GetCPVTotAdc()));
142 void AliEvePMDModuleEditor::DisplayHistos()
144 fM->GetHisto()->Draw();