]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx
Debug msg
[u/mrichter/AliRoot.git] / HLT / PHOS / OnlineDisplay / AliHLTPHOSOnlineDisplayNumberEntry.cxx
1 // $Id$
2
3 /**************************************************************************
4  * This file is property of and copyright by the Experimental Nuclear     *
5  * Physics Group, Dep. of Physics                                         *
6  * University of Oslo, Norway, 2006                                       *
7  *                                                                        * 
8  * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project.  *
9  * Contributors are mentioned in the code where appropriate.              *
10  * Please report bugs to perthi@fys.uio.no                                * 
11  *                                                                        *
12  * Permission to use, copy, modify and distribute this software and its   *
13  * documentation strictly for non-commercial purposes is hereby granted   *
14  * without fee, provided that the above copyright notice appears in all   *
15  * copies and that both the copyright notice and this permission notice   *
16  * appear in the supporting documentation. The authors make no claims     *
17  * about the suitability of this software for any purpose. It is          *
18  * provided "as is" without express or implied warranty.                  *
19  **************************************************************************/
20
21
22 #include "AliHLTPHOSOnlineDisplayNumberEntry.h"
23 //#include "MainGui.h"
24
25 AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry()
26 {
27
28 }
29
30 AliHLTPHOSOnlineDisplayNumberEntry::~AliHLTPHOSOnlineDisplayNumberEntry()
31 {
32
33 }
34
35 AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry(const TGWindow* parent, Double_t val, Int_t digitwidth, Int_t id, 
36                                  TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr, 
37                                  TGNumberFormat::ELimit limits,
38                                  Double_t min, Double_t max):  
39   TGNumberEntry(parent , val, digitwidth, id, style, attr, limits, min, max)
40 {
41   //  buttonType = buttType; //c = config Id, r = readout region entry
42   fButtonToNum = kFALSE;
43 }
44
45 void
46 AliHLTPHOSOnlineDisplayNumberEntry::ValueChanged(Long_t t)
47 {
48   int tmp = GetIntNumber();
49  //  printf("\nnumberentry:ValueChanged: walue gotten was: %d\n", tmp);
50
51   if(t == 10000)
52     {
53       if(tmp > lowLimit)
54         {
55           SetIntNumber(tmp -1);
56         } 
57       else
58         {
59
60         }
61     }
62   else if(t == 0)
63     {
64       if(tmp < (highLimit))
65         {
66           SetIntNumber(tmp +1); 
67
68         }
69       else 
70         { 
71
72         }
73     }
74 }
75
76 void
77 AliHLTPHOSOnlineDisplayNumberEntry::ValueSet(Long_t t)
78 {
79   int tmp = GetIntNumber();
80
81   // printf("\nnumberentry:ValueSet: walue gotten was: %d\n", tmp);
82
83   if(t == 10000)
84     {
85       if(tmp > highLimit)
86         {
87           SetIntNumber(highLimit);
88           tmp = highLimit;
89         }
90       else if(tmp < lowLimit)
91         {         
92           SetIntNumber(lowLimit); 
93           tmp = lowLimit;
94         }
95     }
96   else if(t == 0)
97     {
98       if(tmp > highLimit)
99         {
100           SetIntNumber(highLimit);
101           tmp = highLimit;
102         }
103       else if(tmp < lowLimit)
104         {
105           SetIntNumber(lowLimit); 
106           
107           tmp = lowLimit;
108         }
109     }
110
111   //  if(buttonType == 'c')
112   //   {
113   //     MainGui::GetConfigInfo(tmp); 
114   //   }
115 }
116
117 void
118 AliHLTPHOSOnlineDisplayNumberEntry::SetButtonType(char c)
119 {
120   buttonType = c;
121 }
122
123
124
125
126 void
127 AliHLTPHOSOnlineDisplayNumberEntry::SetLimits(int low, int high)
128 {
129   lowLimit  = low;
130   highLimit = high;
131 }