Changeset 843 for trunk/MagicSoft
- Timestamp:
- 06/12/01 13:08:58 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r752 r843 29 29 30 30 #pragma link C++ class MReadTree; 31 #pragma link C++ class MWriteAsciiFile; 31 32 32 33 #pragma link C++ class MArray; -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r752 r843 54 54 55 55 #include "MLog.h" 56 #include "MLogManip.h" 57 56 58 #include "MParList.h" 57 59 #include "MTaskList.h" … … 87 89 if (!fParList) 88 90 { 89 *fLog << "MEvtLoop::Eventloop - Error:Parlist not initialized." << endl;91 *fLog << dbginf << "Parlist not initialized." << endl; 90 92 return kFALSE; 91 93 } … … 98 100 if (!fTaskList) 99 101 { 100 *fLog << "MEvtLoop::Eventloop - Error:Cannot find tasklist '" << tlist << "' in parameter list." << endl;102 *fLog << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl; 101 103 return kFALSE; 102 104 } -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r752 r843 53 53 *fName = *(named.fName); 54 54 *fTitle = *(named.fTitle); 55 56 fLog = named.fLog; 57 58 fHasChanged = named.fHasChanged; 55 59 } 56 60 … … 65 69 *fName = *(rhs.fName); 66 70 *fTitle = *(rhs.fTitle); 71 fLog = rhs.fLog; 72 fHasChanged = rhs.fHasChanged; 67 73 } 68 74 return *this; … … 89 95 *(((MParContainer&)obj).fName) = *fName; 90 96 *(((MParContainer&)obj).fTitle) = *fTitle; 97 ((MParContainer&)obj).fLog = fLog; 98 ((MParContainer&)obj).fHasChanged = fHasChanged; 91 99 } 92 100 -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r609 r843 35 35 36 36 protected: 37 MLog *fLog; //! The general log facility for this object, initialized with the global object37 MLog *fLog; //! The general log facility for this object, initialized with the global object 38 38 39 TString *fName; //! parameter container identifier (name) 40 TString *fTitle; //! parameter container title 39 TString *fName; //! parameter container identifier (name) 40 TString *fTitle; //! parameter container title 41 42 Bool_t fHasChanged; //! should be set to true if the contents of the container is changed somehow 41 43 42 44 public: 43 MParContainer(const char *name="", const char *title="") : fLog(&gLog) { Init(name, title); }44 MParContainer(const TString &name, const TString &title) : fLog(&gLog) { Init(name, title); }45 MParContainer(const char *name="", const char *title="") : fLog(&gLog), fHasChanged(kFALSE) { Init(name, title); } 46 MParContainer(const TString &name, const TString &title) : fLog(&gLog), fHasChanged(kFALSE) { Init(name, title); } 45 47 MParContainer(const MParContainer &named); 46 48 MParContainer& operator=(const MParContainer& rhs); … … 65 67 virtual Int_t Sizeof() const; 66 68 69 virtual void Reset() {}; 70 71 virtual Bool_t HasChanged() { return fHasChanged; } 72 virtual void SetHasChanged(Bool_t flag=kTRUE) { fHasChanged=flag; } 73 67 74 virtual void AsciiRead(ifstream &fin) {}; 68 75 virtual void AsciiWrite(ofstream &fout) const {}; -
trunk/MagicSoft/Mars/mbase/MParList.cc
r754 r843 251 251 void MParList::Print(Option_t *t) 252 252 { 253 *fLog << dbginf << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl; 254 *fLog << endl; 255 256 } 257 253 *fLog << dbginf << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl; 254 *fLog << endl; 255 } 256 257 // -------------------------------------------------------------------------- 258 // 259 // Sets the flags off all containers in the list (and the list 260 // itself) to unchanged 261 // 262 void MParList::SetHasChanged(Bool_t flag) 263 { 264 TIter Next(&fContainer); 265 266 MParContainer *cont=NULL; 267 268 // 269 // loop over all tasks for preproccesing 270 // 271 while ( (cont=(MParContainer*)Next()) ) 272 cont->SetHasChanged(flag); 273 274 MParContainer::SetHasChanged(flag); 275 } 276 277 void MParList::Reset() 278 { 279 return; 280 TIter Next(&fContainer); 281 282 MParContainer *cont=NULL; 283 284 // 285 // loop over all tasks for preproccesing 286 // 287 while ( (cont=(MParContainer*)Next()) ) 288 cont->Reset(); 289 } -
trunk/MagicSoft/Mars/mbase/MParList.h
r749 r843 44 44 MParContainer *FindCreateObj(const char *classname, const char *objname=NULL); 45 45 46 void Reset(); 47 void SetHasChanged(Bool_t flag=kTRUE); 48 46 49 void Print(Option_t *t = NULL); 47 50 -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r752 r843 135 135 *fLog << "Preprocessing... " << flush; 136 136 137 fParList = pList; 138 137 139 // 138 140 // create the Iterator over the tasklist … … 149 151 *fLog << task->GetName() << "... " << flush; 150 152 151 if (!task->PreProcess( pList))153 if (!task->PreProcess(fParList)) 152 154 return kFALSE; 153 155 } … … 164 166 Bool_t MTaskList::Process() 165 167 { 168 // 169 // Reset the HasChanged flag. 170 // Reset all containers. 171 // 172 fParList->SetHasChanged(kFALSE); 173 fParList->Reset(); 174 166 175 // 167 176 // create the Iterator for the TaskList … … 218 227 *fLog << "Postprocessing... " << flush; 219 228 229 // FIXME: At the moment all containers are post processed independ of 230 // whether it was preprocessed or not. 231 220 232 // 221 233 // create the Iterator for the TaskList -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r698 r843 25 25 private: 26 26 TOrdCollection fTasks; // Container for the ordered list of different tasks 27 MParList *fParList; 27 28 28 29 public:
Note:
See TracChangeset
for help on using the changeset viewer.