]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.cxx
minor modifications
[u/mrichter/AliRoot.git] / HLT / PHOS / OnlineDisplay / AliHLTPHOSOnlineDisplayRawDataMenu.cxx
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                                       *
5  *                                                                        *
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                                *
9  *                                                                        *
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"
19 #include "TGFrame.h"
20 #include "TGLabel.h"
21 #include "AliHLTPHOSOnlineDisplayNumberEntry.h"
22 #include "AliHLTPHOSOnlineDisplayButton.h"
23 //#include "TGMainFrame.h"
24
25 //#include "TGWindow.h"
26
27 #include <iostream>
28
29 using namespace std;
30
31
32 AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu()
33 {
34   cout << "ERROR, you cannot invoke the Online display without arguments  " << endl;
35 }
36
37
38 AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu(AliHLTPHOSOnlineDisplay *onlineDisplayPtr)
39 {
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") ;
46
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);
53
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);
65
66   gainInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5);
67   gainInputPtr->MoveResize(  190, 180, 50, 18); 
68   gainInputPtr->SetLimits(0, 1);
69
70   gainLabelPtr = new TGLabel(fWindowPtr, "Gain");
71   gainLabelPtr-> MoveResize(  190,  150, 30, 30);
72
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);
77
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); 
82   
83   fWindowPtr->MoveResize(250,250,250,250);
84   fWindowPtr->MapSubwindows(); 
85   fWindowPtr->MapWindow(); 
86
87
88 }
89
90
91 AliHLTPHOSOnlineDisplayRawDataMenu::~AliHLTPHOSOnlineDisplayRawDataMenu()
92 {
93
94 }
95
96 int
97 AliHLTPHOSOnlineDisplayRawDataMenu::GetStartZ()
98 {
99   return startZInputPtr->GetIntNumber();
100 }
101
102 int
103 AliHLTPHOSOnlineDisplayRawDataMenu::GetEndZ()
104 {
105   return endZInputPtr->GetIntNumber();
106 }
107
108
109 int
110 AliHLTPHOSOnlineDisplayRawDataMenu::GetStartX()
111 {
112   return startXInputPtr->GetIntNumber();
113 }
114
115 int
116 AliHLTPHOSOnlineDisplayRawDataMenu::GetEndX()
117 {
118    return endXInputPtr->GetIntNumber();
119 }
120
121 int
122 AliHLTPHOSOnlineDisplayRawDataMenu::GetGain()
123 {
124    return  gainInputPtr->GetIntNumber();
125 }