Changeset 7072 for trunk/MagicSoft


Ignore:
Timestamp:
05/20/05 15:43:40 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7071 r7072  
    7272     - replaced wrong MaxHiGainVar by MaxSignalVar (was nowehere
    7373       really used)
     74
     75   * mjobs/MJCalibrateSignal.cc, mjobs/MJCalibration.cc:
     76     - some simplifications to the access of histograms after the loop
     77       has finished. There is no need to search for them in the parameter
     78       list.
    7479
    7580
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r7071 r7072  
    804804      {
    805805        if (fIsPulsePosCheck)
    806           {
    807             MHCalibrationPulseTimeCam *pcam = (MHCalibrationPulseTimeCam*)plist.FindObject("MHCalibrationPulseTimeCam");
    808             MHCalibrationPix &pix1 = (*pcam)[fCheckedPixId];
    809             pix1.DrawClone("");
    810           }
     806            hpulcam[fCheckedPixId].DrawClone("");
    811807       
    812808        if (fIsHiLoCalibration)
    813           {
    814             MHCalibrationHiLoCam *hcam = (MHCalibrationHiLoCam*)plist.FindObject("MHCalibrationHiLoCam");
    815             MHCalibrationPix &pix2 = (*hcam)[fCheckedPixId];
    816             pix2.DrawClone("");
    817           }
     809            hilocam[fCheckedPixId].DrawClone("");
    818810      }
    819811
     
    823815      interlacedcont.Add(&hilcam);
    824816
    825     if (IsHistsStorage())
    826       {
     817    if (fIsPulsePosCheck)
     818        interlacedcont.Add(plist.FindObject("MHCalibrationPulseTimeCam"));
     819
     820    if (fIsHiLoCalibration)
    827821        interlacedcont.Add(plist.FindObject("MHCalibrationHiLoCam"));
    828         interlacedcont.Add(plist.FindObject("MHCalibrationPulseTimeCam"));
    829       }
    830    
     822
    831823    if (!WriteResult(interlacedcont))
    832824      return kFALSE;
     
    842834void MJCalibrateSignal::DisplayResult(MParList &plist)
    843835{
    844 
    845     if (!fDisplay)
     836    if (!fDisplay || !fIsHiLoCalibration)
    846837        return;
    847838
    848     MGeomCam &geomcam = *(MGeomCam*)plist.FindObject("MGeomCam");
    849 /*
    850     //
    851     // Get container from list
    852     //
    853     MCalibrationPulseTimeCam *pcam = (MCalibrationPulseTimeCam*)plist.FindObject("MCalibrationPulseTimeCam");
    854 
    855     MHCamera disp11 (geomcam, "PulseTime", "Mean pulse arrival time cosmics");
    856     MHCamera disp21 (geomcam, "PulseTimeRMS", "RMS of pulse arrival time cosmics");
    857 
    858     if (pcam)
    859       {
    860         disp11.SetCamContent(*pcam,  0);
    861         disp11.SetCamError(  *pcam,  1);
    862         disp21.SetCamContent(*pcam,  2);
    863         disp21.SetCamError(  *pcam,  3);
    864       }
    865    
    866     disp11.SetYTitle("T [FADC sl.]");
    867     disp21.SetYTitle("T [FADC sl.]");
    868 
    869     if (fIsPulsePosCheck)
    870       {
    871         TCanvas &c0 = fDisplay->AddTab("PulseTime");
    872         c0.Divide(2,3);
    873        
    874         disp11.CamDraw(c0, 1, 2, 1);
    875         disp21.CamDraw(c0, 2, 2, 1);
    876       }
    877  */
    878     if (!fIsHiLoCalibration)
    879       return;
    880 
    881     MCalibrationHiLoCam *hcam      = (MCalibrationHiLoCam*)plist.FindObject("MCalibrationHiLoCam");
     839    MCalibrationHiLoCam *hcam = (MCalibrationHiLoCam*)plist.FindObject("MCalibrationHiLoCam");
     840    MGeomCam            *geom = (MGeomCam*)plist.FindObject("MGeomCam");
     841    if (!hcam || !geom)
     842        return;
    882843
    883844    // Create histograms to display
    884     MHCamera disp1 (geomcam, "HiLoConv", "Ratio Amplification HiGain vs. LoGain (Charges)");
    885     MHCamera disp2 (geomcam, "HiLoDiff", "Arrival Time Diff. HiGain vs. LoGain (Times)");
    886 
    887     disp1.SetCamContent(*hcam,  0);
    888     disp1.SetCamError(  *hcam,  1);
    889     disp2.SetCamContent(*hcam,  5);
    890     disp2.SetCamError(  *hcam,  6);
     845    MHCamera disp1(*geom, "HiLoConv", "Ratio Amplification HiGain vs. LoGain (Charges)");
     846    MHCamera disp2(*geom, "HiLoDiff", "Arrival Time Diff. HiGain vs. LoGain (Times)");
     847
     848    disp1.SetCamContent(*hcam, 0);
     849    disp1.SetCamError(  *hcam, 1);
     850    disp2.SetCamContent(*hcam, 5);
     851    disp2.SetCamError(  *hcam, 6);
    891852
    892853    disp1.SetYTitle("R [1]");
    893854    disp2.SetYTitle("\\Delta T [FADC sl.]");
    894 
    895855
    896856    TCanvas &c1 = fDisplay->AddTab("HiLoConv");
Note: See TracChangeset for help on using the changeset viewer.