Changeset 2552
- Timestamp:
- 11/21/03 18:14:30 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MParList.cc
r2214 r2552 472 472 // 473 473 TClass *cls = gROOT->GetClass(cname); 474 Int_t rc = 0; 474 475 if (!cls) 475 { 476 // 477 // if class is not existing in the root environment 478 // 479 *fLog << err << dbginf << "Class '" << cname << "' not existing in dictionary." << endl; 480 return NULL; 476 rc =1; 477 else 478 { 479 if (!cls->Property()) 480 rc = 5; 481 if (!cls->Size()) 482 rc = 4; 483 if (!cls->IsLoaded()) 484 rc = 3; 485 if (!cls->HasDefaultConstructor()) 486 rc = 2; 487 } 488 489 if (rc) 490 { 491 *fLog << err << dbginf << "Cannot create new instance of class '" << cname << "': "; 492 switch (rc) 493 { 494 case 1: 495 *fLog << "gROOT->GetClass(\"" << cname << "\" returned NULL." << endl; 496 return NULL; 497 case 2: 498 *fLog << "no default constructor." << endl; 499 return NULL; 500 case 3: 501 *fLog << "not loaded." << endl; 502 return NULL; 503 case 4: 504 *fLog << "zero size." << endl; 505 return NULL; 506 case 5: 507 *fLog << "no property." << endl; 508 return NULL; 509 } 481 510 } 482 511 … … 487 516 if (!pcont) 488 517 { 489 *fLog << err << dbginf << "Cannot create new instance of class '" << cname << "' Possible reasons:" << endl;490 518 *fLog << " - Class has no default constructor." << endl; 491 519 *fLog << " - An abstract member functions of a base class is not overwritten." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.