]>
Commit | Line | Data |
---|---|---|
ca8a6926 | 1 | // @(#)root/eve:$Id$ |
2 | // Author: Matevz Tadel 2007 | |
3 | ||
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 | **************************************************************************/ | |
9 | ||
10 | #include "AliEveV0Editor.h" | |
11 | #include "AliEveV0.h" | |
12 | ||
13 | #include "TVirtualPad.h" | |
14 | #include "TColor.h" | |
15 | ||
16 | // Cleanup these includes: | |
17 | #include "TGLabel.h" | |
18 | #include "TGButton.h" | |
19 | #include "TGNumberEntry.h" | |
20 | #include "TGColorSelect.h" | |
21 | #include "TGDoubleSlider.h" | |
22 | ||
23 | ||
24 | //______________________________________________________________________________ | |
25 | // GUI editor for AliEveV0. | |
26 | // | |
27 | ||
28 | ClassImp(AliEveV0Editor) | |
29 | ||
30 | //______________________________________________________________________________ | |
31 | AliEveV0Editor::AliEveV0Editor(const TGWindow *p, Int_t width, Int_t height, | |
32 | UInt_t options, Pixel_t back) : | |
33 | TGedFrame(p, width, height, options | kVerticalFrame, back), | |
34 | fM(0), | |
35 | fInfoLabel0(0), | |
36 | fInfoLabel1(0), | |
37 | fXButton(0) | |
38 | // Initialize widget pointers to 0 | |
39 | { | |
40 | // Constructor. | |
41 | ||
42 | MakeTitle("AliEveV0"); | |
43 | ||
44 | fInfoLabel0 = new TGLabel(this); | |
45 | fInfoLabel0->SetTextJustify(kTextLeft); | |
46 | AddFrame(fInfoLabel0, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, | |
47 | 8, 0, 2, 0)); | |
48 | ||
49 | fInfoLabel1 = new TGLabel(this); | |
50 | fInfoLabel1->SetTextJustify(kTextLeft); | |
51 | AddFrame(fInfoLabel1, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, | |
52 | 8, 0, 2, 0)); | |
53 | ||
54 | fXButton = new TGTextButton(this, "Detailed View"); | |
55 | AddFrame(fXButton, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0)); | |
56 | fXButton->Connect("Clicked()", "AliEveV0Editor", this, "DisplayDetailed()"); | |
57 | } | |
58 | ||
59 | /******************************************************************************/ | |
60 | ||
61 | //______________________________________________________________________________ | |
62 | void AliEveV0Editor::SetModel(TObject* obj) | |
63 | { | |
64 | // Set model object. | |
65 | ||
66 | fM = dynamic_cast<AliEveV0*>(obj); | |
67 | ||
68 | // Set values of widgets | |
e1bb28b4 | 69 | fInfoLabel0->SetText(Form("Radius = %f, DCA = %f", fM->GetRadius(), fM->GetDaughterDCA())); |
70 | fInfoLabel1->SetText(Form("Pt = %f", fM->GetPt())); | |
ca8a6926 | 71 | } |
72 | ||
73 | /******************************************************************************/ | |
74 | ||
75 | // Implements callback/slot methods | |
76 | ||
77 | //______________________________________________________________________________ | |
78 | // void AliEveV0Editor::DoXYZZ() | |
79 | // { | |
80 | // // Slot for XYZZ. | |
81 | // | |
82 | // fM->SetXYZZ(fXYZZ->GetValue()); | |
83 | // Update(); | |
84 | // } | |
85 | ||
86 | void AliEveV0Editor::DisplayDetailed() | |
87 | { | |
88 | printf("Hura!\n"); | |
89 | } |