[ROOT] "context" action on a Folder

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Fri Jul 06 2001 - 11:20:46 MEST


Hi,
I have created a folder (with a lot of histograms) :
	TFolder *f = (TFolder *)gROOT->GetRootFolder()->AddFolder("F", F");
	gROOT->GetListOfBrowsables()->Add(f, "F");
	f->SetOwner(kTRUE);
Then, after these histograms are filled I can do :
	new TBrowser();
and look at particular histograms.
What I would like to have is that when I press the right mouse button in
the "menu" there is a small "save" field which asks for the "filename" and
then saves all histograms (the whole folder) to the specified file.
On principle the function that saves all these histograms would be :
	void save(char *filename) {
	TFile *outfile = new TFile(filename, "RECREATE");
	f->Write();
	delete outfile; }
How can I "glue" such simple function to the folder ?
Thanks in advance,
Jacek.
P.S. I have asked a similar question yesterday (about "gluing" simple
     functions to histograms), and there was no reply. Should I assume
     that this is not possible at all ? Jacek.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET