Changeset 2529 for trunk/MagicSoft/Mars/mreport
- Timestamp:
- 11/19/03 00:03:53 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mreport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreport/MReport.cc
r2523 r2529 33 33 34 34 #include "MTime.h" 35 #include "MParList.h" 35 36 36 37 ClassImp(MReport); … … 82 83 return kTRUE; 83 84 } 85 86 MTime *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 7 7 8 8 class MTime; 9 class MParList; 9 10 10 11 class MReport : public MParContainer … … 14 15 15 16 Byte_t fState; 16 MTime *fTime; 17 MTime *fTime; //! 17 18 18 19 ULong_t Hash() const { return fIdentifier.Hash(); } … … 39 40 void SetTime(MTime *t) { fTime = t; } 40 41 41 static Bool_t ReadAngle(TString &str, Double_t &ret);42 MTime *FindTime(MParList &plist); 42 43 43 ClassDef(MReport, 0) // Base class for control reports44 ClassDef(MReport, 1) // Base class for control reports 44 45 }; 45 46 -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2523 r2529 60 60 ULong_t Hash() const { return fReport->GetIdentifier().Hash(); } 61 61 MReport *GetReport() { return fReport; } 62 void SetTime(MTime *t) { fReport->SetTime(t); }62 //void SetTime(MTime *t) { fReport->SetTime(t); } 63 63 Bool_t Interprete(TString &str) 64 64 { … … 69 69 return kTRUE; 70 70 } 71 void SetTime(MParList &plist) { fReport->FindTime(plist); } 72 void AddToList(MParList &plist) { plist.AddToList(fReport); } 71 73 }; 72 74 … … 178 180 Int_t MReportFileRead::PreProcess(MParList *pList) 179 181 { 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); 185 188 186 189 // … … 249 252 fIn->close(); 250 253 254 if (!GetNumExecutions()) 255 return kTRUE; 256 251 257 *fLog << inf << endl; 252 258 *fLog << GetDescriptor() << " statistics:" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.