Changeset 8582 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
06/19/07 10:35:33 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8580 r8582  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/06/19 Thomas Bretz
     22
     23   * callisto.rc, callisto_Dec04Jan05.rc:
     24     - changed the default values (commented out anyhow) to the real
     25       values.
     26       
     27   * mbase/MEnv.h:
     28     - allow printing contents from the context menu
     29
     30   * mcalib/MCalibrationRelTimeCalc.cc:
     31     - replaced kDeviatingTimeResolution by new kDeviatingRelTimeResolution
     32
     33   * mhcalib/MHCalibrationPulseTimeCam.cc:
     34     - automatically scale the saturation limit to the fadc range
     35
     36   * mjobs/MJCalibrateSignal.cc:
     37     - save resource file into signal*.root file
     38     - added some code (still commented) for saving the calibration
     39       results
     40     - do not fill the bad-pixel plots with MCs
     41
     42   * mjobs/MJCalibration.cc:
     43     - save resource file into signal*.root file
     44
     45   * mjobs/MJPedestal.cc:
     46     - clarified output for "mean pulse time" further
     47
     48   * mpedestal/MExtractPedestal.cc:
     49     - automatically scale the maximum variation and the
     50       maximum value to fit the FADC range
     51
     52   * mraw/MRawRunHeader.h:
     53     - added a function returnung the maximum value of the FADC
     54     - changed the GetScale from a calculation to a switch
     55       (faster and easier to understand)
     56
     57   * msignal/MExtractor.cc:
     58     - get the maximum in case of no lo-gains from the run-header
     59
     60
    2061
    2162 2007/06/18 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r8577 r8582  
    77     Also the old values seemed not exactly the PulsePos used for
    88     teh check.
     9
     10   - general: Now the output files (calib*.root, etc) also contain the
     11     resource file (to check it open it in the TBrowser and choose Print()
     12     from the context menu)
    913
    1014   - callisto: improved calculation of spline coefficients a lot. This
  • trunk/MagicSoft/Mars/callisto.rc

    r8577 r8582  
    311311# Define the Pulse Position check parameters:
    312312# -------------------------------------------------------------------------
    313 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit:  255
    314 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 100
    315 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2
     313#MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit:  245
     314#MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit:  85
     315#MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired:  2
    316316#MJPedestalY2.PixelCheck: no
    317317
  • trunk/MagicSoft/Mars/callisto_Dec04Jan05.rc

    r8577 r8582  
    339339# Define the Pulse Position check parameters:
    340340# -------------------------------------------------------------------------
    341 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit:  255
    342 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 100
    343 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2
     341#MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit:  245
     342#MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit:  85
     343#MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired:  2
    344344#MJPedestalY2.PixelCheck: no
    345345
  • trunk/MagicSoft/Mars/mbase/MEnv.h

    r8539 r8582  
    6767    void        AddEnv(const TEnv &env, Bool_t overwrite=kTRUE);
    6868
     69    void        Print(Option_t *option) const { TEnv::Print(option); }
     70    void        Print() const { TEnv::PrintEnv(kEnvLocal); } //*MENU*
     71
    6972    void PrintUntouched() const;
    7073    Int_t GetNumUntouched() const;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r8484 r8582  
    227227  *fLog << GetDescriptor() << ": Errors statistics:" << endl; 
    228228
    229   PrintUncalibrated(MBadPixelsPix::kDeviatingTimeResolution,   
     229  PrintUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution,
    230230                    Form("%s%2.1f%s","Rel.time rms more than ", fRelTimeResolutionLimit, " dev from median:"));
    231231  PrintUncalibrated(MBadPixelsPix::kRelTimeOscillating,   
     
    309309            {
    310310                *fLog << warn << "Pixel  " << setw(4) << i << ": Rel-time rms could not be calculated." << endl;
    311                 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingTimeResolution);
     311                (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution);
    312312                continue;
    313313            }
     
    320320                    << Form("[%4.2f,%4.2f]", lolim, hilim) << endl;
    321321
    322                 (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingTimeResolution);
     322                (*fBadPixels)[i].SetUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution);
    323323            }
    324324        }
     
    342342
    343343      if (IsCheckDeviatingBehavior())
    344           if (bad.IsUncalibrated(MBadPixelsPix::kDeviatingTimeResolution))
     344          if (bad.IsUncalibrated(MBadPixelsPix::kDeviatingRelTimeResolution))
    345345              bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    346346
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r8552 r8582  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.40 2007-06-12 20:49:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.41 2007-06-19 09:25:38 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    394394
    395395        // Check for saturation
    396         if (evt->GetSaturation(idx, fSaturationLimit)>0)
     396        if (evt->GetSaturation(idx, fSaturationLimit*fRunHeader->GetScale())>0)
    397397            continue;
    398398
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8518 r8582  
    151151    // file always. Which might make the usage outside of
    152152    // callisto difficult.
     153    TObjArray cont;
     154    cont.Add(const_cast<TEnv*>(GetEnv()));
     155
     156    if (fDisplay)
     157        cont.Add(fDisplay);
     158
    153159    const TString name(Form("signal%08d.root", fSequence.GetSequence()));
    154     return WriteDisplay(name, "UPDATE");
     160    return WriteContainer(cont, name, "UPDATE");
    155161}
    156162
     
    675681    writemc.AddContainer("MMcEvtBasic", "OriginalMC");
    676682
     683    // Write the special calib tree
     684    /*
     685    MWriteRootFile writecal(2, fname, fOverwrite?"RECREATE":"NEW");
     686    writecal.SetName("WriteCalib");
     687    writecal.AddContainer("MBadPixelsCam",          "Calib");
     688    writecal.AddContainer("MCalibrationChargeCam",  "Calib");
     689    writecal.AddContainer("MCalibrationRelTimeCam", "Calib");
     690    */
     691
    677692    // Now setup tasklist for events
    678693    MTaskList tlist2;
     
    722737        if (fIsRelTimesUpdate)
    723738            tlist3.AddToList(&recalc); // MCalibrationRelTimeCam
    724     } 
     739
     740        //tlist3.AddToList(&writecal);   // MWriteRootFile
     741    }
    725742
    726743    // Continue for all non-cosmic events
     
    761778    //    tlist2.AddToList(&fill7);
    762779    tlist2.AddToList(&fill9);
    763     tlist2.AddToList(&fillB);
    764     tlist2.AddToList(&fillD);
     780    if (!fSequence.IsMonteCarlo())
     781    {
     782        tlist2.AddToList(&fillB);
     783        tlist2.AddToList(&fillD);
     784    }
    765785    if (extractor1->HasLoGain())
    766786    {
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r8518 r8582  
    20272027        cont.Add(fDisplay);
    20282028
     2029    cont.Add(const_cast<TEnv*>(GetEnv()));
     2030
    20292031    return WriteContainer(cont, GetOutputFileName(), "UPDATE");
    20302032}
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8518 r8582  
    319319    if (fDisplay)
    320320        arr.Add(fDisplay);
     321
     322    arr.Add(const_cast<TEnv*>(GetEnv()));
    321323
    322324    return WriteContainer(arr, fname, "UPDATE");
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8518 r8582  
    895895        return kFALSE;
    896896
    897     *fLog << all << "Mean pulse time (" << (fSequence.IsMonteCarlo()?"MC":"cosmics") << "): ";
     897    *fLog << all << "Mean pulse time/Avg pos.of maximum (" << (fSequence.IsMonteCarlo()?"MC":"cosmics") << "): ";
    898898    *fLog << meanpulsetime << "+-" << rmspulsetime << endl;
    899899
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8222 r8582  
    13221322
    13231323    // check if output should be written
    1324     if (!fPathOut.IsNull())
    1325         fDisplay->SaveAsRoot(fPathOut);
    1326 
    1327     return kTRUE;
    1328 }
     1324    if (fPathOut.IsNull())
     1325        return kTRUE;
     1326
     1327    // Write the output
     1328    TObjArray cont;
     1329    cont.Add((TObject*)GetEnv());
     1330
     1331    if (fDisplay)
     1332        cont.Add(fDisplay);
     1333
     1334    return WriteContainer(cont, fPathOut, "RECREATE");
     1335}
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r8531 r8582  
    103103    }
    104104
     105    TObjArray cont;
     106    cont.Add(const_cast<TEnv*>(GetEnv()));
     107
     108    if (fDisplay)
     109        cont.Add(fDisplay);
     110
    105111    const TString oname = Form("%s/star%08d.root", (const char*)fPathOut, fSequence.GetSequence());
    106 
    107     *fLog << inf << "Writing to file: " << oname << endl;
    108 
    109     TFile file(oname, "RECREATE");
    110 
    111     *fLog << inf << " - MStatusDisplay..." << flush;
    112     if (fDisplay && fDisplay->Write()<=0)
    113     {
    114         *fLog << err << "Unable to write MStatusDisplay to " << oname << endl;
    115         return kFALSE;
    116     }
    117     *fLog << inf << "ok." << endl;
    118 
    119     return kTRUE;
     112    return WriteContainer(cont, oname, "UPDATE");
    120113}
    121114
     
    345338    // Spark cut
    346339    MFDataPhrase fsparks("log10(MNewImagePar.fConc1) < (-0.371)*log10(MHillas.fSize) + 0.596", "SparkCut");
     340    //fill0b.SetFilter(&fsparks);
    347341    fill0c.SetFilter(&fsparks);
    348342
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r8564 r8582  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.32 2007-06-16 21:59:19 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.33 2007-06-19 09:25:39 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    620620    }
    621621
     622    max /= fRunHeader->GetScale();
     623    min /= fRunHeader->GetScale();
     624
    622625    // If the maximum in the high gain window is smaller than
    623     // FIXME: Precompiled value!
    624626    return max-min<fMaxSignalVar && max<fMaxSignalAbs;
    625627}
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.h

    r8565 r8582  
    115115    UShort_t GetNumNormalPixels() const;
    116116    UShort_t GetNumSpecialPixels() const;
    117     UInt_t   GetScale() const { return 1<<((fNumBytesPerSample-1)*8); }
     117    UInt_t   GetScale() const { switch (fNumBytesPerSample) { case 1: return 0x1; case 2: return 0x100; case 4: return 0x1000000; } return 0; }
     118    UInt_t   GetMax() const { switch (fNumBytesPerSample) { case 1: return 0xff; case 2: return 0xffff; case 4: return 0xffffffff; } return 0; }
    118119
    119120    UInt_t GetNumSamplesPerCrate() const
  • trunk/MagicSoft/Mars/msignal/MExtractor.cc

    r8502 r8582  
    251251        fLoGainFirst=0;
    252252        fLoGainLast =0;
    253         if (fSaturationLimit>0xff)
     253        if (fSaturationLimit>fRunHeader->GetMax())
    254254        {
    255             *fLog << " and saturation limit";
    256             fSaturationLimit=0xff;
     255            *fLog << " and saturation limit to " << fRunHeader->GetMax();
     256            fSaturationLimit=fRunHeader->GetMax();
    257257        }
    258258        *fLog << "." << endl;
Note: See TracChangeset for help on using the changeset viewer.