smerf
November 21, 2006, 11:28am
1
I’m trying to implement dynamically updated histogram, I’ve created something like:
TCanvas *c = new TCanvas("blah");
TH1F *h = new TH1F("something","whatever",400,0,4095);
TRandom *r = new TRandom (63545);
h->Draw();
c->Update();
for (Int_t i = 0; i<1000000>Fill(2000*r->BreitWigner(0.2,0.05)+1000);
if (i%100 == 0) {
c->Modified();
c->Update();
}
}
EDIT: fixed copy&paste errors in code…
the problem is, that this example (similar to root.cern.ch/root/html/examples/hsum.C.html ) continuously fills up whole memory. It happens only for ROOT 5.x - memory usage growth is proportional to refresh rate.[/code]
brun
November 21, 2006, 3:56pm
2
I cannot reproduce the problem.
Which precise version are you using? on which system/os/version?
Rene
smerf
November 21, 2006, 8:33pm
3
I’ve just noticed and fixed some weird copy&paste error in previous post (code) - sorry about that.
It is Gentoo Linux on x86
$ g++ --version
g++ (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
$ root-config --version
5.12/00e
$ root-config --features
asimage astiff builtin_afterimage cintex exceptions explicitlink fftw3 mathcore mathmore mysql opengl pch pgsql python qt qtgsi reflex roofit minuit2 shadowpw shared soversion ssl table thread xml xrootd
$ root-config --config
--prefix=/usr --bindir=/usr/bin --mandir=/usr/share/man/man1 --incdir=/usr/include/root --libdir=/usr/lib/root --aclocaldir=/usr/share/aclocal/ --datadir=/usr/share/root --cintincdir=/usr/share/root/cint --fontdir=/usr/share/root/fonts --iconpath=/usr/share/root/icons --macrodir=/usr/share/root/macros --srcdir=/usr/share/root/src --docdir=/usr/share/doc/root-5.12.00e --testdir=/usr/share/doc/root-5.12.00e/test --tutdir=/usr/share/doc/root-5.12.00e/tutorial --elispdir=/usr/share/emacs/site-lisp --etcdir=/etc/root --disable-alien --disable-builtin-afterimage --disable-builtin-freetype --disable-builtin-pcre --disable-builtin-zlib --disable-chirp --disable-dcache --disable-globus --disable-rfio --disable-rpath --disable-sapdb --disable-srp --enable-cintex --enable-exceptions --enable-explicitlink --enable-mathcore --enable-mathmore --enable-minuit2 --enable-reflex --enable-roofit --enable-shared --enable-soversion --enable-table --enable-thread --disable-afs --disable-cern --disable-krb5 --disable-ldap --enable-mysql --disable-odbc --enable-opengl --enable-pgsql --enable-python --enable-qt --enable-qtgsi --disable-ruby --enable-ssl --enable-xml --enable-xrootd
I have tried this on two different machines (both running Gentoo).
Now I’m going to compile older (but still 5.x) version of ROOT and test it.