Ignore:
Timestamp:
07/21/08 09:11:21 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r8744 r9025  
    130130
    131131    TIter Next(fContainer);
    132     TObject *o;
     132    TObject *o=0;
    133133    while ((o=Next()))
    134134        if (o->TestBit(kCanDelete))
     
    136136
    137137    // FIXME? If fContainer is owner do we have to remove the object
    138     //   from fAutodelete due to the acces when checking for a
     138    //   from fAutodelete due to the access when checking for a
    139139    //   garbage collection?
    140 
    141140    delete fContainer;
    142141    delete fAutodelete;
     
    572571    // try to get class from root environment
    573572    //
    574     TClass *cls = gROOT->GetClass(cname);
    575     Int_t rc = 0;
     573    *fLog << err;
     574    TClass *cls = GetClass(cname, fLog);
    576575    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;
    612577
    613578    if (!cls->InheritsFrom(MParContainer::Class()))
     
    811776    // try to get class from root environment
    812777    //
    813     TClass *cls = gROOT->GetClass(cname);
     778    TClass *cls = GetClass(cname);
    814779    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;
    820786        return list;
    821787    }
Note: See TracChangeset for help on using the changeset viewer.