Changeset 4768


Ignore:
Timestamp:
08/27/04 17:17:57 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4767 r4768  
    185185       tries to keep the random arrival time for pixels without
    186186       signal
     187     - fixed a bug which could cause a crash
     188     - added more control over the pedestal treatment
    187189
    188190
  • trunk/MagicSoft/Mars/callisto.rc

    r4748 r4768  
    198198# Setup level for determining of bad pixels
    199199# -------------------------------------------------------------------------
    200 # MJCalibrateSignal.MBadPixelsCalc.PedestalLevel: 3.0
    201 MJCalibrateSignal.MBadPixelsTreat.NumMinNeighbors:  2
    202 MJCalibrateSignal.MBadPixelsTreat.UseInterpolation: yes
    203 MJCalibrateSignal.MBadPixelsTreat.ProcessPedestal:  yes
    204 MJCalibrateSignal.MBadPixelsTreat.ProcessTimes:     yes
    205 #MJCalibrateSignal.MBadPixelsTreat.UseCentralPixel:  no
    206 #MJCalibrateSignal.MBadPixelsTreat.HardTreatment:    no
     200# MJCalibrateSignal.MBadPixelsCalc.PedestalLevel:      3.0
     201MJCalibrateSignal.MBadPixelsTreat.NumMinNeighbors:    2
     202MJCalibrateSignal.MBadPixelsTreat.UseInterpolation:   yes
     203MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalEvt: yes
     204MJCalibrateSignal.MBadPixelsTreat.ProcessPedestalRun: no
     205MJCalibrateSignal.MBadPixelsTreat.ProcessTimes:       yes
     206#MJCalibrateSignal.MBadPixelsTreat.UseCentralPixel:    no
     207#MJCalibrateSignal.MBadPixelsTreat.HardTreatment:      no
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r4748 r4768  
    9595    fName  = name  ? name  : gsDefName.Data();
    9696    fTitle = title ? title : gsDefTitle.Data();
     97
     98    SetProcessPedestalRun();
    9799}
    98100
     
    140142
    141143    fPedPhot = 0;
    142     if (IsProcessPedestal())
     144    if (IsProcessPedestalEvt() || IsProcessPedestalRun())
    143145    {
    144146        fPedPhot = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
     
    608610Bool_t MBadPixelsTreat::ReInit(MParList *pList)
    609611{
    610     if (!TESTBIT(fFlags, kProcessPedestal))
     612    if (IsProcessPedestalRun())
    611613        InterpolatePedestals();
    612614    return kTRUE;
     
    622624    {
    623625        InterpolateSignal();
    624         if (TESTBIT(fFlags, kProcessPedestal))
     626        if (IsProcessPedestalEvt())
    625627            InterpolatePedestals();
    626         if (TESTBIT(fFlags, kProcessTimes))
     628        if (IsProcessTimes())
    627629            InterpolateTimes();
    628630    }
     
    645647    out << ";" << endl;
    646648
    647     if (TESTBIT(fFlags, kUseInterpolation))
     649    if (IsUseInterpolation())
    648650        out << "   " << GetUniqueName() << ".SetUseInterpolation();" << endl;
    649     if (TESTBIT(fFlags, kUseCentralPixel))
     651    if (IsUseCentralPixel())
    650652        out << "   " << GetUniqueName() << ".SetUseCentralPixel();" << endl;
    651     if (TESTBIT(fFlags, kProcessPedestal))
    652         out << "   " << GetUniqueName() << ".SetProcessPedestal();" << endl;
    653     if (TESTBIT(fFlags, kProcessTimes))
     653    if (IsProcessPedestalRun())
     654        out << "   " << GetUniqueName() << ".SetProcessPedestalRun();" << endl;
     655    if (IsProcessPedestalEvt())
     656        out << "   " << GetUniqueName() << ".SetProcessPedestalEvt();" << endl;
     657    if (IsProcessTimes())
    654658        out << "   " << GetUniqueName() << ".SetProcessTimes();" << endl;
    655     if (TESTBIT(fFlags, kHardTreatment))
     659    if (IsHardTreatment())
    656660        out << "   " << GetUniqueName() << ".SetHardTreatment();" << endl;
    657661    if (fNumMinNeighbors!=3)
     
    662666//
    663667// Read the setup from a TEnv, eg:
    664 //   MBadPixelsTreat.UseInterpolation: no
    665 //   MBadPixelsTreat.UseCentralPixel:  no
    666 //   MBadPixelsTreat.HardTreatment:    no
    667 //   MBadPixelsTreat.ProcessPedestal:  no
    668 //   MBadPixelsTreat.NumMinNeighbors:  3
     668//   MBadPixelsTreat.UseInterpolation:    no
     669//   MBadPixelsTreat.UseCentralPixel:     no
     670//   MBadPixelsTreat.HardTreatment:       no
     671//   MBadPixelsTreat.ProcessPedestalRun:  no
     672//   MBadPixelsTreat.ProcessPedestalEvt:  no
     673//   MBadPixelsTreat.NumMinNeighbors:     3
    669674//
    670675Int_t MBadPixelsTreat::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     
    686691        SetHardTreatment(GetEnvValue(env, prefix, "HardTreatment", IsHardTreatment()));
    687692    }
    688     if (IsEnvDefined(env, prefix, "ProcessPedestal", print))
     693    if (IsEnvDefined(env, prefix, "ProcessPedestalRun", print))
    689694    {
    690695        rc = kTRUE;
    691         SetProcessPedestal(GetEnvValue(env, prefix, "ProcessPedestal", IsProcessPedestal()));
     696        SetProcessPedestalRun(GetEnvValue(env, prefix, "ProcessPedestalRun", IsProcessPedestalRun()));
     697    }
     698    if (IsEnvDefined(env, prefix, "ProcessPedestalEvt", print))
     699    {
     700        rc = kTRUE;
     701        SetProcessPedestalEvt(GetEnvValue(env, prefix, "ProcessPedestalEvt", IsProcessPedestalEvt()));
    692702    }
    693703    if (IsEnvDefined(env, prefix, "ProcessTimes", print))
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h

    r4748 r4768  
    2828    enum
    2929    {
    30         kUseInterpolation = 1,
    31         kUseCentralPixel  = 2,
    32         kProcessPedestal  = 3,
    33         kProcessTimes     = 4,
    34         kHardTreatment    = 5
     30        kUseInterpolation   = 1,
     31        kUseCentralPixel    = 2,
     32        kProcessPedestalRun = 3,
     33        kProcessPedestalEvt = 4,
     34        kProcessTimes       = 5,
     35        kHardTreatment      = 6
    3536    };
    3637
     
    6162        b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
    6263    }
     64    void SetProcessPedestalRun(Bool_t b=kTRUE)
     65    {
     66        b ? SETBIT(fFlags, kProcessPedestalRun) : CLRBIT(fFlags, kProcessPedestalRun);
     67    }
     68    void SetProcessPedestalEvt(Bool_t b=kTRUE)
     69    {
     70        b ? SETBIT(fFlags, kProcessPedestalEvt) : CLRBIT(fFlags, kProcessPedestalEvt);
     71    }
    6372    void SetProcessPedestal(Bool_t b=kTRUE)
    6473    {
    65         b ? SETBIT(fFlags, kProcessPedestal) : CLRBIT(fFlags, kProcessPedestal);
     74        SetProcessPedestalRun(!b);
     75        SetProcessPedestalEvt(b);
    6676    }
    6777    void SetProcessTimes(Bool_t b=kTRUE)
     
    7484    }
    7585
    76     Bool_t IsHardTreatment() const    { return TESTBIT(fFlags, kHardTreatment); }
    77     Bool_t IsProcessPedestal() const  { return TESTBIT(fFlags, kProcessPedestal); }
    78     Bool_t IsProcessTimes() const     { return TESTBIT(fFlags, kProcessTimes); }
    79     Bool_t IsUseCentralPixel() const  { return TESTBIT(fFlags, kUseCentralPixel); }
    80     Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); }
     86    Bool_t IsHardTreatment() const      { return TESTBIT(fFlags, kHardTreatment); }
     87    Bool_t IsProcessPedestalRun() const { return TESTBIT(fFlags, kProcessPedestalRun); }
     88    Bool_t IsProcessPedestalEvt() const { return TESTBIT(fFlags, kProcessPedestalEvt); }
     89    Bool_t IsProcessTimes() const       { return TESTBIT(fFlags, kProcessTimes); }
     90    Bool_t IsUseCentralPixel() const    { return TESTBIT(fFlags, kUseCentralPixel); }
     91    Bool_t IsUseInterpolation() const   { return TESTBIT(fFlags, kUseInterpolation); }
    8192
    8293    void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
Note: See TracChangeset for help on using the changeset viewer.