]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveHLT/AliEveHOMERManagerEditor.cxx
From Jochen - EveHLT development accumulated since the end of March.
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHOMERManagerEditor.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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 "AliEveHOMERManagerEditor.h"
11 #include "AliEveHOMERManager.h"
12
13 #include <TVirtualPad.h>
14 #include <TColor.h>
15 #include <TROOT.h>
16
17 #include <TGLabel.h>
18 #include <TGButton.h>
19 #include <TGNumberEntry.h>
20 #include <TGColorSelect.h>
21 #include <TGDoubleSlider.h>
22
23 //______________________________________________________________________________
24 // AliEveHOMERManagerEditor
25 //
26
27 ClassImp(AliEveHOMERManagerEditor)
28
29 AliEveHOMERManagerEditor::AliEveHOMERManagerEditor(const TGWindow *p, Int_t width, Int_t height,
30              UInt_t options, Pixel_t back) :
31   TGedFrame(p, width, height, options | kVerticalFrame, back),
32   fM(0),
33   fButtonConnect(0),
34   fButtonNextEvent(0),
35   fButtonEventLoop(0),
36   fEventLoopStarted(kFALSE) {
37
38   MakeTitle("AliEveHOMERManager");
39
40   // Create widgets
41   // fXYZZ = new TGSomeWidget(this, ...);
42   // AddFrame(fXYZZ, new TGLayoutHints(...));
43   // fXYZZ->Connect("SignalName()", "AliEveHOMERManagerEditor", this, "DoXYZZ()");
44
45   fButtonConnect = new TGTextButton(this, "  Connect to HLT  ");
46   AddFrame(fButtonConnect); //, new TGLayoutHints(...));
47   fButtonConnect->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "ConnectToHLT()");
48
49   fButtonNextEvent = new TGTextButton(this, "  NextEvent  ");
50   AddFrame(fButtonNextEvent); //, new TGLayoutHints(...));
51   fButtonNextEvent->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "NextEvent()");
52
53   fButtonEventLoop = new TGTextButton(this, "  not yet used  ");
54   AddFrame(fButtonEventLoop); //, new TGLayoutHints(...));
55   fButtonEventLoop->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "EventLoop()");
56
57 }
58
59 /******************************************************************************/
60
61 void AliEveHOMERManagerEditor::SetModel(TObject* obj)
62 {
63   fM = dynamic_cast<AliEveHOMERManager*>(obj);
64
65   // Set values of widgets
66   // fXYZZ->SetValue(fM->GetXYZZ());
67 }
68
69 /******************************************************************************/
70
71 // Implements callback/slot methods
72
73 // void AliEveHOMERManagerEditor::DoXYZZ()
74 // {
75 //   fM->SetXYZZ(fXYZZ->GetValue());
76 //   Update();
77 // }
78
79 void AliEveHOMERManagerEditor::ConnectToHLT()
80 {
81   // Connects to HOMER sources -> to HLT.
82
83   fM->ConnectHOMER();
84 }
85
86 void AliEveHOMERManagerEditor::NextEvent()
87 {
88   // call next event from macro
89   gROOT->ProcessLineFast("nextEvent();");
90
91 }
92
93 void AliEveHOMERManagerEditor::EventLoop()
94 {
95   // Start/stop event loop
96
97   fM->ConnectHOMER();
98 }