Re: [ROOT] Using TMapFile in my C++ Program

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu May 02 2002 - 11:46:41 MEST


And also read this:

http://root.cern.ch/lxr/source/base/src/TMapFile.cxx#1065

Cheers, Fons.



On Thu, 2002-05-02 at 11:10, Christian Vogel wrote:
> Hi,
> 
> currently I'm trying to explore root and I'm stuck at a very
> early stage... I'm trying to integrate the shared-memory-examples
> from http://root.cern.ch/Tutorials.html into my C++ code.
> 
> The C++ Code I try to use looks like that:
> 
>   TMapFile *mf = TMapFile::Create("/dev/shm/test.map",
>                                   "RECREATE",100000,"Test mapfile");
>   TH1F *hpx = new TH1F("histo","This is a histo",4096,0,4095);
> 
> When I use a rootn-session with this code, another rootn-session
> can do "mf=TMapFile::Create("/dev/shm/test.map") just fine.
> 
> When I compile a C++ Program with exactly the same code the
> other rootn-session *** BREAK ***'s and segfaults.
> 
> Any hints where I should look or what I have done wrong?
> 
> 	Chris
> 
> 
> -- 
> Is it true that cannibals won't eat clowns because they taste funny?
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:52 MET