]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx
Improved raw data display. The raw dat can now be displayed post mortem. The raw...
[u/mrichter/AliRoot.git] / HLT / PHOS / OnlineDisplay / AliHLTPHOSOnlineDisplayNumberEntry.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, 2006                                       *
5  *                                                                        * 
6  * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS 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
19
20 #include "AliHLTPHOSOnlineDisplayNumberEntry.h"
21 //#include "MainGui.h"
22
23 AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry()
24 {
25
26 }
27
28 AliHLTPHOSOnlineDisplayNumberEntry::~AliHLTPHOSOnlineDisplayNumberEntry()
29 {
30
31 }
32
33 AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry(const TGWindow* parent, Double_t val, Int_t digitwidth, Int_t id, 
34                                  TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr, 
35                                  TGNumberFormat::ELimit limits,
36                                  Double_t min, Double_t max):  
37   TGNumberEntry(parent , val, digitwidth, id, style, attr, limits, min, max)
38 {
39   //  buttonType = buttType; //c = config Id, r = readout region entry
40   fButtonToNum = kFALSE;
41 }
42
43 void
44 AliHLTPHOSOnlineDisplayNumberEntry::ValueChanged(Long_t t)
45 {
46   int tmp = GetIntNumber();
47  //  printf("\nnumberentry:ValueChanged: walue gotten was: %d\n", tmp);
48
49   if(t == 10000)
50     {
51       if(tmp > lowLimit)
52         {
53           SetIntNumber(tmp -1);
54         } 
55       else
56         {
57
58         }
59     }
60   else if(t == 0)
61     {
62       if(tmp < (highLimit))
63         {
64           SetIntNumber(tmp +1); 
65
66         }
67       else 
68         { 
69
70         }
71     }
72 }
73
74 void
75 AliHLTPHOSOnlineDisplayNumberEntry::ValueSet(Long_t t)
76 {
77   int tmp = GetIntNumber();
78
79   // printf("\nnumberentry:ValueSet: walue gotten was: %d\n", tmp);
80
81   if(t == 10000)
82     {
83       if(tmp > highLimit)
84         {
85           SetIntNumber(highLimit);
86           tmp = highLimit;
87         }
88       else if(tmp < lowLimit)
89         {         
90           SetIntNumber(lowLimit); 
91           tmp = lowLimit;
92         }
93     }
94   else if(t == 0)
95     {
96       if(tmp > highLimit)
97         {
98           SetIntNumber(highLimit);
99           tmp = highLimit;
100         }
101       else if(tmp < lowLimit)
102         {
103           SetIntNumber(lowLimit); 
104           
105           tmp = lowLimit;
106         }
107     }
108
109   //  if(buttonType == 'c')
110   //   {
111   //     MainGui::GetConfigInfo(tmp); 
112   //   }
113 }
114
115 void
116 AliHLTPHOSOnlineDisplayNumberEntry::SetButtonType(char c)
117 {
118   buttonType = c;
119 }
120
121
122
123
124 void
125 AliHLTPHOSOnlineDisplayNumberEntry::SetLimits(int low, int high)
126 {
127   lowLimit  = low;
128   highLimit = high;
129 }