Ignore:
Timestamp:
03/31/03 10:37:56 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r1666 r1880  
    643643}
    644644
     645// --------------------------------------------------------------------------
     646//
     647// Read the contents/setup of a parameter container/task from a TEnv
     648// instance (steering card/setup file).
     649// The key to search for in the file should be of the syntax:
     650//    prefix.vname
     651// While vname is a name which is specific for a single setup date
     652// (variable) of this container and prefix is something like:
     653//    evtloopname.name
     654// While name is the name of the containers/tasks in the parlist/tasklist
     655//
     656// eg.  Job4.MImgCleanStd.CleaningLevel1:  3.0
     657//      Job4.MImgCleanStd.CleaningLevel2:  2.5
     658//
     659// If this cannot be found the next step is to search for
     660//      MImgCleanStd.CleaningLevel1:  3.0
     661// And if this doesn't exist, too, we should search for:
     662//      CleaningLevel1:  3.0
     663//
     664// Warning: The programmer is responsible for the names to be unique in
     665//          all Mars classes.
     666//
     667Bool_t MTaskList::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     668{
     669    MParContainer *cont = NULL;
     670
     671    TIter Next(fTasks);
     672    while ((cont=(MParContainer*)Next()))
     673        if (cont->ReadEnv(env, print)==kERROR)
     674            return kERROR;
     675
     676    Next.Reset();
     677    while ((cont=(MParContainer*)Next()))
     678        if (cont->ReadEnv(env, prefix, print)==kERROR)
     679            return kERROR;
     680
     681    return kTRUE;
     682}
     683
     684// --------------------------------------------------------------------------
     685//
     686// Write the contents/setup of a parameter container/task to a TEnv
     687// instance (steering card/setup file).
     688// The key to search for in the file should be of the syntax:
     689//    prefix.vname
     690// While vname is a name which is specific for a single setup date
     691// (variable) of this container and prefix is something like:
     692//    evtloopname.name
     693// While name is the name of the containers/tasks in the parlist/tasklist
     694//
     695// eg.  Job4.MImgCleanStd.CleaningLevel1:  3.0
     696//      Job4.MImgCleanStd.CleaningLevel2:  2.5
     697//
     698// If this cannot be found the next step is to search for
     699//      MImgCleanStd.CleaningLevel1:  3.0
     700// And if this doesn't exist, too, we should search for:
     701//      CleaningLevel1:  3.0
     702//
     703// Warning: The programmer is responsible for the names to be unique in
     704//          all Mars classes.
     705//
     706Bool_t MTaskList::WriteEnv(TEnv &env, TString prefix, Bool_t print) const
     707{
     708    MParContainer *cont = NULL;
     709
     710    TIter Next(fTasks);
     711    while ((cont=(MParContainer*)Next()))
     712        if (!cont->WriteEnv(env, prefix, print))
     713            return kFALSE;
     714    return kTRUE;
     715}
Note: See TracChangeset for help on using the changeset viewer.