Hello,
I think you can do
void MyTTree::Print() {
cout << " Printing the Tree content..." << endl;
TTree::Print();
}
> How can I do it. Or... in which part of the User Guide I can read it?
It is not ROOT feature it is C++ property.
----
Best regards
Valeri
-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch] On Behalf Of Jose Caballero
Sent: Thursday, October 02, 2003 12:48 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] To inherit a Class
Hello:
I would like to create a class named MyTTree
class MyTTree : public TTree {
...
}
and I would like to override the Print() method.
For example, if I have a object
MyTTree *T
I want, if I issue
T->Print()
show a text line in the screen ("followed
by the standard output of the TTree::Print() method.
How can I do it. Or... in which part of the User Guide I can read it?
Thank you very much in advance for your help.
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET