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/MParList.cc

    r1528 r1880  
    768768}
    769769
     770// --------------------------------------------------------------------------
     771//
     772// Read the contents/setup of a parameter container/task from a TEnv
     773// instance (steering card/setup file).
     774// The key to search for in the file should be of the syntax:
     775//    prefix.vname
     776// While vname is a name which is specific for a single setup date
     777// (variable) of this container and prefix is something like:
     778//    evtloopname.name
     779// While name is the name of the containers/tasks in the parlist/tasklist
     780//
     781// eg.  Job4.MImgCleanStd.CleaningLevel1:  3.0
     782//      Job4.MImgCleanStd.CleaningLevel2:  2.5
     783//
     784// If this cannot be found the next step is to search for
     785//      MImgCleanStd.CleaningLevel1:  3.0
     786// And if this doesn't exist, too, we search for:
     787//      CleaningLevel1:  3.0
     788//
     789// Warning: The programmer is responsible for the names to be unique in
     790//          all Mars classes.
     791//
     792Bool_t MParList::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     793{
     794    MParContainer *cont = NULL;
     795
     796    TIter Next(fContainer);
     797    while ((cont=(MParContainer*)Next()))
     798        if (cont->ReadEnv(env, print)==kERROR)
     799            return kERROR;
     800
     801    Next.Reset();
     802    while ((cont=(MParContainer*)Next()))
     803        if (cont->ReadEnv(env, prefix, print)==kERROR)
     804            return kERROR;
     805
     806    return kTRUE;
     807}
     808
     809// --------------------------------------------------------------------------
     810//
     811// Write the contents/setup of a parameter container/task to a TEnv
     812// instance (steering card/setup file).
     813// The key to search for in the file should be of the syntax:
     814//    prefix.vname
     815// While vname is a name which is specific for a single setup date
     816// (variable) of this container and prefix is something like:
     817//    evtloopname.name
     818// While name is the name of the containers/tasks in the parlist/tasklist
     819//
     820// eg.  Job4.MImgCleanStd.CleaningLevel1:  3.0
     821//      Job4.MImgCleanStd.CleaningLevel2:  2.5
     822//
     823// If this cannot be found the next step is to search for
     824//      MImgCleanStd.CleaningLevel1:  3.0
     825// And if this doesn't exist, too, we search for:
     826//      CleaningLevel1:  3.0
     827//
     828// Warning: The programmer is responsible for the names to be unique in
     829//          all Mars classes.
     830//
     831Bool_t MParList::WriteEnv(TEnv &env, TString prefix, Bool_t print) const
     832{
     833    MParContainer *cont = NULL;
     834
     835    TIter Next(fContainer);
     836    while ((cont=(MParContainer*)Next()))
     837        if (!cont->WriteEnv(env, prefix, print))
     838            return kFALSE;
     839    return kTRUE;
     840}
Note: See TracChangeset for help on using the changeset viewer.