Hi all, Probably a stupid question that has been answered many times but I can't seem to find it in roottalk Suppose I have an histogram in a pad, without knowing it's name or having a pointer to it. How can I get a pointer to it ? I tried various things such as : * gPad->GetListOfPrimitives()->FindObject(...) need the name or a pointer to the object, I don't have it * loop on the list of primitives and try to compare with the obj.Class()->Compare(known_histo) but all objects are put in the list as TObjects, so one doesn't know if they are TH1F's or not... All in all, one always needs the name or pointer to the histo. Looping on the list of histograms found in gDirectory is not very handy, especially if one has histograms outside a directory. Well, it should be simple... Cheers Damir -- ===================================================================== | Damir Buskulic | Universite de Savoie/LAPP | | | Chemin de Bellevue, B.P. 110 | | Tel : +33 (0)450091600 | F-74941 Annecy-le-Vieux Cedex | | e-mail: buskulic@lapp.in2p3.fr | FRANCE | ===================================================================== mailto:buskulic@lapp.in2p3.fr
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET