Changeset 1715 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 01/19/03 14:52:29 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 2 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(); -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r1544 r1715 54 54 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); } 55 55 56 void SetPixColor(const MCerPhotPix &pix, const Int_t i, Float_t min, Float_t max);56 void SetPixColor(const MCerPhotPix &pix, const UInt_t i, Float_t min, Float_t max); 57 57 void SetPixColorRatio(const MCerPhotPix &pix, Float_t min, Float_t max); 58 58 void SetPixColorLevel(const MCerPhotPix &pix, Float_t lvl1, Float_t lvl2); 59 void SetPixColorError(const MCerPhotPix &pix, const Int_t i, Float_t min, Float_t max);60 void SetPixColorPedestal(const MPedestalPix &pix, const Int_t i, Float_t min, Float_t max);59 void SetPixColorError(const MCerPhotPix &pix, const UInt_t i, Float_t min, Float_t max); 60 void SetPixColorPedestal(const MPedestalPix &pix, const UInt_t i, Float_t min, Float_t max); 61 61 Int_t GetColor(Float_t val, Float_t min, Float_t max); 62 62 … … 86 86 void SetPalette(Int_t ncolors, Int_t *colors); 87 87 88 void SetPrettyPalette(); // *MENU* 89 void SetDeepBlueSeaPalette(); // *MENU* 90 void SetInvDeepBlueSeaPalette(); // *MENU* 91 88 92 ClassDef(MCamDisplay, 0) // Displays the magic camera 89 93 };
Note:
See TracChangeset
for help on using the changeset viewer.