On Wed, 26 Jul 2000, Colin Bernet wrote:
Hi Colin,
add mfile->Close() as indicated and it should work,
Cheers
Otto
> 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();
mfile->Close(); // <<<<<<<<<<<<<<<<<< add this
>
> return 0;
> }
>
>
Dr. Otto Schaile Sektion Physik, LMU Muenchen
Phone: +49 89 289 14070 Am Coulombwall 1, D-85748 Garching, Germany
GSM: +49 171 4312031
FAX: +49 89 289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET