Changeset 5692 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 01/03/05 12:02:16 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MLog.cc
r5551 r5692 18 18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 116 116 using namespace std; 117 117 118 #undef DEBUG 119 //#define DEBUG 120 121 118 122 // root 3.02: 119 123 // check for TObjectWarning, TObject::Info, gErrorIgnoreLevel … … 216 220 DeallocateFile(); 217 221 222 #ifdef DEBUG 223 TIter Next(fPlugins); 224 TObject *o=0; 225 while ((o=Next())) 226 { 227 cout << "Delete: " << o->GetName() << std::flush; 228 cout << " [" << o->ClassName() << "]" << endl; 229 delete o; 230 } 231 232 cout << "Delete: fPlugins " << fPlugins << "..." << std::flush; 233 #endif 234 218 235 delete fPlugins; 236 #ifdef DEBUG 237 cout << "done." << endl; 238 #endif 239 219 240 #ifdef _REENTRANT 220 241 delete fMuxStream; -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r5557 r5692 18 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 109 109 { 110 110 #ifdef DEBUG 111 if (fName.IsNull() || fName==(TString)"MTime") 112 return; 113 111 114 *fLog << all << "Deleting " << GetDescriptor() << endl; 115 if (TestBit(kMustCleanup) && gROOT && gROOT->MustClean()) 116 { 117 *fLog << "Recursive Remove..." << flush; 118 if (TestBit(kCanDelete)) 119 *fLog << "kCanDelete..." << flush; 120 TIter Next(gROOT->GetListOfCleanups()); 121 TObject *o=0; 122 while ((o=Next())) 123 *fLog << dbg << o->GetName() << " [" << o->ClassName() << "]" << endl; 124 *fLog << dbg << "Removing..." << flush; 125 gROOT->GetListOfCleanups()->RecursiveRemove(this); 126 *fLog << "Removed." << endl; 127 } 112 128 #endif 113 129 } -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r5030 r5692 879 879 880 880 } 881 882 // -------------------------------------------------------------------------- 883 // 884 // Find an object with the same name in the list and replace it with 885 // the new one. If the kIsOwner flag is set and the object was not 886 // created automatically, the object is deleted. 887 // 888 Bool_t MTaskList::Replace(MTask *task) 889 { 890 // 891 // check if the object (you want to add) exists 892 // 893 if (!task) 894 return kFALSE; 895 896 if (task==this) 897 { 898 *fLog << warn << "WARNING - You cannot add a tasklist to itself. This" << endl; 899 *fLog << " would create infinite recursions...ignored." << endl; 900 return kFALSE; 901 902 } 903 904 MTask *obj = (MTask*)FindObject(task->GetName()); 905 if (!obj) 906 { 907 *fLog << warn << "No object with the same name '"; 908 *fLog << task->GetName() << "' in list... adding." << endl; 909 return AddToList(task); 910 } 911 912 if (task==obj) 913 return kTRUE; 914 915 *fLog << inf << "Adding " << task->GetName() << " to " << GetName() << " for " << obj->GetStreamId() << "... " << flush; 916 task->SetStreamId(obj->GetStreamId()); 917 task->SetBit(kMustCleanup); 918 fTasks->AddAfter((TObject*)obj, task); 919 *fLog << "Done." << endl; 920 921 RemoveFromList(obj); 922 923 if (TestBit(kIsOwner)) 924 delete obj; 925 926 //*fLog << inf << "MTask '" << task->GetName() << "' found and replaced..." << endl; 927 928 return kTRUE; 929 } -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r4828 r5692 49 49 void SetSerialNumber(Byte_t num); 50 50 51 Bool_t Replace(MTask *obj); 51 52 Bool_t RemoveFromList(MTask *task); 52 53
Note:
See TracChangeset
for help on using the changeset viewer.