1 /**************************************************************************
2 * This file is property of and copyright by the Experimental Nuclear *
3 * Physics Group, Dep. of Physics *
4 * University of Oslo, Norway, 2007 *
6 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
7 * Contributors are mentioned in the code where appropriate. *
8 * Please report bugs to perthi@fys.uio.no *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18 #include "AliHLTPHOSOnlineDisplayRawDataMenu.h"
21 #include "AliHLTPHOSOnlineDisplayNumberEntry.h"
22 #include "AliHLTPHOSOnlineDisplayButton.h"
23 //#include "TGMainFrame.h"
25 //#include "TGWindow.h"
32 AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu()
34 cout << "ERROR, you cannot invoke the Online display without arguments " << endl;
38 AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu(AliHLTPHOSOnlineDisplay *onlineDisplayPtr)
40 fOnlineDisplayPtr = onlineDisplayPtr;
41 // fEventPtr = eventPtr;
42 cout << "creating new AliHLTPHOSOnlineDisplayRawDataMen " <<endl;
43 // fWindowPtr = new TGWindow();
44 fWindowPtr = new TGMainFrame();
45 // fFramePtr = new TGGroupFrame(fWindowPtr, "HELLO WORLD") ;
47 startLabelPtr = new TGLabel(fWindowPtr, "From");
48 startLabelPtr-> MoveResize( 30, 140, 50, 20);
49 endLabelPtr = new TGLabel(fWindowPtr, "To");
50 endLabelPtr-> MoveResize(100, 140, 50, 20);
51 startZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
52 // startZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, startZ, 5, -1, (TGNumberFormat::EStyle) 5);
54 startZInputPtr->MoveResize( 30, 160, 50, 18);
55 startZInputPtr->SetLimits(0, 55);
56 endZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
57 endZInputPtr->MoveResize( 100, 160, 50, 18);
58 endZInputPtr->SetLimits(0, 55);
59 startXInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
60 startXInputPtr->MoveResize(30, 180, 50, 18);
61 startXInputPtr->SetLimits(0, 63*5);
62 endXInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
63 endXInputPtr->MoveResize( 100, 180, 50, 18);
64 endXInputPtr->SetLimits(0, 63*5);
66 gainInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
67 gainInputPtr->MoveResize( 190, 180, 50, 18);
68 gainInputPtr->SetLimits(0, 1);
70 gainLabelPtr = new TGLabel(fWindowPtr, "Gain");
71 gainLabelPtr-> MoveResize( 190, 150, 30, 30);
73 zLabelPtr = new TGLabel(fWindowPtr, "Z");
74 zLabelPtr-> MoveResize( 10, 160, 20, 20);
75 xLabelPtr = new TGLabel(fWindowPtr, "X");
76 xLabelPtr-> MoveResize( 10, 180, 20, 20);
78 fGetDataButtonPtr = new AliHLTPHOSOnlineDisplayButton(fOnlineDisplayPtr, fWindowPtr, 'r', "show rawdata");
79 fGetDataButtonPtr->MoveResize(70, 90, 150, 20);
80 // applyFeeButtPtr = new PhosMenuButton(applyApdMenuPtr, 'c', "Apply to FEE");
81 // applyFeeButtPtr->MoveResize( 20, 20, 150, 20);
83 fWindowPtr->MoveResize(250,250,250,250);
84 fWindowPtr->MapSubwindows();
85 fWindowPtr->MapWindow();
91 AliHLTPHOSOnlineDisplayRawDataMenu::~AliHLTPHOSOnlineDisplayRawDataMenu()
97 AliHLTPHOSOnlineDisplayRawDataMenu::GetStartZ()
99 return startZInputPtr->GetIntNumber();
103 AliHLTPHOSOnlineDisplayRawDataMenu::GetEndZ()
105 return endZInputPtr->GetIntNumber();
110 AliHLTPHOSOnlineDisplayRawDataMenu::GetStartX()
112 return startXInputPtr->GetIntNumber();
116 AliHLTPHOSOnlineDisplayRawDataMenu::GetEndX()
118 return endXInputPtr->GetIntNumber();
122 AliHLTPHOSOnlineDisplayRawDataMenu::GetGain()
124 return gainInputPtr->GetIntNumber();