Changeset 1715 for trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
- Timestamp:
- 01/19/03 14:52:29 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r1670 r1715 42 42 #include <TStyle.h> 43 43 #include <TCanvas.h> 44 #include <TButton.h>44 //#include <TButton.h> 45 45 #include <TClonesArray.h> 46 46 … … 167 167 } 168 168 169 inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix, const Int_t i, Float_t min, Float_t max) 170 { 169 inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix, const UInt_t i, Float_t min, Float_t max) 170 { 171 if (i>=fNumPixels) 172 return; 173 171 174 // 172 175 // Fixme: Use absolute value per mm^2. Needs another scaling algorithm. … … 178 181 } 179 182 180 inline void MCamDisplay::SetPixColorPedestal(const MPedestalPix &pix, const Int_t i, Float_t min, Float_t max) 181 { 183 inline void MCamDisplay::SetPixColorPedestal(const MPedestalPix &pix, const UInt_t i, Float_t min, Float_t max) 184 { 185 if (i>=fNumPixels) 186 return; 187 182 188 // 183 189 // Fixme: Use absolute value per mm^2. Needs another scaling algorithm. … … 189 195 } 190 196 191 inline void MCamDisplay::SetPixColorError(const MCerPhotPix &pix, const Int_t i, Float_t min, Float_t max) 192 { 197 inline void MCamDisplay::SetPixColorError(const MCerPhotPix &pix, const UInt_t i, Float_t min, Float_t max) 198 { 199 if (i>=fNumPixels) 200 return; 201 193 202 // 194 203 // Fixme: Use absolute value per mm^2. Needs another scaling algorithm. … … 378 387 } 379 388 389 void MCamDisplay::SetPrettyPalette() 390 { 391 SetPalette(1, 0); 392 } 393 394 void MCamDisplay::SetDeepBlueSeaPalette() 395 { 396 SetPalette(51, 0); 397 } 398 399 void MCamDisplay::SetInvDeepBlueSeaPalette() 400 { 401 SetPalette(52, 0); 402 } 403 380 404 // ------------------------------------------------------------------------ 381 405 // … … 418 442 Paint(); 419 443 420 // 421 // Create and draw the buttons which allows changing the 422 // color palette of the display 423 // 424 TButton *but; 425 char txt[100]; 426 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(1,0);", this); 427 but = new TButton("Pretty", txt, 0.01, 0.95, 0.15, 0.99); 428 but->Draw(); 429 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(51,0);", this); 430 but = new TButton("Deap Sea", txt, 0.16, 0.95, 0.30, 0.99); 431 but->Draw(); 432 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(52,0);", this); 433 but = new TButton("Blue Inv", txt, 0.31, 0.95, 0.45, 0.99); 434 but->Draw(); 444 /* 445 // 446 // Create and draw the buttons which allows changing the 447 // color palette of the display 448 // 449 TButton *but; 450 char txt[100]; 451 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(1,0);", this); 452 but = new TButton("Pretty", txt, 0.01, 0.95, 0.15, 0.99); 453 but->Draw(); 454 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(51,0);", this); 455 but = new TButton("Deap Sea", txt, 0.16, 0.95, 0.30, 0.99); 456 but->Draw(); 457 sprintf(txt, "((MCamDisplay*)0x%lx)->SetPalette(52,0);", this); 458 but = new TButton("Blue Inv", txt, 0.31, 0.95, 0.45, 0.99); 459 but->Draw(); 460 */ 435 461 436 462 // … … 441 467 { 442 468 #if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06) 443 (*this)[i].SetBit( kNoContextMenu|kCannotPick);469 (*this)[i].SetBit(/*kNoContextMenu|*/kCannotPick); 444 470 #endif 445 471 (*this)[i].SetFillColor(22); … … 470 496 box->SetFillColor(22); 471 497 #if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06) 472 box->SetBit( kNoContextMenu|kCannotPick);498 box->SetBit(/*kNoContextMenu|*/kCannotPick); 473 499 #endif 474 500 box->Draw(); … … 478 504 txt->SetY(H*((i+0.5)*h - 1.)); 479 505 #if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06) 480 txt->SetBit( kNoContextMenu|kCannotPick);506 txt->SetBit(/*kNoContextMenu|*/kCannotPick); 481 507 #endif 482 508 txt->Draw();
Note:
See TracChangeset
for help on using the changeset viewer.