Changeset 855 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/05/01 13:23:12 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r851 r855 51 51 MParContainer::MParContainer(const MParContainer &named) 52 52 { 53 *fName = *(named.fName);53 *fName = *(named.fName); 54 54 *fTitle = *(named.fTitle); 55 55 56 56 fLog = named.fLog; 57 57 58 f HasChanged = named.fHasChanged;58 fReadyToSave = named.fReadyToSave; 59 59 } 60 60 … … 73 73 *fTitle = *(rhs.fTitle); 74 74 75 fLog = rhs.fLog;76 f HasChanged = rhs.fHasChanged;75 fLog = rhs.fLog; 76 fReadyToSave = rhs.fReadyToSave; 77 77 78 78 return *this; … … 103 103 *cont.fTitle = *fTitle; 104 104 105 cont.fLog = fLog;106 cont.f HasChanged = fHasChanged;105 cont.fLog = fLog; 106 cont.fReadyToSave = fReadyToSave; 107 107 } 108 108 -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r848 r855 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 title39 TString *fName; //! parameter container identifier (name) 40 TString *fTitle; //! parameter container title 41 41 42 Bool_t f HasChanged; //! should be set to true if the contents of the container is changed somehow42 Bool_t fReadyToSave; //! should be set to true if the contents of the container is changed somehow 43 43 44 44 public: 45 MParContainer(const char *name="", const char *title="") : fLog(&gLog), f HasChanged(kFALSE) { Init(name, title); }46 MParContainer(const TString &name, const TString &title) : fLog(&gLog), f HasChanged(kFALSE) { Init(name, title); }45 MParContainer(const char *name="", const char *title="") : fLog(&gLog), fReadyToSave(kFALSE) { Init(name, title); } 46 MParContainer(const TString &name, const TString &title) : fLog(&gLog), fReadyToSave(kFALSE) { Init(name, title); } 47 47 MParContainer(const MParContainer &named); 48 48 MParContainer& operator=(const MParContainer& rhs); … … 69 69 virtual void Reset() {}; 70 70 71 virtual Bool_t HasChanged() { return fHasChanged; }72 virtual void Set HasChanged(Bool_t flag=kTRUE) { fHasChanged=flag; }71 virtual Bool_t IsReadyToSave() { return fReadyToSave; } 72 virtual void SetReadyToSave(Bool_t flag=kTRUE) { fReadyToSave=flag; } 73 73 74 74 virtual void AsciiRead(ifstream &fin); -
trunk/MagicSoft/Mars/mbase/MParList.cc
r852 r855 265 265 // itself) to unchanged 266 266 // 267 void MParList::Set HasChanged(Bool_t flag)267 void MParList::SetReadyToSave(Bool_t flag) 268 268 { 269 269 TIter Next(&fContainer); … … 275 275 // 276 276 while ( (cont=(MParContainer*)Next()) ) 277 cont->Set HasChanged(flag);278 279 MParContainer::Set HasChanged(flag);277 cont->SetReadyToSave(flag); 278 279 MParContainer::SetReadyToSave(flag); 280 280 } 281 281 -
trunk/MagicSoft/Mars/mbase/MParList.h
r843 r855 45 45 46 46 void Reset(); 47 void Set HasChanged(Bool_t flag=kTRUE);47 void SetReadyToSave(Bool_t flag=kTRUE); 48 48 49 49 void Print(Option_t *t = NULL); -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r768 r855 35 35 // outside. It makes also possible to go back by decreasing the number. // 36 36 // // 37 // If you don't want to start reading the first event you have to call // 38 // MReadTree::SetEventNum after instantiating your MReadTree-object. // 39 // // 37 40 ///////////////////////////////////////////////////////////////////////////// 38 41 … … 178 181 // the actual branch should be stored - enable branch. 179 182 // 183 // FIXME: is it correct, that the pointer is deleted immediatly afterwards? 180 184 branch->SetAddress(&pcont); 181 185 } … … 190 194 // (Remark: The position can also be set by some member functions 191 195 // If the end of the file is reached the Eventloop is stopped. 196 // 192 197 Bool_t MReadTree::Process() 193 198 { … … 267 272 // this function makes Process() read event number nr next 268 273 // 269 // Remark: You can use this function to set the event number from which270 // you want to start reading.274 // Remark: You can use this function after instatiating you MReadTree-object 275 // to set the event number from which you want to start reading. 271 276 // 272 277 Bool_t MReadTree::SetEventNum(UInt_t nr) -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r851 r855 59 59 MTaskList::MTaskList(MTaskList &ts) 60 60 { 61 fTasks.AddAll(&ts.fTasks); 62 } 63 64 // -------------------------------------------------------------------------- 65 // 66 // create the Iterator over the tasklist 61 fTasks.AddAll(&ts.fTasks); 62 } 63 64 // -------------------------------------------------------------------------- 65 // 66 // Set the logging stream for the all tasks in the list and the tasklist 67 // itself. 67 68 // 68 69 void MTaskList::SetLogStream(MLog *log) 69 70 { 71 // 72 // create the Iterator over the tasklist 73 // 70 74 TIter Next(&fTasks); 71 75 … … 167 171 { 168 172 // 169 // Reset the HasChangedflag.173 // Reset the ReadyToSave flag. 170 174 // Reset all containers. 171 175 // 172 fParList->SetHasChanged(kFALSE); 176 // FIXME: To run a tasklist as a single task in another tasklist we 177 // have to make sure, that the Parameter list isn't reset. 178 // 179 fParList->SetReadyToSave(kFALSE); 173 180 fParList->Reset(); 174 181 … … 231 238 232 239 // 233 // Reset the HasChangedflag.240 // Reset the ReadyToSave flag. 234 241 // Reset all containers. 235 242 // 236 fParList->SetHasChanged(kFALSE); 243 // FIXME: To run a tasklist as a single task in another tasklist we 244 // have to make sure, that the Parameter list isn't reset. 245 // 246 fParList->SetReadyToSave(kFALSE); 237 247 fParList->Reset(); 238 248 -
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
r852 r855 32 32 // This can be the name of the class or a given name, which identifies // 33 33 // the container in a parameter container list (MParList). // 34 // The container is writte to the ascii file if its HasChangedflag is //34 // The container is writte to the ascii file if its ReadyToSave flag is // 35 35 // set (MParContainer) // 36 36 // // … … 102 102 void MWriteAsciiFile::CheckAndWrite() const 103 103 { 104 if (fContainer-> HasChanged())104 if (fContainer->IsReadyToSave()) 105 105 fContainer->AsciiWrite(*fOut); 106 106 } -
trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
r852 r855 322 322 // Check for the Write flag 323 323 // 324 if (!entry->GetContainer()-> HasChanged())324 if (!entry->GetContainer()->IsReadyToSave()) 325 325 continue; 326 326
Note:
See TracChangeset
for help on using the changeset viewer.