Ignore:
Timestamp:
07/05/01 13:23:12 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
8 edited

Legend:

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

    r851 r855  
    5151MParContainer::MParContainer(const MParContainer &named)
    5252{
    53     *fName = *(named.fName);
     53    *fName  = *(named.fName);
    5454    *fTitle = *(named.fTitle);
    5555
    5656    fLog = named.fLog;
    5757
    58     fHasChanged = named.fHasChanged;
     58    fReadyToSave = named.fReadyToSave;
    5959}
    6060
     
    7373    *fTitle = *(rhs.fTitle);
    7474
    75     fLog        = rhs.fLog;
    76     fHasChanged = rhs.fHasChanged;
     75    fLog         = rhs.fLog;
     76    fReadyToSave = rhs.fReadyToSave;
    7777
    7878    return *this;
     
    103103    *cont.fTitle = *fTitle;
    104104
    105     cont.fLog        = fLog;
    106     cont.fHasChanged = fHasChanged;
     105    cont.fLog         = fLog;
     106    cont.fReadyToSave = fReadyToSave;
    107107}
    108108
  • trunk/MagicSoft/Mars/mbase/MParContainer.h

    r848 r855  
    3535
    3636protected:
    37     MLog    *fLog;        //! The general log facility for this object, initialized with the global object
     37    MLog    *fLog;         //! The general log facility for this object, initialized with the global object
    3838
    39     TString *fName;       //! parameter container identifier (name)
    40     TString *fTitle;      //! parameter container title
     39    TString *fName;        //! parameter container identifier (name)
     40    TString *fTitle;       //! parameter container title
    4141
    42     Bool_t   fHasChanged; //! should be set to true if the contents of the container is changed somehow
     42    Bool_t   fReadyToSave; //! should be set to true if the contents of the container is changed somehow
    4343
    4444public:
    45     MParContainer(const char *name="", const char *title="") : fLog(&gLog), fHasChanged(kFALSE) { Init(name, title); }
    46     MParContainer(const TString &name, const TString &title) : fLog(&gLog), fHasChanged(kFALSE) { Init(name, title); }
     45    MParContainer(const char *name="", const char *title="") : fLog(&gLog), fReadyToSave(kFALSE) { Init(name, title); }
     46    MParContainer(const TString &name, const TString &title) : fLog(&gLog), fReadyToSave(kFALSE) { Init(name, title); }
    4747    MParContainer(const MParContainer &named);
    4848    MParContainer& operator=(const MParContainer& rhs);
     
    6969    virtual void     Reset() {};
    7070
    71     virtual Bool_t HasChanged() { return fHasChanged; }
    72     virtual void   SetHasChanged(Bool_t flag=kTRUE) { fHasChanged=flag; }
     71    virtual Bool_t IsReadyToSave() { return fReadyToSave; }
     72    virtual void   SetReadyToSave(Bool_t flag=kTRUE) { fReadyToSave=flag; }
    7373
    7474    virtual void AsciiRead(ifstream &fin);
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r852 r855  
    265265//   itself) to unchanged
    266266//
    267 void MParList::SetHasChanged(Bool_t flag)
     267void MParList::SetReadyToSave(Bool_t flag)
    268268{
    269269    TIter Next(&fContainer);
     
    275275    //
    276276    while ( (cont=(MParContainer*)Next()) )
    277         cont->SetHasChanged(flag);
    278 
    279     MParContainer::SetHasChanged(flag);
     277        cont->SetReadyToSave(flag);
     278
     279    MParContainer::SetReadyToSave(flag);
    280280}
    281281
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r843 r855  
    4545
    4646    void Reset();
    47     void SetHasChanged(Bool_t flag=kTRUE);
     47    void SetReadyToSave(Bool_t flag=kTRUE);
    4848
    4949    void Print(Option_t *t = NULL);
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r768 r855  
    3535// outside. It makes also possible to go back by decreasing the number.    //
    3636//                                                                         //
     37// If you don't want to start reading the first event you have to call     //
     38// MReadTree::SetEventNum after instantiating your MReadTree-object.       //
     39//                                                                         //
    3740/////////////////////////////////////////////////////////////////////////////
    3841
     
    178181        // the actual branch should be stored - enable branch.
    179182        //
     183        // FIXME: is it correct, that the pointer is deleted immediatly afterwards?
    180184        branch->SetAddress(&pcont);
    181185    }
     
    190194//  (Remark: The position can also be set by some member functions
    191195//  If the end of the file is reached the Eventloop is stopped.
     196//
    192197Bool_t MReadTree::Process()
    193198{
     
    267272// this function makes Process() read event number nr next
    268273//
    269 // Remark: You can use this function to set the event number from which
    270 //         you want to start reading.
     274// Remark: You can use this function after instatiating you MReadTree-object
     275//         to set the event number from which you want to start reading.
    271276//
    272277Bool_t MReadTree::SetEventNum(UInt_t nr)
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r851 r855  
    5959MTaskList::MTaskList(MTaskList &ts)
    6060{
    61   fTasks.AddAll(&ts.fTasks);
    62 }
    63 
    64 // --------------------------------------------------------------------------
    65 //
    66 //  create the Iterator over the tasklist
     61    fTasks.AddAll(&ts.fTasks);
     62}
     63
     64// --------------------------------------------------------------------------
     65//
     66//  Set the logging stream for the all tasks in the list and the tasklist
     67//  itself.
    6768//
    6869void MTaskList::SetLogStream(MLog *log)
    6970{
     71    //
     72    // create the Iterator over the tasklist
     73    //
    7074    TIter Next(&fTasks);
    7175
     
    167171{
    168172    //
    169     // Reset the HasChanged flag.
     173    // Reset the ReadyToSave flag.
    170174    // Reset all containers.
    171175    //
    172     fParList->SetHasChanged(kFALSE);
     176    // FIXME: To run a tasklist as a single task in another tasklist we
     177    //        have to make sure, that the Parameter list isn't reset.
     178    //
     179    fParList->SetReadyToSave(kFALSE);
    173180    fParList->Reset();
    174181
     
    231238
    232239    //
    233     // Reset the HasChanged flag.
     240    // Reset the ReadyToSave flag.
    234241    // Reset all containers.
    235242    //
    236     fParList->SetHasChanged(kFALSE);
     243    // FIXME: To run a tasklist as a single task in another tasklist we
     244    //        have to make sure, that the Parameter list isn't reset.
     245    //
     246    fParList->SetReadyToSave(kFALSE);
    237247    fParList->Reset();
    238248
  • trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc

    r852 r855  
    3232// This can be the name of the class or a given name, which identifies     //
    3333// the container in a parameter container list (MParList).                 //
    34 // The container is writte to the ascii file if its HasChanged flag is     //
     34// The container is writte to the ascii file if its ReadyToSave flag is     //
    3535// set (MParContainer)                                                     //
    3636//                                                                         //
     
    102102void MWriteAsciiFile::CheckAndWrite() const
    103103{
    104     if (fContainer->HasChanged())
     104    if (fContainer->IsReadyToSave())
    105105        fContainer->AsciiWrite(*fOut);
    106106}
  • trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc

    r852 r855  
    322322        // Check for the Write flag
    323323        //
    324         if (!entry->GetContainer()->HasChanged())
     324        if (!entry->GetContainer()->IsReadyToSave())
    325325            continue;
    326326
Note: See TracChangeset for help on using the changeset viewer.