Ignore:
Timestamp:
01/29/04 16:52:22 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r1965 r2958  
    3636
    3737public:
    38     enum { kDoNotReset = BIT(17) };
     38    enum { kDoNotReset = BIT(17), kIsProcessing = BIT(18) };
    3939
    4040    MParList(const char *name=NULL, const char *title=NULL);
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2529 r2958  
    308308    *fLog << all << "Reinit... " << flush;
    309309
     310    if (!pList)
     311        pList = fParList;
     312
     313    //
     314    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     315    // running as a task in another tasklist.
     316    //
     317    const Bool_t noreset = pList->TestBit(MParList::kDoNotReset);
     318    if (!noreset)
     319        pList->SetBit(MParList::kDoNotReset);
     320
    310321    //
    311322    //  create the Iterator over the tasklist
     
    314325
    315326    MTask *task=NULL;
     327
    316328    //
    317329    // loop over all tasks for reinitialization
     
    321333        *fLog << all << task->GetName() << "... " << flush;
    322334
    323         if (!task->ReInit(pList?pList:fParList))
     335        if (!task->ReInit(pList/*?pList:fParList*/))
    324336        {
    325337            *fLog << err << "ERROR - ReInit of Task '" << task->GetDescriptor() << "' failed." << endl;
     
    329341
    330342    *fLog << all << endl;
     343
     344    //
     345    // Reset the ReadyToSave flag.
     346    //
     347    if (!noreset)
     348    {
     349        pList->SetReadyToSave(kFALSE);
     350        pList->ResetBit(MParList::kDoNotReset);
     351    }
    331352
    332353    return kTRUE;
     
    366387    fParList = pList;
    367388
    368     fTasksProcess.Clear();
     389    //
     390    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     391    // running as a task in another tasklist.
     392    //
     393    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     394    if (!noreset)
     395        fParList->SetBit(MParList::kDoNotReset);
    369396
    370397    //
     
    406433    *fLog << all << endl;
    407434
     435    //
     436    // Reset the ReadyToSave flag.
     437    //
     438    if (!noreset)
     439    {
     440        fParList->SetReadyToSave(kFALSE);
     441        fParList->ResetBit(MParList::kDoNotReset);
     442    }
     443
     444    //
     445    // loop over all tasks to fill fTasksProcess
     446    //
    408447    Next.Reset();
    409 
    410     //
    411     // loop over all tasks for preproccesing
    412     //
     448    fTasksProcess.Clear();
    413449    while ((task=(MTask*)Next()))
    414450        if (task->OverwritesProcess())
     
    441477    // running as a task in another tasklist.
    442478    //
    443     const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     479    const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing);
    444480    if (!noreset)
    445481    {
    446         fParList->SetReadyToSave(kFALSE);
     482        fParList->SetBit(MParList::kIsProcessing);
    447483        fParList->Reset();
    448         fParList->SetBit(MParList::kDoNotReset);
    449484    }
    450485
     
    514549
    515550    if (!noreset)
    516         fParList->ResetBit(MParList::kDoNotReset);
     551    {
     552        fParList->SetReadyToSave(kFALSE);
     553        fParList->ResetBit(MParList::kIsProcessing);
     554    }
    517555
    518556    return rc;
     
    535573
    536574    //
    537     // Reset the ReadyToSave flag.
    538     // Reset all containers.
    539     //
    540     // FIXME: To run a tasklist as a single task in another tasklist we
    541     //        have to make sure, that the Parameter list isn't reset.
    542     //
    543     fParList->SetReadyToSave(kFALSE);
    544     fParList->Reset();
     575    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     576    // running as a task in another tasklist.
     577    //
     578    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     579    if (!noreset)
     580    {
     581        fParList->SetBit(MParList::kDoNotReset);
     582        fParList->Reset();
     583    }
    545584
    546585    //
     
    566605
    567606    *fLog << all << endl;
     607
     608    //
     609    // Reset the ReadyToSave flag.
     610    //
     611    if (!noreset)
     612    {
     613        fParList->SetReadyToSave(kFALSE);
     614        fParList->ResetBit(MParList::kDoNotReset);
     615    }
    568616
    569617    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.