Ignore:
Timestamp:
11/19/03 00:03:53 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreport/MReport.cc

    r2523 r2529  
    3333
    3434#include "MTime.h"
     35#include "MParList.h"
    3536
    3637ClassImp(MReport);
     
    8283    return kTRUE;
    8384}
     85
     86MTime *MReport::FindTime(MParList &plist)
     87{
     88    fTime = NULL;
     89
     90    TString id(ClassName());
     91    if (!id.BeginsWith("MReport"))
     92    {
     93        *fLog << warn << " WARNING - Class name '" << id << "' ";
     94        *fLog << " doesn't begin with 'MReport'... no MTime assigned." << endl;
     95        return NULL;
     96    }
     97
     98    id.Remove(0, 7);
     99    if (id.IsNull())
     100    {
     101        *fLog << warn << " WARNING - No postfix existing... no MTime assigned." << endl;
     102        return NULL;
     103    }
     104
     105    id.Prepend("MTime");
     106
     107    fTime = (MTime*)plist.FindCreateObj("MTime", id);
     108    return fTime;
     109}
  • trunk/MagicSoft/Mars/mreport/MReport.h

    r2520 r2529  
    77
    88class MTime;
     9class MParList;
    910
    1011class MReport : public MParContainer
     
    1415
    1516    Byte_t  fState;
    16     MTime  *fTime;
     17    MTime  *fTime;             //!
    1718
    1819    ULong_t Hash() const { return fIdentifier.Hash(); }
     
    3940    void SetTime(MTime *t) { fTime = t; }
    4041
    41     static Bool_t ReadAngle(TString &str, Double_t &ret);
     42    MTime *FindTime(MParList &plist);
    4243
    43     ClassDef(MReport, 0) // Base class for control reports
     44    ClassDef(MReport, 1) // Base class for control reports
    4445};
    4546
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.cc

    r2523 r2529  
    6060    ULong_t Hash() const { return fReport->GetIdentifier().Hash(); }
    6161    MReport *GetReport() { return fReport; }
    62     void SetTime(MTime *t) { fReport->SetTime(t); }
     62    //void SetTime(MTime *t) { fReport->SetTime(t); }
    6363    Bool_t Interprete(TString &str)
    6464    {
     
    6969        return kTRUE;
    7070    }
     71    void SetTime(MParList &plist) { fReport->FindTime(plist); }
     72    void AddToList(MParList &plist) { plist.AddToList(fReport); }
    7173};
    7274
     
    178180Int_t MReportFileRead::PreProcess(MParList *pList)
    179181{
    180     MTime *time = (MTime*)pList->FindCreateObj("MTime");
    181     if (!time)
    182         return kFALSE;
    183 
    184     fList->ForEach(MReportHelp, SetTime)(time);
     182    //MTime *time = (MTime*)pList->FindCreateObj("MTime");
     183    //if (!time)
     184    //    return kFALSE;
     185
     186    fList->ForEach(MReportHelp, SetTime)(*pList);
     187    fList->ForEach(MReportHelp, AddToList)(*pList);
    185188
    186189    //
     
    249252    fIn->close();
    250253
     254    if (!GetNumExecutions())
     255        return kTRUE;
     256
    251257    *fLog << inf << endl;
    252258    *fLog << GetDescriptor() << " statistics:" << endl;
Note: See TracChangeset for help on using the changeset viewer.