Changeset 599 for trunk


Ignore:
Timestamp:
02/19/01 16:36:16 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r596 r599  
    11                                                                  -*-*- END -*-*-
    22 
     3 2000/02/19: Thomas Bretz
     4
     5   *  .rootrc: added
     6
     7   * MEvtLoop.[h,cc]: split eventloop in its three parts, this should
     8     be used for debugging only.
     9
     10
    311 2000/02/06: Harald Kornmayer
    412
  • trunk/MagicSoft/Mars/Makefile

    r594 r599  
    6464
    6565$(LIBRARIES):
    66         @echo " ++++++++++++++++++++++++++++++
     66        @echo "
    6767        @echo " Creating lib$@:"
    6868        (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r458 r599  
    4646}
    4747
    48 void MEvtLoop::Eventloop(Int_t maxcnt, const char *ftasks)
     48Bool_t MEvtLoop::PreProcess(const char *tlist)
    4949{
    50     // See class description above.
     50    //
     51    // The proprocessing part of the eventloop. Be careful, this is
     52    // for developers use only!
     53    //
    5154
    5255    //
     
    5659    {
    5760        cout << "MEvtLoop::Eventloop - Error: Parlist not initialized." << endl;
    58         return;
     61        return kFALSE;
    5962    }
    6063
     
    6366    //  the default name is "MTaskList"
    6467    //
    65     MTaskList *tasks = (MTaskList*)fParlist->FindObject(ftasks);
    66     if (!tasks)
     68    fTaskList = (MTaskList*)fParlist->FindObject(tlist);
     69    if (!fTaskList)
    6770    {
    68         cout << "MEvtLoop::Eventloop - Error: Cannot find tasklist '" << ftasks << "' in parameter list." << endl;
    69         return;
     71        cout << "MEvtLoop::Eventloop - Error: Cannot find tasklist '" << tlist << "' in parameter list." << endl;
     72        return kFALSE;
    7073    }
    7174
     
    7578    //  the parameter list
    7679    //
    77     if (!tasks->PreProcess(fParlist))
     80    if (!fTaskList->PreProcess(fParlist))
    7881    {
    7982        cout << "Error detected while PreProcessing" << endl;
    80         return;
     83        return kFALSE;
    8184    }
     85
     86    return kTRUE;
     87}
     88
     89void MEvtLoop::Process(Int_t maxcnt) const
     90{
     91    //
     92    // The processing part of the eventloop. Be careful, this is
     93    // for developers use only!
     94    //
    8295
    8396    //
     
    108121    //
    109122    if (maxcnt<0)
    110         while (tasks->Process() && ++dummy);
     123        while (fTaskList->Process() && ++dummy);
    111124    else
    112         while (tasks->Process() && dummy--);
     125        while (fTaskList->Process() && dummy--);
    113126
    114127    //
     
    127140        << endl << endl;
    128141
     142}
     143
     144void MEvtLoop::PostProcess() const
     145{
     146    //
     147    // The postprocessing part of the eventloop. Be careful, this is
     148    // for developers use only!
     149    //
     150
    129151    //
    130152    //  execute the post process of all tasks
    131153    //
    132     tasks->PostProcess();
     154    fTaskList->PostProcess();
    133155}
    134156
     157void MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist)
     158{
     159    // See class description above.
     160
     161    if (!PreProcess(tlist))
     162        return;
     163
     164    Process(maxcnt);
     165
     166    PostProcess();
     167}
     168
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r458 r599  
    1515
    1616class MParList;
     17class MTaskList;
    1718
    1819class MEvtLoop
     
    2021private:
    2122    MParList  *fParlist;
     23    MTaskList *fTaskList;
    2224
    2325public:
     
    2729    void SetParList(MParList *p);
    2830
     31    Bool_t PreProcess(const char *tlist="MTaskList");
     32    void   Process(Int_t maxcnt) const;
     33    void   PostProcess() const;
     34
    2935    void Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
    3036
  • trunk/MagicSoft/Mars/mgui/Makefile

    r597 r599  
    5959           MHexagon.cc \
    6060           MCamGeom.cc \
    61            MCamNeighbor.cc \
    62            MCamDisplay.cc
     61           MCamNeighbor.cc
    6362
    6463
Note: See TracChangeset for help on using the changeset viewer.