]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveHLT/AliEveHOMERManagerEditor.cxx
1)AliCaloPID: Posibility to recalculate PID bayesian in EMCAL
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHOMERManagerEditor.cxx
CommitLineData
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
9
10#include "AliEveHOMERManagerEditor.h"
707b281a 11#include "AliEveHOMERManager.h"
d810d0de 12
13#include <TVirtualPad.h>
14#include <TColor.h>
7279ee15 15#include <TROOT.h>
d810d0de 16
17#include <TGLabel.h>
18#include <TGButton.h>
19#include <TGNumberEntry.h>
20#include <TGColorSelect.h>
21#include <TGDoubleSlider.h>
707b281a 22
57ffa5fb 23//______________________________________________________________________________
d810d0de 24// AliEveHOMERManagerEditor
25//
26
27ClassImp(AliEveHOMERManagerEditor)
28
29AliEveHOMERManagerEditor::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),
7279ee15 33 fButtonConnect(0),
34 fButtonNextEvent(0),
35 fButtonEventLoop(0),
36 fEventLoopStarted(kFALSE) {
37
d810d0de 38 MakeTitle("AliEveHOMERManager");
39
40 // Create widgets
41 // fXYZZ = new TGSomeWidget(this, ...);
42 // AddFrame(fXYZZ, new TGLayoutHints(...));
43 // fXYZZ->Connect("SignalName()", "AliEveHOMERManagerEditor", this, "DoXYZZ()");
46eadbb4 44
7279ee15 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
a82a31af 53
54 fButtonEventLoop = new TGPictureButton(this, gClient->GetPicture("$ALICE_ROOT/EVE/hlt-macros/HLT-logo.png"));
7279ee15 55 AddFrame(fButtonEventLoop); //, new TGLayoutHints(...));
56 fButtonEventLoop->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "EventLoop()");
d810d0de 57
58}
59
57ffa5fb 60/******************************************************************************/
d810d0de 61
62void AliEveHOMERManagerEditor::SetModel(TObject* obj)
63{
64 fM = dynamic_cast<AliEveHOMERManager*>(obj);
65
66 // Set values of widgets
67 // fXYZZ->SetValue(fM->GetXYZZ());
68}
69
57ffa5fb 70/******************************************************************************/
d810d0de 71
72// Implements callback/slot methods
73
74// void AliEveHOMERManagerEditor::DoXYZZ()
75// {
76// fM->SetXYZZ(fXYZZ->GetValue());
77// Update();
78// }
79
7279ee15 80void AliEveHOMERManagerEditor::ConnectToHLT()
d810d0de 81{
4b456ebb 82 // Connects to HOMER sources -> to HLT.
83
a82a31af 84 fM->ConnectEVEtoHOMER();
d810d0de 85}
7279ee15 86
87void AliEveHOMERManagerEditor::NextEvent()
88{
89 // call next event from macro
90 gROOT->ProcessLineFast("nextEvent();");
91
92}
93
94void AliEveHOMERManagerEditor::EventLoop()
95{
7279ee15 96
a82a31af 97 // Start/stop event loop
98 if ( !fEventLoopStarted ) {
99 gROOT->ProcessLineFast("loopEvent();");
100 fEventLoopStarted = kTRUE;
101 }
102 else {
103 gROOT->ProcessLineFast("stopLoopEvent();");
104 fEventLoopStarted = kFALSE;
105 }
7279ee15 106}