Scope and TMapFile

From: Greg Veramendi (mendi@cdfsga.fnal.gov)
Date: Wed Jul 14 1999 - 20:54:45 MEST


Hello All,
	I'm trying to write a program that uses the TMapFile class. I 
need to be able to add some objects to the TMapFile and not others. I
discovered that the Add command is unecessary when adding objects. For
example:

root [0] TMapFile *mfile;
root [1]   mfile = TMapFile::Create("stuff.map","RECREATE", 30000,"test 
map file");
root [2] mfile->ls()
Object               Class                Size
*** no objects stored in memory mapped file ***
root [3]   TH2F * ghist;
root [4] mfile->ls()
Object               Class                Size
*** no objects stored in memory mapped file ***
root [5]   ghist = new TH2F("Gaussian","This is a gaussian",100,-10,10,100,-10,10);
root [7] mfile->ls()
Object               Class                Size
Gaussian             (null)               0

As you can see the Histogram was added without an explicit mfile->Add().

How do I create a Histogram outside the scope of a TMapFile object once
it has been created?  And is there any way to know what scopes you are in?

thanks,
Greg Veramendi
LBL



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET