Ignore:
Timestamp:
05/06/02 11:41:44 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
3 edited

Legend:

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

    r1211 r1332  
    117117        *fLog << "(before event #" << GetEventNum()-1 << ")" << endl;
    118118
    119         fTaskList->ReInit();
     119        if (fTaskList->ReInit())
     120            return kTRUE;
     121
    120122        //MReadTree::Notify();
     123
     124        *fLog << err << "ERROR - ReInit of '" << fTaskList->GetName() << "' failed." << endl;
    121125    }
    122126    else
    123         *fLog << warn << "Warning: Cannot read new runheaders after reading event #" << GetEventNum() << endl;
     127        *fLog << err << "ERROR - Cannot read new runheaders after reading event #" << GetEventNum() << endl;
    124128
    125     return kTRUE;
     129    return kFALSE;
    126130}
    127131
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r1290 r1332  
    7171class MChain : public TChain
    7272{
     73private:
     74    Bool_t fNotified;
     75
    7376public:
    74     MChain() : TChain() {}
    75     MChain(const char *name, const char *title="") : TChain(name, title) {}
     77    MChain() : TChain(), fNotified(kFALSE) {}
     78    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE) {}
    7679
    7780    void ResetTree() { fTree = 0; }
     81
     82    virtual Bool_t Notify() { fNotified = kTRUE; return kTRUE; }
     83    virtual void   SetNotify(TObject *obj) { fNotify = obj; fNotified = kFALSE; }
     84
     85    Int_t GetEntry(Int_t entry=0, Int_t getall=0)
     86    {
     87        // --------------------------------------------------------------------------
     88        //
     89        // This is the code from TChain::GetEntry but skips the
     90        // notification in LoadTree. If LoadTree raises the notification
     91        // a flag is set and the notification is done by hand. If it
     92        // has not been successfull 0 is returned.
     93        //
     94        TObject *notify = GetNotify();
     95
     96        SetNotify(this);
     97
     98        Int_t rc = 0;
     99
     100        if (LoadTree(entry) >= 0)
     101            if (!fNotified || (notify && notify->Notify()))
     102                rc = fTree->GetEntry(fReadEntry, getall);
     103
     104        SetNotify(notify);
     105
     106        return rc;
     107    }
    78108};
    79109
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r1283 r1332  
    228228
    229229    MTask *task=NULL;
    230 
    231230    //
    232231    // loop over all tasks for preproccesing
     
    237236
    238237        if (!task->ReInit(pList?pList:fParList))
     238        {
     239            *fLog << err << "ERROR - ReInit if Task " << task->GetDescriptor() << " failed." << endl;
    239240            return kFALSE;
     241        }
    240242    }
    241243
Note: See TracChangeset for help on using the changeset viewer.