]>
Commit | Line | Data |
---|---|---|
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> | |
cfa641b1 | 22 | #include <TGComboBox.h> |
707b281a | 23 | |
57ffa5fb | 24 | //______________________________________________________________________________ |
d810d0de | 25 | // AliEveHOMERManagerEditor |
26 | // | |
27 | ||
28 | ClassImp(AliEveHOMERManagerEditor) | |
29 | ||
30 | AliEveHOMERManagerEditor::AliEveHOMERManagerEditor(const TGWindow *p, Int_t width, Int_t height, | |
31 | UInt_t options, Pixel_t back) : | |
cfa641b1 | 32 | |
33 | TGedFrame(p, width, height, options | kVerticalFrame, back), | |
d810d0de | 34 | fM(0), |
3ce2db7a | 35 | fButtonConnect(NULL), |
d52fea52 | 36 | fButtonWriteToFile(0), |
7279ee15 | 37 | fButtonNextEvent(0), |
71614c9f | 38 | fButtonPrintScreens(NULL), |
30e7579c | 39 | fBoxTriggerSelector(0) |
cfa641b1 | 40 | { |
41 | ||
d810d0de | 42 | MakeTitle("AliEveHOMERManager"); |
43 | ||
44 | // Create widgets | |
45 | // fXYZZ = new TGSomeWidget(this, ...); | |
46 | // AddFrame(fXYZZ, new TGLayoutHints(...)); | |
47 | // fXYZZ->Connect("SignalName()", "AliEveHOMERManagerEditor", this, "DoXYZZ()"); | |
46eadbb4 | 48 | |
3ce2db7a | 49 | fButtonConnect = new TGTextButton(this, " Reconnect "); |
50 | AddFrame(fButtonConnect); //, new TGLayoutHints(...)); | |
51 | fButtonConnect->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "ConnectToHLT()"); | |
cfa641b1 | 52 | |
53 | fButtonWriteToFile = new TGTextButton(this, " Write to file "); | |
54 | AddFrame(fButtonWriteToFile); //, new TGLayoutHints(...)); | |
55 | fButtonWriteToFile->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "WriteBlockListToFile()"); | |
56 | ||
7279ee15 | 57 | |
58 | fButtonNextEvent = new TGTextButton(this, " NextEvent "); | |
59 | AddFrame(fButtonNextEvent); //, new TGLayoutHints(...)); | |
60 | fButtonNextEvent->Connect("Clicked()", "AliEveHOMERManagerEditor", this, "NextEvent()"); | |
61 | ||
a3234a73 | 62 | |
cfa641b1 | 63 | fBoxTriggerSelector = new TGComboBox(this, "Select Trigger"); |
64 | fBoxTriggerSelector->AddEntry("HLT Global Trigger", 0); | |
65 | fBoxTriggerSelector->AddEntry("Barrel multiplicity trigger", 1); | |
66 | fBoxTriggerSelector->AddEntry("PHOS Geometry trigger", 2); | |
67 | fBoxTriggerSelector->AddEntry("No trigger selection", 3); | |
68 | fBoxTriggerSelector->Connect("Selected(Int_t)","AliEveHOMERManagerEditor", this, "SetTriggerString(int)"); | |
69 | fBoxTriggerSelector->SetWidth(150); | |
70 | fBoxTriggerSelector->SetHeight(25); | |
71 | AddFrame(fBoxTriggerSelector); | |
72 | ||
cfa641b1 | 73 | |
d810d0de | 74 | } |
75 | ||
57ffa5fb | 76 | /******************************************************************************/ |
d810d0de | 77 | |
ea9a0e13 | 78 | void AliEveHOMERManagerEditor::SetModel(TObject* obj) { |
d810d0de | 79 | fM = dynamic_cast<AliEveHOMERManager*>(obj); |
80 | ||
81 | // Set values of widgets | |
82 | // fXYZZ->SetValue(fM->GetXYZZ()); | |
83 | } | |
84 | ||
57ffa5fb | 85 | /******************************************************************************/ |
d810d0de | 86 | |
3ce2db7a | 87 | void AliEveHOMERManagerEditor::ConnectToHLT() { |
88 | // Connects to HOMER sources -> to HLT. | |
89 | fM->ReConnectHOMER(); | |
90 | } | |
7279ee15 | 91 | |
ea9a0e13 | 92 | void AliEveHOMERManagerEditor::NextEvent() { |
3da168a7 | 93 | // call next event from AliEveHOMERManger |
33791895 | 94 | fM->NextHOMEREvent(); |
7279ee15 | 95 | } |
96 | ||
ea9a0e13 | 97 | |
cfa641b1 | 98 | |
99 | void AliEveHOMERManagerEditor::SetTriggerString(int id) { | |
100 | ||
ec632f5e | 101 | if (id < 0 || id > 3) { |
cfa641b1 | 102 | return; |
a82a31af | 103 | } |
cfa641b1 | 104 | |
105 | TString tsa[4] = {"HLTGlobalTrigger", | |
106 | "BarrelMultiplicityTrigger", | |
107 | "PHOSgeomTrigger", | |
108 | "ALL"}; | |
109 | ||
110 | ||
111 | fM->SetTriggerString(tsa[id]); | |
112 | ||
7279ee15 | 113 | } |
ea9a0e13 | 114 |