Changeset 5564


Ignore:
Timestamp:
12/06/04 14:28:05 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5561 r5564  
    4040     - removed kTimeAndCharge flag because it is obsolete (nowhere used)
    4141       and not correctly handled at all
     42
     43   * callisto.cc, star.cc:
     44     - added '--debug-mem' option
     45
     46   * callisto.rc:
     47     - changed such to make it work with the new double-pedestal-loop
     48       callisto
     49     - default extractor now is Digital Filter
     50
    4251
    4352
  • trunk/MagicSoft/Mars/callisto.cc

    r5557 r5564  
    44#include <TGClient.h>
    55#include <TApplication.h>
     6#include <TObjectTable.h>
    67
    78#include "MLog.h"
     
    5253    gLog << " Options:" << endl;
    5354    gLog.Usage();
    54     gLog << "   --debug-env               Debug setting resources from file" << endl << endl;
     55    gLog << "   --debug-env               Debug setting resources from file" << endl;
     56    gLog << "   --debug-mem               Debug memory usage" << endl << endl;
    5557    gLog << endl;
    5658    gLog << "   -q                        Quit when job is finished" << endl;
     
    116118    //const Bool_t  kPrintOnly  = arg.HasOnlyAndRemove("--print-only");
    117119    const Bool_t  kDebugEnv   = arg.HasOnlyAndRemove("--debug-env");
     120    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
    118121
    119122    const Bool_t  kQuit       = arg.HasOnlyAndRemove("-q");
     
    194197        return -1;
    195198    }
     199
     200    if (kDebugMem)
     201        TObject::SetObjectStat(kTRUE);
    196202
    197203    //
     
    454460
    455461    if (kBatch || kQuit)
    456     {
    457462        delete d;
    458         return 0;
    459     }
    460 
    461     // From now on each 'Close' means: Terminate the application
    462     d->SetBit(MStatusDisplay::kExitLoopOnClose);
    463 
    464     // Wait until the user decides to exit the application
    465     app.Run(kFALSE);
     463    else
     464    {
     465        // From now on each 'Close' means: Terminate the application
     466        d->SetBit(MStatusDisplay::kExitLoopOnClose);
     467
     468        // Wait until the user decides to exit the application
     469        app.Run(kFALSE);
     470    }
     471
     472    if (TObject::GetObjectStat())
     473    {
     474        TObject::SetObjectStat(kFALSE);
     475        gObjectTable->Print();
     476    }
     477
    466478    return 0;
    467479}
     480
  • trunk/MagicSoft/Mars/callisto.rc

    r5535 r5564  
    2727# If you don't want it, it is written to the calibration output anyhow.
    2828# -------------------------------------------------------------------------
    29 #MJPedestalC.PathOut: .
     29#MJPedestalC1.PathOut: .
     30#MJPedestalC2.PathOut: .
    3031
    3132# -------------------------------------------------------------------------
     
    4243# datacenter is used. (overwrites command line options)
    4344# -------------------------------------------------------------------------
    44 #MJPedestalC.PathData:   /data/MAGIC/Period016/
    45 #MJCalibration.PathData: /data/MAGIC/Period016/
     45#MJPedestalC1.PathData:   /data/MAGIC/Period016/
     46#MJPedestalC2.PathData:   /data/MAGIC/Period016/
     47#MJCalibration.PathData:  /data/MAGIC/Period016/
     48
     49# -------------------------------------------------------------------------
     50# Define here which signal extractor you are going to use for the
     51# whole calibration chain
     52# -------------------------------------------------------------------------
     53MJPedestalC1.ExtractSignal: MExtractTimeAndChargeDigitalFilter
     54
     55# -------------------------------------------------------------------------
     56# In the case of the Digital filter you have to overwrite the default
     57# weights file depending on what you are extracting
     58# -------------------------------------------------------------------------
     59MJPedetslaC2.ExtractSignal.WeightsFile:      msignal/calibration_weights_UV.dat
     60MJCalibration.ExtractSignal.WeightsFile:     msignal/calibration_weights_UV.dat
     61MJCalibrateSignal.ExtractSignal.WeightsFile: msignal/cosmics_weights.dat
    4662
    4763# -------------------------------------------------------------------------
     
    4965# -------------------------------------------------------------------------
    5066# Switch on relative time calibration
    51 MJCalibration.RelTimeCalibration: Yes
     67#MJCalibration.RelTimeCalibration: Yes
    5268# Switch on intensity calibration
    5369#MJCalibration.IntensityCalibration: Yes
     
    7086# could be (if no pedestal file available) a data-file, too.
    7187# -------------------------------------------------------------------------
    72 MJPedestalC.ExtractPedestal: MPedCalcPedRun
    73 MJPedestalC.ExtractPedestal.PedestalUpdate:    no
    74 MJPedestalC.ExtractPedestal.ExtractWinFirst:    0
    75 MJPedestalC.ExtractPedestal.ExtractWinSize:     6
     88#MJPedestalC1.ExtractPedestal: MPedCalcFromPedRun
     89#MJPedestalC1.ExtractPedestal.ExtractWinFirst:    0
     90#MJPedestalC1.ExtractPedestal.ExtractWinSize:     6
     91#MJPedestalC1.ExtractPedestal.PedestalUpdate:    no
     92#MJPedestalC1.ExtractPedestal.CheckWinFirst:     0
     93#MJPedestalC1.ExtractPedestal.CheckWinSize:     29
     94
     95#MJPedestalC2.ExtractPedestal: MPedCalcFromPedRun
     96#MJPedestalC2.ExtractPedestal.ExtractWinFirst:    0
     97#MJPedestalC2.ExtractPedestal.ExtractWinSize:     6
     98#MJPedestalC2.ExtractPedestal.PedestalUpdate:    no
     99#MJPedestalC2.ExtractPedestal.CheckWinFirst:     0
     100#MJPedestalC2.ExtractPedestal.CheckWinSize:     29
    76101
    77102# -------------------------------------------------------------------------
     
    80105# could be (if no pedestal file available) a data-file, too.
    81106# -------------------------------------------------------------------------
    82 #MJPedestalC.ExtractPedestal: MPedCalcFromLoGain
    83 #MJPedestalC.ExtractPedestal.PedestalUpdate:   no
    84 #MJPedestalC.ExtractPedestal.ExtractWinFirst:  15
    85 #MJPedestalC.ExtractPedestal.ExtractWinSize:    6
    86 #MJPedestalC.ExtractPedestal.CheckWinFirst:     0
    87 #MJPedestalC.ExtractPedestal.CheckWinSize:     29
    88 #MJPedestalC.ExtractPedestal.MaxHiGainVar:     40
    89 
    90 # -------------------------------------------------------------------------
    91 # Configure MJPedestal
     107MJPedestalC1.ExtractPedestal: MPedCalcFromLoGain
     108#MJPedestalC1.ExtractPedestal.ExtractWinFirst:    0
     109#MJPedestalC1.ExtractPedestal.ExtractWinSize:     6
     110#MJPedestalC1.ExtractPedestal.PedestalUpdate:    no
     111#MJPedestalC1.ExtractPedestal.CheckWinFirst:     0
     112#MJPedestalC1.ExtractPedestal.CheckWinSize:     29
     113#MJPedestalC1.ExtractPedestal.MaxHiGainVar:     40
     114
     115MJPedestalC2.ExtractPedestal: MPedCalcFromLoGain
     116#MJPedestalC2.ExtractPedestal.ExtractWinFirst:    0
     117#MJPedestalC2.ExtractPedestal.ExtractWinSize:     6
     118#MJPedestalC2.ExtractPedestal.PedestalUpdate:    no
     119#MJPedestalC2.ExtractPedestal.CheckWinFirst:     0
     120#MJPedestalC2.ExtractPedestal.CheckWinSize:     29
     121#MJPedestalC2.ExtractPedestal.MaxHiGainVar:     40
     122
     123# -------------------------------------------------------------------------
     124# Configure MJPedestalC1 and MJPedestalC2
    92125# -------------------------------------------------------------------------
    93126# Maximum number of event processed in the loop
    94 #MJPedestalC.MaxEvents: 1000
     127#MJPedestalC1.MaxEvents: 1000
     128#MJPedestalC2.MaxEvents: 1000
    95129# Allow to overwrite existing files with the output file
    96 #MJPedestalC.AllowOverwrite: No
     130#MJPedestalC1.AllowOverwrite: No
     131#MJPedestalC2.AllowOverwrite: No
    97132# Use data runs from the sequence instead of calibration runs
    98 #MJPedestalC.UseData: No
     133#MJPedestalC1.UseData: No
     134#MJPedestalC2.UseData: No
    99135
    100136
     
    103139# and automatically the data extraction
    104140# -------------------------------------------------------------------------
    105 MJCalibration.ExtractSignal: MExtractFixedWindow
    106 #MJCalibration.ExtractSignal: MExtractTimeAndChargeDigitalFilter
    107 #MJCalibration.ExtractSignal.WeightsFile: msignal/cosmics_weights.dat
    108 MJCalibration.ExtractSignal.HiGainFirst:       3
    109 MJCalibration.ExtractSignal.HiGainLast:       14
    110 MJCalibration.ExtractSignal.LoGainFirst:       4
    111 MJCalibration.ExtractSignal.LoGainLast:       13
     141#MJCalibration.ExtractSignal: MExtractFixedWindow
     142#MJCalibration.ExtractSignal.HiGainFirst:       3
     143#MJCalibration.ExtractSignal.HiGainLast:       14
     144#MJCalibration.ExtractSignal.LoGainFirst:       4
     145#MJCalibration.ExtractSignal.LoGainLast:       13
    112146#MJCalibration.ExtractSignal.HiGainWindowSize:  6
    113147#MJCalibration.ExtractSignal.LoGainWindowSize:  6
     
    120154# and automatically the data extraction
    121155# -------------------------------------------------------------------------
    122 MJCalibration.ExtractTime: MExtractTimeFastSpline
    123 MJCalibration.ExtractTime.HiGainFirst:       0
    124 MJCalibration.ExtractTime.HiGainLast:        7
    125 MJCalibration.ExtractTime.LoGainFirst:       3
    126 MJCalibration.ExtractTime.LoGainLast:        8
     156#MJCalibration.ExtractTime: <dummy>
     157#MJCalibration.ExtractTime: MExtractTimeFastSpline
     158#MJCalibration.ExtractTime.HiGainFirst:       0
     159#MJCalibration.ExtractTime.HiGainLast:        7
     160#MJCalibration.ExtractTime.LoGainFirst:       3
     161#MJCalibration.ExtractTime.LoGainLast:        8
    127162#MJCalibration.ExtractTime.WindowSizeHiGain:  6
    128163#MJCalibration.ExtractTime.WindowSizeLoGain:  6
     
    141176#MJCalibration.MCalibrationChargeCalc.LambdaCheckLimit:   0.5
    142177#MJCalibration.MCalibrationChargeCalc.PheErrLimit:        3.5
    143 #//MCalibrationChargeCalc.PulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col;   }
    144178
    145179# -------------------------------------------------------------------------
     
    162196# -------------------------------------------------------------------------
    163197#MJCalibrateSignal.PathOut:  .
    164 #MJPedestalY.PathOut:        .
    165 #MJPedestalY.PathData:       /data/MAGIC/Period016/
     198#MJPedestalY1.PathOut:        .
     199#MJPedestalY2.PathOut:        .
     200#MJPedestalY1.PathData:      /data/MAGIC/Period016/
     201#MJPedestalY2.PathData:      /data/MAGIC/Period016/
    166202#MJCalibrateSignal.PathData: /data/MAGIC/Period016/
    167203#MJCalibrateSignal.PathIn:   .
    168204
    169 MJPedestalY.UseData:   Yes
    170 MJPedestalY.MaxEvents: 750
    171 
    172 MJPedestalY.ExtractPedestal: MPedCalcFromLoGain
    173 MJPedestalY.ExtractPedestal.PedestalUpdate:   no
    174 
    175 # -------------------------------------------------------------------------
    176 # Setup pedestal extraktor for running through data
    177 # -------------------------------------------------------------------------
    178 MJCalibrateSignal.MPedCalcFromLoGain: MPedCalcFromLoGain
    179 MJCalibrateSignal.ExtractPedestal.PedestalUpdate:   yes
    180 MJCalibrateSignal.ExtractPedestal.NumEventsDump:   500
     205# -------------------------------------------------------------------------
     206# If you want to change the behaviour of the pedestal extraction...
     207# -------------------------------------------------------------------------
     208#MJPedestalY1.UseData:   Yes
     209#MJPedestalY2.UseData:   Yes
     210#MJPedestalY1.MaxEvents: 750
     211#MJPedestalY2.MaxEvents: 750
     212
     213#MJPedestalY.ExtractPedestal: MPedCalcFromLoGain
     214#MJPedestalY.ExtractPedestal.PedestalUpdate:   no
     215
     216# -------------------------------------------------------------------------
     217# Setup pedestal extractor for running through data
     218# -------------------------------------------------------------------------
     219#MJCalibrateSignal.ExtractPedestal: MPedCalcFromLoGain
     220#MJCalibrateSignal.ExtractPedestal.PedestalUpdate:   yes
     221#MJCalibrateSignal.ExtractPedestal.NumEventsDump:   500
    181222#MJCalibrateSignal.ExtractPedestal.ExtractWinFirst:  15
    182223#MJCalibrateSignal.ExtractPedestal.ExtractWinSize:    6
     
    188229# Setup calibration of data
    189230# -------------------------------------------------------------------------
    190 MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
    191 MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
     231#MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
     232#MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
    192233
    193234# -------------------------------------------------------------------------
    194235# Setup level for determining of bad pixels
    195236# -------------------------------------------------------------------------
    196 # MJCalibrateSignal.MBadPixelsCalc.PedestalLevel:      3.0
    197 MJCalibrateSignal.MBadPixelsTreat.NumMinNeighbors:    2
    198 MJCalibrateSignal.MBadPixelsTreat.UseInterpolation:   yes
    199 MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalEvt: yes
    200 MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalRun: no
    201 MJCalibrateSignal.MBadPixelsTreat.ProcessTimes:       yes
     237#MJCalibrateSignal.MBadPixelsCalc.PedestalLevel:      3.0
     238#MJCalibrateSignal.MBadPixelsTreat.NumMinNeighbors:    2
     239#MJCalibrateSignal.MBadPixelsTreat.UseInterpolation:   yes
     240#MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalEvt: yes
     241#MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalRun: no
     242#MJCalibrateSignal.MBadPixelsTreat.ProcessTimes:       yes
    202243#MJCalibrateSignal.MBadPixelsTreat.UseCentralPixel:    no
    203244#MJCalibrateSignal.MBadPixelsTreat.HardTreatment:      no
  • trunk/MagicSoft/Mars/star.cc

    r5309 r5564  
    44#include <TGClient.h>
    55#include <TApplication.h>
     6#include <TObjectTable.h>
    67
    78#include "MLog.h"
     
    4748    gLog << " Options:" << endl;
    4849    gLog.Usage();
    49     gLog << "   --debug-env               Debug setting resources from file" << endl << endl;
     50    gLog << "   --debug-env               Debug setting resources from file" << endl;
     51    gLog << "   --debug-mem               Debug memory usage" << endl << endl;
    5052    gLog << endl;
    5153    gLog << " Input Options:" << endl;
     
    9092    //const Bool_t  kPrintOnly  = arg.HasOnlyAndRemove("--print-only");
    9193    const Bool_t  kDebugEnv   = arg.HasOnlyAndRemove("--debug-env");
     94    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
    9295
    9396    const Bool_t  kQuit       = arg.HasOnlyAndRemove("-q");
     
    203206    d->SetTitle(kSequence);
    204207
    205     //
    206     // Do calibration
    207     //
    208     MJStar job(Form("MJStar #%d", seq.GetSequence()));
    209     job.SetSequence(seq);
    210     job.SetEnv(kConfig);
    211     job.SetEnvDebug(kDebugEnv);
    212     job.SetDisplay(d);;
    213     job.SetOverwrite(kOverwrite);
    214     job.SetPathOut(kOutpath);
    215     job.SetPathData(kInpath);
    216     // job.SetPathIn(kInpath); // not yet needed
    217 
    218     if (!job.ProcessFile(kIsMC))
    219     {
    220         gLog << err << "Calculation of image parameters failed." << endl << endl;
    221         return -1;
    222     }
    223 
    224     if (!job.GetDisplay())
    225     {
    226         gLog << warn << "Display closed by user... execution aborted." << endl << endl;
    227         return 1;
     208    if (kDebugMem)
     209        TObject::SetObjectStat(kTRUE);
     210
     211    //
     212    // Do calibration in a block (debug mem)
     213    //
     214    {
     215        MJStar job(Form("MJStar #%d", seq.GetSequence()));
     216        job.SetSequence(seq);
     217        job.SetEnv(kConfig);
     218        job.SetEnvDebug(kDebugEnv);
     219        job.SetDisplay(d);;
     220        job.SetOverwrite(kOverwrite);
     221        job.SetPathOut(kOutpath);
     222        job.SetPathData(kInpath);
     223        // job.SetPathIn(kInpath); // not yet needed
     224
     225        if (!job.ProcessFile(kIsMC))
     226        {
     227            gLog << err << "Calculation of image parameters failed." << endl << endl;
     228            return -1;
     229        }
     230
     231        if (!job.GetDisplay())
     232        {
     233            gLog << warn << "Display closed by user... execution aborted." << endl << endl;
     234            return 1;
     235        }
    228236    }
    229237
    230238    if (kBatch || kQuit)
    231     {
    232239        delete d;
    233         return 0;
    234     }
    235 
    236     // From now on each 'Close' means: Terminate the application
    237     d->SetBit(MStatusDisplay::kExitLoopOnClose);
    238 
    239     // Wait until the user decides to exit the application
    240     app.Run(kFALSE);
     240    else
     241    {
     242        // From now on each 'Close' means: Terminate the application
     243        d->SetBit(MStatusDisplay::kExitLoopOnClose);
     244
     245        // Wait until the user decides to exit the application
     246        app.Run(kFALSE);
     247    }
     248
     249    if (TObject::GetObjectStat())
     250    {
     251        TObject::SetObjectStat(kFALSE);
     252        gObjectTable->Print();
     253    }
     254
    241255    return 0;
    242256}
Note: See TracChangeset for help on using the changeset viewer.