RE: Query about subpads

From: Fine, Valeri <fine_at_bnl.gov>
Date: Thu, 19 Jul 2007 13:02:03 -0400


Check the source code:

http://root.cern.ch/root/htmldoc/src/TPad.cxx.html#l0kMaE

Please review the following links:  

http://root.cern.ch/root/htmldoc/TPad.html#TPad:GetListOfPrimitives

http://root.cern.ch/root/htmldoc/src/TObject.cxx.html#F3uorD

See the small example:

void PrintMyPadNames(TPad *pad)
{
  TList *list = pad->GetListOfPrimitives();   TIter next(list);
  TObject *o =0;
  while (o=next())
  {

     if (o->InheritsFrom(TPad::Class()))     {

       cout << " The subpad: " 
            <<  o->GetName() 
            << "  has been found " 
            << endl; 
     }

  }
}

Hope this helps.

Best Regards

                         Valeri Fine


Brookhaven National Laboratory
Upton, NY 11973, USA
Phone: +1 631 344 7806
Fax:     +1 631 344 4206
E-mail: fine_at_bnl.gov
-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Marc de Kamps Sent: Thursday, July 19, 2007 8:55 AM
To: roottalk_at_pcroot.cern.ch
Subject: [ROOT] Query about subpads

Hi,

Can I query a TPad about its subpads? If I have Divided it, for example, can I find out that it was Divided and how?

Thanks,
Marc Received on Thu Jul 19 2007 - 19:02:18 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 19 2007 - 23:50:01 CEST