Changeset 1116 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 12/17/01 10:20:08 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r1076 r1116 53 53 #pragma link C++ class MTime+; 54 54 55 #pragma link C++ class MHtml+;56 57 58 55 #endif -
trunk/MagicSoft/Mars/mbase/MGList.cc
r1108 r1116 50 50 // objects in the list. 51 51 // 52 #include <TRefCnt.h>53 54 52 MGList::~MGList() 55 53 { … … 91 89 // -fno-rtti, which could be used in 'plain' C++ 92 90 // 91 92 // 93 // FIXME: This should not be necessary but it is, why?? 94 // 95 // TRY: TGPicture *pic = gClient->GetPicture("pic"); 96 // cout << pic->IsA()->DynamicCast(TGWidget::Class(), pic) << endl; 97 // 98 // Is this another bug in root? 99 // 100 if (!obj->IsA()->InheritsFrom(TGWidget::Class())) 101 return NULL; 102 93 103 return (TGWidget*)obj->IsA()->DynamicCast(TGWidget::Class(), obj); 94 104 } … … 137 147 if (IsExisting(obj)) 138 148 { 139 cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl; 149 const Int_t id = GetWidget(obj)->WidgetId(); 150 cout << "Widget with id #" << id << " ("; 151 cout << FindWidget(id)->ClassName() << ") already in list... "; 152 cout << obj->GetName() << " ignored." << endl; 140 153 return; 141 154 } … … 155 168 if (IsExisting(obj)) 156 169 { 157 cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl; 170 Int_t id = GetWidget(obj)->WidgetId(); 171 cout << "Widget with id #" << id << " ("; 172 cout << FindWidget(id)->ClassName() << ") already in list... "; 173 cout << obj->GetName() << " ignored." << endl; 158 174 return; 159 175 } -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r1114 r1116 259 259 260 260 if (fChain->GetBranch(dot+1)) 261 SetBranchStatus(dot+1, kTRUE);261 SetBranchStatus(dot+1, status); 262 262 } 263 263 … … 294 294 // check whether branch choosing must be switched on 295 295 // 296 //EnableBranchChoosing();296 EnableBranchChoosing(); 297 297 298 298 // … … 308 308 309 309 // 310 // Loop over all tasks iand its filters n the task list. 311 // 310 // This loop is not necessary. We could do it like in the commented 311 // loop below. But this loop makes sure, that we don't try to enable 312 // one branch several times. This would not harm, but we would get 313 // an output for each attempt. To have several outputs for one subbranch 314 // may confuse the user, this we don't want. 315 // This loop creates a new list of subbranches and for each branch 316 // which is added we check before whether it already exists or not. 317 // 318 TList list; 319 312 320 MTask *task; 313 321 TIter NextTask(tlist->GetList()); 314 322 while ((task=(MTask*)NextTask())) 315 323 { 324 TObject *obj; 325 326 TIter NextTBranch(task->GetListOfBranches()); 327 while ((obj=NextTBranch())) 328 if (!list.FindObject(obj->GetName())) 329 list.Add(obj); 330 331 const MFilter *filter = task->GetFilter(); 332 333 if (!filter) 334 continue; 335 336 TIter NextFBranch(filter->GetListOfBranches()); 337 while ((obj=NextFBranch())) 338 if (!list.FindObject(obj->GetName())) 339 list.Add(obj); 340 } 341 342 SetBranchStatus(&list, kTRUE); 343 /* 344 // 345 // Loop over all tasks iand its filters n the task list. 346 // 347 MTask *task; 348 TIter NextTask(tlist->GetList()); 349 while ((task=(MTask*)NextTask())) 350 { 316 351 SetBranchStatus(task->GetListOfBranches(), kTRUE); 352 317 353 const MFilter *filter = task->GetFilter(); 318 319 if (filter) 320 SetBranchStatus(filter->GetListOfBranches(), kTRUE); 321 322 } 354 if (!filter) 355 continue; 356 357 SetBranchStatus(filter->GetListOfBranches(), kTRUE); 358 359 } 360 */ 323 361 } 324 362 … … 376 414 *fLog << inf << fNumEntries << " entries found in file(s)." << endl; 377 415 378 *fLog << all << fChain->GetListOfBranches() << endl;379 380 416 // 381 417 // Get all branches of this tree and … … 386 422 387 423 Int_t num=0; 388 389 390 *fLog << "Start..." << endl;391 424 // 392 425 // loop over all tasks for processing … … 399 432 const char *bname = branch->GetName(); 400 433 401 *fLog << all << bname << endl;402 403 434 TString oname(bname); 404 405 435 if (oname.EndsWith(".")) 406 436 oname.Remove(oname.Length()-1); … … 412 442 { 413 443 *fLog << inf << "Master branch " << bname << " has veto... skipped." << endl; 414 DisableSubBranches(branch);415 continue;416 }417 418 MParContainer *obj = pList->FindCreateObj(oname);419 420 if (!obj)421 {422 //423 // if class is not existing in the (root) environment424 // we cannot proceed reading this branch425 //426 *fLog << warn << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;427 444 DisableSubBranches(branch); 428 445 continue; … … 551 568 { 552 569 // 553 // This is necessary due to a bug in TCHain::LoadTree in root. 570 // This is necessary due to a bug in TChain::LoadTree in root. 571 // will be fixed in 3.03 554 572 // 555 573 if (fNumEntry >= fNumEntries) … … 644 662 void MReadTree::VetoBranch(const char *name) 645 663 { 646 TNamed *branch = new TNamed(name, ""); 647 fVetoList->Add(branch); 664 fVetoList->Add(new TNamed(name, "")); 648 665 } 649 666 -
trunk/MagicSoft/Mars/mbase/MTask.cc
r1114 r1116 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 12/2000 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 113 113 void MTask::AddToBranchList(const char *b) 114 114 { 115 TNamed *name = new TNamed(b, ""); 116 fListOfBranches->Add(name); 115 if (fListOfBranches->FindObject(b)) 116 return; 117 118 fListOfBranches->Add(new TNamed(b, "")); 117 119 } 118 120 -
trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
r1108 r1116 48 48 ClassImp(MWriteRootFile); 49 49 50 #define kFillTree BIT(14)51 52 50 // -------------------------------------------------------------------------- 53 51 // … … 315 313 void MWriteRootFile::CheckAndWrite() const 316 314 { 315 const Int_t kFillTree = BIT(14); 316 317 317 TObject *obj; 318 318 -
trunk/MagicSoft/Mars/mbase/Makefile
r1076 r1116 51 51 MArrayS.cc \ 52 52 MTime.cc \ 53 MHtml.cc \54 53 MClone.cc \ 55 54 MPrint.cc \
Note:
See TracChangeset
for help on using the changeset viewer.