Dear rooters, I would like to create a TMapFile and a TFile in the same application, but it doesn't seem to work. This program reproduces the problem : #include "TROOT.h" #include "TMapFile.h" #include "TFile.h" #include "TH1.h" int main(){ TROOT simple("simple","Example of creation of a tree"); TFile *file=new TFile("nt.root","recreate"); TMapFile *mfile = TMapFile::Create("monitor.map","RECREATE", 100000, "memory mapped file for monitoring"); TH1F h("h","h",1,0,1); mfile->Update(); file->cd(); h.Write(); file->Close(); return 0; } When I execute it, I get this error message : Error in <TMapFile::Close>: shadow map == 0, should never happen ! I guess that as TMapFile doesn't inherit from TDirectory, you cannot expect it to work as a TFile. But is there a solution except not using TFile at all when having a TMapFile ? Cheers, Colin PS : I use root 2.24/05 on RH6.1 egcs 1.1.2.
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET