Ignore:
Timestamp:
04/18/05 10:17:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

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

    r6932 r6948  
    198198    return FindObjectInCanvas(object, object, 0);
    199199}
     200
     201// --------------------------------------------------------------------------
     202//
     203// Print recursively all objects in this and sub-pads
     204//
     205void MStatusArray::PrintObjectsInPad(const TCollection *list, const TString &name, Int_t lvl) const
     206{
     207    TIter Next(list);
     208    TObject *o=0;
     209    while ((o=Next()))
     210    {
     211        const Bool_t print = name.IsNull() || name==(TString)o->GetName();
     212        if (print)
     213        {
     214            if (lvl>0)
     215                gLog << setw(lvl) << ' ';
     216            gLog << o->ClassName() << ": " << o->GetName() << " <" << Next.GetOption() << "> (" << o << ")" << endl;
     217        }
     218
     219        if (o->InheritsFrom(TVirtualPad::Class()))
     220            PrintObjectsInPad(((TVirtualPad*)o)->GetListOfPrimitives(), print?"":name, lvl+1);
     221    }
     222}
     223
     224// --------------------------------------------------------------------------
     225//
     226// Print recursively all objects in this and sub-pads. If !option.IsNull()
     227// only objects in the corresponding pad are printed.
     228//
     229void MStatusArray::Print(Option_t *option) const
     230{
     231    const TString opt(option);
     232
     233    PrintObjectsInPad(this, opt);
     234}
  • trunk/MagicSoft/Mars/mbase/MStatusArray.h

    r6932 r6948  
    1515{
    1616private:
     17    void     PrintObjectsInPad(const TCollection *list, const TString &name, Int_t lvl=0) const;
    1718    TObject *FindObjectInPad(TVirtualPad *pad, const char *object, TClass *base) const;
    1819    TClass  *GetClass(const char *name) const;
     
    2829    TObject *FindObjectInCanvas(const char *object, const char *canvas) const;
    2930
     31    void Print(Option_t *o="") const;
     32
    3033    TObject *FindObject(const char *object, const char *base) const;
    3134    TObject *FindObject(const char *object) const;
Note: See TracChangeset for help on using the changeset viewer.