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

Legend:

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

    r858 r867  
    105105
    106106    if (fLog != &gLog)
    107     {
    108107        fParList ->SetLogStream(fLog);
    109         fTaskList->SetLogStream(fLog);
    110     }
    111108
    112109    //
     
    180177        << " --> " << (maxcnt<0?dummy:maxcnt)/clock.CpuTime() << " Events/s"
    181178        << endl << endl;
    182 
    183179}
    184180
     
    188184//  for developers use only!
    189185//
    190 void MEvtLoop::PostProcess() const
     186Bool_t MEvtLoop::PostProcess() const
    191187{
    192188    //
    193189    //  execute the post process of all tasks
    194190    //
    195     fTaskList->PostProcess();
    196 }
    197 
    198 // --------------------------------------------------------------------------
    199 //
    200 // See class description above.
    201 //
    202 void MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist)
    203 {
    204     if (!PreProcess(tlist))
    205         return;
    206 
    207     Process(maxcnt);
    208 
    209     PostProcess();
    210 }
    211 
     191    return fTaskList->PostProcess();
     192}
     193
     194// --------------------------------------------------------------------------
     195//
     196//  See class description above.
     197//
     198Bool_t MEvtLoop::Eventloop(Int_t maxcnt, const char *tlist)
     199{
     200    Bool_t rc = PreProcess();
     201
     202    if (rc)
     203        Process(maxcnt);
     204
     205    if (!PostProcess())
     206        return kFALSE;
     207
     208    return rc;
     209}
     210
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r698 r867  
    3535    Bool_t PreProcess(const char *tlist="MTaskList");
    3636    void   Process(Int_t maxcnt) const;
    37     void  PostProcess() const;
     37    Bool_t PostProcess() const;
    3838
    39     void Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
     39    Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
    4040
    4141    ClassDef(MEvtLoop, 0) // Class to execute the tasks in a tasklist
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r860 r867  
    199199//  after the last appearance of a semicolon is stripped to get the
    200200//  Name of the Class. Normally this is used to number your objects.
    201 //  "Name;1", "Name;2", ...
     201//  "Name;1", "Name;2", ... If a semicolon is detected leading dots
     202//  are stripped from the object-name (eg. "name;5.")
    202203//
    203204MParContainer *MParList::FindCreateObj(const char *classname, const char *objname)
     
    223224    const char *semicolon = strrchr(cname, ';');
    224225
     226    TString oname(objname);
     227
    225228    if (semicolon)
     229    {
    226230        cname.Remove(semicolon-cname);
     231
     232        //
     233        // Remove leading dots from objectname (eg. "MMcTrig;5.")
     234        //
     235        Int_t sz = oname.Sizeof()-2;
     236
     237        while (sz>=0 && oname[sz]=='.')
     238            oname.Remove(sz--);
     239    }
    227240
    228241    //
     
    230243    // in the List. If we can find one we are done.
    231244    //
    232     MParContainer *pcont = (MParContainer*)FindObject(objname);
     245    MParContainer *pcont = (MParContainer*)FindObject(oname);
    233246
    234247    if (pcont)
     
    238251    // if object is not existing in the list try to create one
    239252    //
    240     *fLog << dbginf << "Object '" << objname << "' of type '" << cname << "' not found... creating." << endl;
     253    *fLog << dbginf << "Object '" << oname << "' of type '" << cname << "' not found... creating." << endl;
    241254
    242255    //
     
    263276    // set the new object name of the object
    264277    //
    265     pcont->SetName(objname);
     278    pcont->SetName(oname);
    266279
    267280    //
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r858 r867  
    173173            // we cannot proceed reading this branch
    174174            //
    175             *fLog << "MReadTree::PreProcess - Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
     175            *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
    176176            continue;
    177177        }
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r858 r867  
    2222    const MFilter *fFilter;
    2323
     24    Bool_t fIsPreprocessed; // Indicates the success of the PreProcessing (set by MTaskList)
     25
    2426public:
    25     MTask() : fFilter(NULL) {}
     27    MTask() : fFilter(NULL), fIsPreprocessed(kFALSE) {}
    2628    ~MTask()
    2729    {
     
    3032    const MFilter *GetFilter() const { return fFilter; }
    3133    void SetFilter(const MFilter *filter) { fFilter=filter; }
     34
     35    Bool_t IsPreprocessed() const { return fIsPreprocessed; }
     36    void SetIsPreprocessed(Bool_t state=kTRUE) { fIsPreprocessed = state; }
    3237
    3338    virtual Bool_t PreProcess(MParList *pList);
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r860 r867  
    193193        if (!task->PreProcess(fParList))
    194194            return kFALSE;
     195
     196        task->SetIsPreprocessed();
    195197    }
    196198
     
    307309    while ( (task=(MTask*)Next()) )
    308310    {
     311        if (!task->IsPreprocessed())
     312            continue;
     313
    309314        *fLog << task->GetName() << "... " << flush;
    310315
Note: See TracChangeset for help on using the changeset viewer.