Ignore:
Timestamp:
05/27/05 16:33:19 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r7071 r7099  
    777777    SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
    778778
     779    // Setup an environment task
    779780    MTaskEnv tenv("ExtractSignal");
    780781    tenv.SetDefault(fExtractor);
    781782
    782     if (tenv.ReadEnv(*GetEnv(), GetEnvPrefix()+".ExtractSignal", GetEnvDebug()>2)==kERROR)
     783    // check the resource file for it
     784    if (CheckEnv(tenv)==kERROR)
    783785        return kFALSE;
    784786
     787//    if (tenv.ReadEnv(*GetEnv(), GetEnvPrefix()+".ExtractSignal", GetEnvDebug()>2)==kERROR)
     788//        return kFALSE;
     789
     790    // If the resource file didn't change the default we are done
    785791    if (fExtractor==tenv.GetTask())
    786792        return kTRUE;
    787793
     794    // If it changed the default check its inheritance...
    788795    if (!tenv.GetTask()->InheritsFrom(MExtractor::Class()))
    789796    {
     
    792799    }
    793800
     801    // ..and store it
    794802    SetExtractor((MExtractor*)tenv.GetTask());
    795803
     
    973981    }
    974982
    975     *fLog << inf;
    976     fLog->Separator(GetDescriptor());
    977     *fLog << "Calculate pedestal from Sequence #";
    978     *fLog << fSequence.GetSequence() << endl << endl;
    979 
    980     if (!CheckEnv())
    981         return kFALSE;
    982 
    983983    // --------------------------------------------------------------------------------
    984984
     
    992992
    993993    // --------------------------------------------------------------------------------
     994
     995    if (!CheckEnv())
     996        return kFALSE;
    994997
    995998    MParList  plist;
     
    10871090            return kFALSE;
    10881091
     1092        // The requested setup might have been overwritten
     1093        if (CheckEnv(*fExtractor)==kERROR)
     1094            return kFALSE;
     1095
    10891096        *fLog << all;
    1090         *fLog << underline << "Signal Extractor found in calibration file:" << endl;
     1097        *fLog << underline << "Signal Extractor found in calibration file and setup:" << endl;
    10911098        fExtractor->Print();
    10921099        *fLog << endl;
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r7094 r7099  
    170170    fLog->Separator("Initialize energy weighting");
    171171
    172     MParList l;
    173     l.AddToList(&w);
    174     if (!CheckEnv(l))
     172    if (!CheckEnv(w))
    175173    {
    176174        *fLog << err << "ERROR - Reading resources for MMcSpectrumWeight failed." << endl;
  • trunk/MagicSoft/Mars/mjobs/MJob.cc

    r7096 r7099  
    4747#include "MLogManip.h"
    4848
     49#include "MParList.h"
    4950#include "MEvtLoop.h"
    5051
     
    195196}
    196197
     198//------------------------------------------------------------------------
     199//
     200// Returns the result of c.ReadEnv(*fEnv, fEnvPrefix, fEnvDebug>2)
     201// By adding the container first to a MParList it is ensured that
     202// all levels are checked.
     203//
    197204Bool_t MJob::CheckEnv(MParContainer &c) const
    198205{
     
    200207        return kTRUE;
    201208
    202     return c.ReadEnv(*fEnv, fEnvPrefix, fEnvDebug>2);
     209    // Make sure that all levels are checked
     210    MParList l;
     211    l.AddToList(&c);
     212    return l.ReadEnv(*fEnv, fEnvPrefix+".", fEnvDebug>2);
    203213}
    204214
  • trunk/MagicSoft/Mars/mjobs/Makefile

    r6993 r7099  
    2323           -I../mbadpixels -I../msignal -I../mraw -I../mpedestal -I../mtools \
    2424           -I../mimage -I../mpointing -I../mastro -I../mfbase -I../mhvstime \
    25            -I../mtrigger -I../mmuon
     25           -I../mtrigger -I../mmuon -I../mmc
    2626
    2727SRCFILES = MSequence.cc \
Note: See TracChangeset for help on using the changeset viewer.