Changeset 9025 for trunk/MagicSoft/Mars/mbase/MParList.cc
- Timestamp:
- 07/21/08 09:11:21 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MParList.cc
r8744 r9025 130 130 131 131 TIter Next(fContainer); 132 TObject *o ;132 TObject *o=0; 133 133 while ((o=Next())) 134 134 if (o->TestBit(kCanDelete)) … … 136 136 137 137 // FIXME? If fContainer is owner do we have to remove the object 138 // from fAutodelete due to the acces when checking for a138 // from fAutodelete due to the access when checking for a 139 139 // garbage collection? 140 141 140 delete fContainer; 142 141 delete fAutodelete; … … 572 571 // try to get class from root environment 573 572 // 574 TClass *cls = gROOT->GetClass(cname);575 Int_t rc = 0;573 *fLog << err; 574 TClass *cls = GetClass(cname, fLog); 576 575 if (!cls) 577 rc =1; 578 else 579 { 580 if (!cls->Property()) 581 rc = 5; 582 if (!cls->Size()) 583 rc = 4; 584 if (!cls->IsLoaded()) 585 rc = 3; 586 if (!cls->HasDefaultConstructor()) 587 rc = 2; 588 } 589 590 if (rc) 591 { 592 *fLog << err << dbginf << "Cannot create new instance of class '" << cname << "': "; 593 switch (rc) 594 { 595 case 1: 596 *fLog << "gROOT->GetClass() returned NULL." << endl; 597 return NULL; 598 case 2: 599 *fLog << "no default constructor." << endl; 600 return NULL; 601 case 3: 602 *fLog << "not loaded." << endl; 603 return NULL; 604 case 4: 605 *fLog << "zero size." << endl; 606 return NULL; 607 case 5: 608 *fLog << "no property." << endl; 609 return NULL; 610 } 611 } 576 return NULL; 612 577 613 578 if (!cls->InheritsFrom(MParContainer::Class())) … … 811 776 // try to get class from root environment 812 777 // 813 TClass *cls = gROOT->GetClass(cname);778 TClass *cls = GetClass(cname); 814 779 if (!cls) 815 { 816 // 817 // if class is not existing in the root environment 818 // 819 gLog << dbginf << "Class '" << cname << "' not existing in dictionary." << endl; 780 return list; 781 782 if (!cls->InheritsFrom(MParContainer::Class())) 783 { 784 *fLog << err << dbginf << "Cannot create new instance of class '" << cname << "': " << endl; 785 *fLog << "Class doesn't inherit from MParContainer." << endl; 820 786 return list; 821 787 }
Note:
See TracChangeset
for help on using the changeset viewer.