{ TMapFile::SetMapAddress(0x4125c000); TMapFile* mfile = TMapFile::Create("hsimple.map","RECREATE", 100000, "Demo memory mapped file with histograms"); TH1F* hpx = new TH1F("hpx","This is the px distribution",100,-4,4); hpx->SetFillColor(48); mfile->Print(); Float_t px, py, pz; int ii = 0; while (1) { gRandom->Rannor(px,py); hpx->Fill(px); if (!(ii % 10)) { mfile->Update(); // updates all objects in shared memory if (!ii) mfile->ls(); // print contents of mapped file after } // first update ii++; gSystem->Sleep(100); } }