Changeset 11036
- Timestamp:
- 06/16/11 18:50:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r10985 r11036 48 48 double bb[5] = {0., 0.03, 0.06, 0.00, 1.00}; 49 49 */ 50 double ss[5] = {0. , 0.25, 0.50, 0.75, 1.00};51 double rr[5] = {0. , 0.00, 0.00, 1.00, 1.00};52 double gg[5] = {0. , 0.00, 1.00, 0.00, 1.00};53 double bb[5] = {0. , 1.00, 0.00, 0.00, 1.00};50 double ss[5] = {0.00, 0.25, 0.50, 0.75, 1.00}; 51 double rr[5] = {0.15, 0.00, 0.00, 1.00, 0.85}; 52 double gg[5] = {0.15, 0.00, 1.00, 0.00, 0.85}; 53 double bb[5] = {0.15, 1.00, 0.00, 0.00, 0.85}; 54 54 55 55 const Int_t nn = 1440; … … 174 174 } 175 175 176 double align(double min, double val, double max) const 177 { 178 if (val<min) 179 return min; 180 if (val>max) 181 return max; 182 return val; 183 } 184 176 185 void Paint(Option_t *) 177 186 { … … 187 196 gPad->Range(-max, -max/r, max, max/r); 188 197 189 190 const double min = fData.min(); 191 const double scale = fData.max()==fData.min() ? 1 : fData.max()-fData.min(); 198 double dmin = fData[0]; 199 double dmax = fData[0]; 200 201 for (unsigned int i=0; i<fData.size(); i++) 202 { 203 if (!fEnable[i]) 204 continue; 205 206 if (fData[i]>dmax) 207 dmax = fData[i]; 208 if (fData[i]<dmin) 209 dmin = fData[i]; 210 } 211 212 const double min = dmin; 213 const double scale = dmax==dmin ? 1 : dmax-dmin; 214 215 // const double min = fData.min(); 216 // const double scale = fData.max()==fData.min() ? 1 : fData.max()-fData.min(); 192 217 193 218 TAttFill fill(0, 1001); … … 200 225 continue; 201 226 202 const int col = (fData[cnt]-min)/scale*(fPalette.size()-1); 227 const double val = align(dmin, fData[cnt], dmax); 228 229 const int col = (val-min)/scale*(fPalette.size()-1); 203 230 204 231 if (fEnable[cnt]) … … 221 248 continue; 222 249 223 const int col = (fData[cnt]-min)/scale*(fPalette.size()-1); 250 const double val = align(dmin, fData[cnt], dmax); 251 252 const int col = (val-min)/scale*(fPalette.size()-1); 224 253 225 254 if (fEnable[cnt]) … … 243 272 line.Modify(); 244 273 245 const int col = (fData[fWhite]-min)/scale*(fPalette.size()-1); 274 const double val = align(dmin, fData[fWhite], dmax); 275 276 const int col = (val-min)/scale*(fPalette.size()-1); 246 277 247 278 if (fEnable[fWhite]) … … 722 753 void handleDimDNS(const DimData &d) 723 754 { 724 const int version = d. get<unsigned int>();755 const int version = d.size()!=4 ? 0 : d.get<uint32_t>(); 725 756 726 757 ostringstream str; … … 1455 1486 if (server=="FTM_CONTROL") 1456 1487 { 1488 // FIXME: Enable FTU page!!! 1457 1489 fStatusFTMLabel->setText(s.name.c_str()); 1458 1490 fStatusFTMLabel->setToolTip(s.comment.c_str()); … … 1538 1570 fChatOnline = s.index==0; 1539 1571 1540 SetLedColor(fStatusChatLed, fChatOnline ? kLedGreen : kLed Red, time);1572 SetLedColor(fStatusChatLed, fChatOnline ? kLedGreen : kLedGray, time); 1541 1573 1542 1574 fChatSend->setEnabled(fChatOnline); … … 1569 1601 if (text.substr(0, 6)=="CHAT: ") 1570 1602 { 1603 if (qos==MessageImp::kDebug) 1604 return; 1605 1571 1606 out << "<font size='-1' color='navy'>[<B>"; 1572 1607 out << Time::fmt("%H:%M:%S") << time << "</B>]</FONT> ";
Note:
See TracChangeset
for help on using the changeset viewer.