Changeset 4189
- Timestamp:
- 05/26/04 11:18:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4188 r4189 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2004/05/26: Markus Gaug 22 23 * mjobs/MGCamDisplays.[h,cc] 24 * mhist/MHCamera.[h,cc] 25 - put the last function (CamDraw) of MGCamDisplays into MHCamera 26 and removed MGCamDisplays. 27 28 * mjobs/MJPedestal.[h,cc] 29 * mjobs/MJCalibration.[h,cc] 30 * mjobs/MJExtractCalibTest.[h,cc] 31 - don't derive from MGCamDisplays any more. 32 20 33 21 34 2004/05/26: Javier Rico -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r4059 r4189 68 68 #include <TH1.h> 69 69 #include <TF1.h> 70 #include <TCanvas.h> 70 71 71 72 #include "MLog.h" … … 1850 1851 } 1851 1852 1853 // -------------------------------------------------------------------------- 1854 // 1855 // Draw the MHCamera into the MStatusDisplay: 1856 // 1857 // 1) Draw it as histogram (MHCamera::DrawCopy("hist") 1858 // 2) Draw it as a camera, with MHCamera::SetPrettyPalette() set. 1859 // 3) If "rad" is not zero, draw its values vs. the radius from the camera center. 1860 // (DrawRadialProfile()) 1861 // 4) Depending on the variable "fit", draw the values projection on the y-axis 1862 // (DrawProjection()): 1863 // 0: don't draw 1864 // 1: Draw fit to Single Gauss (for distributions flat-fielded over the whole camera) 1865 // 2: Draw and fit to Double Gauss (for distributions different for inner and outer pixels) 1866 // 3: Draw and fit to Triple Gauss (for distributions with inner, outer pixels and outliers) 1867 // 4: Draw and fit to Polynomial grade 0: (for the probability distributions) 1868 // >4: Draw and don;t fit. 1869 // 1870 void MHCamera::CamDraw(TCanvas &c, const Int_t x, const Int_t y, 1871 const Int_t fit, const Int_t rad, TObject *notify) 1872 { 1873 1874 c.cd(x); 1875 gPad->SetBorderMode(0); 1876 gPad->SetTicks(); 1877 MHCamera *obj1=(MHCamera*)DrawCopy("hist"); 1878 obj1->SetDirectory(NULL); 1879 1880 if (notify) 1881 obj1->AddNotify(notify); 1882 1883 c.cd(x+y); 1884 gPad->SetBorderMode(0); 1885 obj1->SetPrettyPalette(); 1886 obj1->Draw(); 1887 1888 if (rad) 1889 { 1890 c.cd(x+2*y); 1891 gPad->SetBorderMode(0); 1892 gPad->SetTicks(); 1893 DrawRadialProfile(); 1894 } 1895 1896 if (!fit) 1897 return; 1898 1899 c.cd(rad ? x+3*y : x+2*y); 1900 gPad->SetBorderMode(0); 1901 gPad->SetTicks(); 1902 DrawProjection(fit); 1903 } 1904 1905 -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r3957 r4189 16 16 #ifndef ROOT_TH1 17 17 #include <TH1.h> 18 #endif 19 #ifndef ROOT_TCanvas 20 #include <TCanvas.h> 18 21 #endif 19 22 … … 249 252 } 250 253 TProfile *RadialProfileS(const TArrayI §or, const TArrayI &aidx, const char *name="_rad", const Int_t nbins=25) const; 254 255 void CamDraw(TCanvas &c, const Int_t x, const Int_t y, 256 const Int_t fit, const Int_t rad=0, 257 TObject *notify=NULL); 251 258 252 259 const MGeomCam &GetGeomCam() const { return *fGeomCam; } -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4188 r4189 420 420 c1.Divide(3, 3); 421 421 422 CamDraw(c1, 1, 3, disp1, 2);423 CamDraw(c1, 2, 3, disp4, 2);424 CamDraw(c1, 3, 3, disp28, 2);422 disp1.CamDraw(c1, 1, 3, 2); 423 disp4.CamDraw(c1, 2, 3, 2); 424 disp28.CamDraw(c1, 3, 3, 2); 425 425 426 426 // F-Factor … … 428 428 c2.Divide(3,4); 429 429 430 CamDraw(c2, 1, 3, disp6,2, 1);431 CamDraw(c2, 2, 3, disp7,2, 1);432 CamDraw(c2, 3, 3, disp8,2, 1);430 disp6.CamDraw(c2, 1, 3, 2, 1); 431 disp7.CamDraw(c2, 2, 3, 2, 1); 432 disp8.CamDraw(c2, 3, 3, 2, 1); 433 433 434 434 // QE's … … 436 436 c3.Divide(3,4); 437 437 438 CamDraw(c3, 1, 3, disp8, 2, 1);439 CamDraw(c3, 2, 3, disp9, 2, 1);440 CamDraw(c3, 3, 3, disp10,2, 1);438 disp8.CamDraw(c3, 1, 3, 2, 1); 439 disp9.CamDraw(c3, 2, 3, 2, 1); 440 disp10.CamDraw(c3, 3, 3, 2, 1); 441 441 442 442 // Defects … … 448 448 // CamDraw(c4, 2, 3, disp24, 0); 449 449 // CamDraw(c4, 3, 3, disp25, 0); 450 CamDraw(c4, 1, 2, disp24, 0);451 CamDraw(c4, 2, 2, disp25, 0);450 disp24.CamDraw(c4, 1, 2, 0); 451 disp25.CamDraw(c4, 2, 2, 0); 452 452 453 453 if (fRelTimes) … … 457 457 c5.Divide(2,4); 458 458 459 CamDraw(c5, 1, 2, disp30, 2);460 CamDraw(c5, 2, 2, disp31, 2);459 disp30.CamDraw(c5, 1, 2, 2); 460 disp31.CamDraw(c5, 2, 2, 2); 461 461 } 462 462 … … 472 472 c11.Divide(2, 4); 473 473 474 CamDraw(c11, 1, 2, disp1, 5, 1);475 CamDraw(c11, 2, 2, disp2, 5, 1);474 disp1.CamDraw(c11, 1, 2, 5, 1); 475 disp2.CamDraw(c11, 2, 2, 5, 1); 476 476 477 477 // Reduced Sigmas … … 479 479 c12.Divide(2,4); 480 480 481 CamDraw(c12, 1, 2, disp3, 5, 1);482 CamDraw(c12, 2, 2, disp4, 5, 1);481 disp3.CamDraw(c12, 1, 2, 5, 1); 482 disp4.CamDraw(c12, 2, 2, 5, 1); 483 483 484 484 // F-Factor … … 486 486 c13.Divide(3,4); 487 487 488 CamDraw(c13, 1, 3, disp5, 5, 1);489 CamDraw(c13, 2, 3, disp6, 5, 1);490 CamDraw(c13, 3, 3, disp7, 5, 1);488 disp5.CamDraw(c13, 1, 3, 5, 1); 489 disp6.CamDraw(c13, 2, 3, 5, 1); 490 disp7.CamDraw(c13, 3, 3, 5, 1); 491 491 492 492 // QE's … … 494 494 c14.Divide(4,4); 495 495 496 CamDraw(c14, 1, 4, disp8,5, 1);497 CamDraw(c14, 2, 4, disp9,5, 1);498 CamDraw(c14, 3, 4, disp10, 5, 1);499 CamDraw(c14, 4, 4, disp11, 5, 1);496 disp8.CamDraw(c14, 1, 4, 5, 1); 497 disp9.CamDraw(c14, 2, 4, 5, 1); 498 disp10.CamDraw(c14, 3, 4, 5, 1); 499 disp11.CamDraw(c14, 4, 4, 5, 1); 500 500 501 501 // Defects … … 505 505 506 506 /* 507 CamDraw(c15, 1, 5, disp23, 0);508 CamDraw(c15, 2, 5, disp24, 0);509 CamDraw(c15, 3, 5, disp25, 0);510 CamDraw(c15, 4, 5, disp26, 0);511 CamDraw(c15, 5, 5, disp27, 0);507 disp23.CamDraw(c15, 1, 5, 0); 508 disp24.CamDraw(c15, 2, 5, 0); 509 disp25.CamDraw(c15, 3, 5, 0); 510 disp26.CamDraw(c15, 4, 5, 0); 511 disp27.CamDraw(c15, 5, 5, 0); 512 512 */ 513 CamDraw(c15, 1, 4, disp24, 0);514 CamDraw(c15, 2, 4, disp25, 0);515 CamDraw(c15, 3, 4, disp26, 0);516 CamDraw(c15, 4, 4, disp27, 0);513 disp24.CamDraw(c15, 1, 4, 0); 514 disp25.CamDraw(c15, 2, 4, 0); 515 disp26.CamDraw(c15, 3, 4, 0); 516 disp27.CamDraw(c15, 4, 4, 0); 517 517 518 518 // Abs. Times … … 520 520 c16.Divide(2,3); 521 521 522 CamDraw(c16, 1, 2, disp28, 5);523 CamDraw(c16, 2, 2, disp29, 5);522 disp28.CamDraw(c16, 1, 2, 5); 523 disp29.CamDraw(c16, 2, 2, 5); 524 524 525 525 if (fRelTimes) … … 529 529 c17.Divide(2,4); 530 530 531 CamDraw(c17, 1, 2, disp30, 5, 1);532 CamDraw(c17, 2, 2, disp31, 5, 1);531 disp30.CamDraw(c17, 1, 2, 5, 1); 532 disp31.CamDraw(c17, 2, 2, 5, 1); 533 533 } 534 534 … … 569 569 c21.Divide(2, 4); 570 570 571 CamDraw(c21, 1, 2, disp1, 2, 1);572 CamDraw(c21, 2, 2, disp2, 2, 1);571 disp1.CamDraw(c21, 1, 2, 2, 1); 572 disp2.CamDraw(c21, 2, 2, 2, 1); 573 573 574 574 // Reduced Sigmas … … 576 576 c23.Divide(2,4); 577 577 578 CamDraw(c23, 1, 2, disp3, 2, 1);579 CamDraw(c23, 2, 2, disp4, 2, 1);578 disp3.CamDraw(c23, 1, 2, 2, 1); 579 disp4.CamDraw(c23, 2, 2, 2, 1); 580 580 581 581 // F-Factor … … 583 583 c24.Divide(3,4); 584 584 585 CamDraw(c24, 1, 3, disp5, 2, 1);586 CamDraw(c24, 2, 3, disp6, 2, 1);587 CamDraw(c24, 3, 3, disp7, 2, 1);585 disp5.CamDraw(c24, 1, 3, 2, 1); 586 disp6.CamDraw(c24, 2, 3, 2, 1); 587 disp7.CamDraw(c24, 3, 3, 2, 1); 588 588 589 589 // QE's … … 591 591 c25.Divide(4,4); 592 592 593 CamDraw(c25, 1, 4, disp8,2, 1);594 CamDraw(c25, 2, 4, disp9,2, 1);595 CamDraw(c25, 3, 4, disp10, 2, 1);596 CamDraw(c25, 4, 4, disp11, 2, 1);593 disp8.CamDraw(c25, 1, 4, 2, 1); 594 disp9.CamDraw(c25, 2, 4, 2, 1); 595 disp10.CamDraw(c25, 3, 4, 2, 1); 596 disp11.CamDraw(c25, 4, 4, 2, 1); 597 597 598 598 // Validity … … 600 600 c26.Divide(4,2); 601 601 602 CamDraw(c26, 1, 4, disp12, 0);603 CamDraw(c26, 2, 4, disp13, 0);604 CamDraw(c26, 3, 4, disp14, 0);605 CamDraw(c26, 4, 4, disp15, 0);602 disp12.CamDraw(c26, 1, 4, 0); 603 disp13.CamDraw(c26, 2, 4, 0); 604 disp14.CamDraw(c26, 3, 4, 0); 605 disp15.CamDraw(c26, 4, 4, 0); 606 606 607 607 // Other info … … 609 609 c27.Divide(3,3); 610 610 611 CamDraw(c27, 1, 3, disp16, 0);612 CamDraw(c27, 2, 3, disp17, 1);613 CamDraw(c27, 3, 3, disp18, 1);611 disp16.CamDraw(c27, 1, 3, 0); 612 disp17.CamDraw(c27, 2, 3, 1); 613 disp18.CamDraw(c27, 3, 3, 1); 614 614 615 615 // Pickup … … 617 617 c28.Divide(4,2); 618 618 619 CamDraw(c28, 1, 4, disp19, 0);620 CamDraw(c28, 2, 4, disp20, 0);621 CamDraw(c28, 3, 4, disp21, 0);622 CamDraw(c28, 4, 4, disp22, 0);619 disp19.CamDraw(c28, 1, 4, 0); 620 disp20.CamDraw(c28, 2, 4, 0); 621 disp21.CamDraw(c28, 3, 4, 0); 622 disp22.CamDraw(c28, 4, 4, 0); 623 623 624 624 // Defects … … 627 627 c29.Divide(4,2); 628 628 629 CamDraw(c29, 1, 4, disp24, 0);630 CamDraw(c29, 2, 4, disp25, 0);631 CamDraw(c29, 3, 4, disp26, 0);632 CamDraw(c29, 4, 4, disp27, 0);629 disp24.CamDraw(c29, 1, 4, 0); 630 disp25.CamDraw(c29, 2, 4, 0); 631 disp26.CamDraw(c29, 3, 4, 0); 632 disp27.CamDraw(c29, 4, 4, 0); 633 633 634 634 // Abs. Times … … 636 636 c30.Divide(2,3); 637 637 638 CamDraw(c30, 1, 2, disp28, 2);639 CamDraw(c30, 2, 2, disp29, 1);638 disp28.CamDraw(c30, 1, 2, 2); 639 disp29.CamDraw(c30, 2, 2, 1); 640 640 641 641 if (fRelTimes) … … 645 645 c31.Divide(3,4); 646 646 647 CamDraw(c31, 1, 3, disp30, 2, 1);648 CamDraw(c31, 2, 3, disp31, 2, 1);649 CamDraw(c31, 3, 3, disp32, 4, 1);647 disp30.CamDraw(c31, 1, 3, 2, 1); 648 disp31.CamDraw(c31, 2, 3, 2, 1); 649 disp32.CamDraw(c31, 3, 3, 4, 1); 650 650 651 651 // Time Defects … … 653 653 c32.Divide(2,2); 654 654 655 CamDraw(c32, 1, 2, disp33,0);656 CamDraw(c32, 2, 2, disp34,0);655 disp33.CamDraw(c32, 1, 2, 0); 656 disp34.CamDraw(c32, 2, 2, 0); 657 657 658 658 MHCalibrationCam *cam = (MHCalibrationCam*)plist.FindObject("MHCalibrationRelTimeCam"); … … 1099 1099 1100 1100 DisplayResult(plist); 1101 1101 1102 1102 1103 if (!WriteResult()) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r4164 r4189 14 14 #include "MBadPixelsCam.h" 15 15 #endif 16 #ifndef MARS_MGCamDisplays17 #include "MGCamDisplays.h"18 #endif19 16 20 17 class MRunIter; … … 23 20 class MExtractor; 24 21 class MExtractTime; 25 class MJCalibration : public MParContainer , public MGCamDisplays22 class MJCalibration : public MParContainer 26 23 { 27 24 private: -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc
r4168 r4189 133 133 c.Divide(4,4); 134 134 135 CamDraw(c, 1, 4, disp1, 2, 1);136 CamDraw(c, 2, 4, disp2, 2, 1);137 CamDraw(c, 3, 4, disp3, 1, 1);138 CamDraw(c, 4, 4, disp4, 2, 1);135 disp1.CamDraw(c, 1, 4, 2, 1); 136 disp2.CamDraw(c, 2, 4, 2, 1); 137 disp3.CamDraw(c, 3, 4, 1, 1); 138 disp4.CamDraw(c, 4, 4, 2, 1); 139 139 140 140 return; … … 181 181 c.Divide(4,2); 182 182 183 CamDraw(c, 1, 2, disp1,5, 1);184 CamDraw(c, 2, 2, disp2,5, 1);183 disp1.CamDraw(c, 1, 2, 5, 1); 184 disp2.CamDraw(c, 2, 2, 5, 1); 185 185 186 186 return; … … 427 427 Bool_t MJExtractCalibTest::ReadPedPhotCam() 428 428 { 429 const TString fname = GetOutputFile(); 430 431 if (gSystem->AccessPathName(fname, kFileExists)) 432 { 433 *fLog << err << "Input file " << fname << " doesn't exist." << endl; 434 return kFALSE; 435 } 436 437 *fLog << inf << "Reading from file: " << fname << endl; 438 439 TFile file(fname, "READ"); 440 if (fPedPhotCam.Read()<=0) 441 { 442 *fLog << "Unable to read MPedPhotCam from " << fname << endl; 443 return kFALSE; 444 } 445 446 if (file.FindKey("MBadPixelsCam")) 447 { 448 MBadPixelsCam bad; 449 if (bad.Read()<=0) 429 430 const TString fname = GetOutputFile(); 431 432 if (gSystem->AccessPathName(fname, kFileExists)) 433 { 434 *fLog << err << "Input file " << fname << " doesn't exist." << endl; 435 return kFALSE; 436 } 437 438 *fLog << inf << "Reading from file: " << fname << endl; 439 440 TFile file(fname, "READ"); 441 if (fPedPhotCam.Read()<=0) 442 { 443 *fLog << "Unable to read MPedPhotCam from " << fname << endl; 444 return kFALSE; 445 } 446 447 if (file.FindKey("MBadPixelsCam")) 448 { 449 MBadPixelsCam bad; 450 if (bad.Read()<=0) 450 451 { 451 452 452 *fLog << "Unable to read MBadPixelsCam from " << fname << endl; 453 return kFALSE; 453 454 } 454 455 } 456 457 458 459 460 455 fBadPixels.Merge(bad); 456 } 457 458 if (fDisplay /*&& !fDisplay->GetCanvas("Pedestals")*/) // FIXME! 459 fDisplay->Read(); 460 461 return kTRUE; 461 462 } 462 463 -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h
r4168 r4189 14 14 #include "MBadPixelsCam.h" 15 15 #endif 16 #ifndef MARS_MGCamDisplays17 #include "MGCamDisplays.h"18 #endif19 16 20 17 class MRunIter; … … 26 23 class MExtractor; 27 24 class MExtractTime; 28 class MJExtractCalibTest : public MParContainer , public MGCamDisplays25 class MJExtractCalibTest : public MParContainer 29 26 { 30 27 private: -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r4164 r4189 50 50 51 51 #include "MGeomCam.h" 52 #include "MGeomCamMagic.h"53 52 #include "MHCamera.h" 54 53 #include "MPedestalCam.h" … … 166 165 c3.Divide(2,3); 167 166 168 CamDraw(c3, 1, 2, disp0, 1);169 CamDraw(c3, 2, 2, disp1, 6);167 disp0.CamDraw(c3, 1, 2, 1); 168 disp1.CamDraw(c3, 2, 2, 6); 170 169 } 171 170 … … 239 238 plist.AddToList(&tlist); 240 239 241 MGeomCamMagic magiccam;242 240 MReadMarsFile read("Events"); 243 241 MRawFileRead rawread(NULL); … … 258 256 259 257 // Setup Tasklist 260 plist.AddToList(&magiccam);261 258 plist.AddToList(&fPedestalCam); 262 259 plist.AddToList(&fBadPixels); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r4134 r4189 8 8 #include "MBadPixelsCam.h" 9 9 #endif 10 #ifndef MARS_MGCamDisplays11 #include "MGCamDisplays.h"12 #endif13 10 14 11 class TCanvas; … … 17 14 class MHCamera; 18 15 class MExtractor; 19 class MJPedestal : public MParContainer , public MGCamDisplays16 class MJPedestal : public MParContainer 20 17 { 21 18 private:
Note:
See TracChangeset
for help on using the changeset viewer.