Default color of the mesh lines when a TF2 is ploted in ROOT 5.34.21
2014-10-31 14:13:55 GMT
Hi all, When I plot a TF2 function under ROOT 5.34.21 with the "surf" option the mesh lines are drawn in red color. For example here: TCanvas *c2 = new TCanvas("c2","c2",0,0,600,400); TF2 *f2 = new TF2("f2","0.1+(1-(x-2)*(x-2))*(1-(y-2)*(y-2))",1,3,1,3); f2->Draw("surf"); I have no ROOT configuration file, and I was under the impression that the default color for the mesh lines was black. Has been changed by default? Any setting for the ROOT file to set it back to normal black. Thanks! Stelios.
Re: Error R__unzip_header in HADDed rootfiles
2014-10-30 16:50:10 GMT
Hi Elena, this sounds like there many be a problem when closing the file. Perhaps you could send the script you use to hadd everything together.Alternatively, the hadd application is now provided as a compiled program with root. You could try using this:hadd outputfile.root inputfiles.rootthe input files can be a list or it also takes wildcards so you can easily list all files you’d like to add.This process has worked quite well for me in the past.Cheers, Paul--
Dr P J Davies, Nuclear Physics Group, Department of Physics,University of York, Heslington, York, Tel: +44 (0)1904 432245.
On 29 October 2014 at 11:25:18, Elena Graverini (elena.graverini <at> cern.ch) wrote:Dear experts,often I need to hadd together bunches of few hundreds ROOT files containing histograms. All those files were generated from LCG jobs. The jobs were executed at different locations on the LCG grid, but with the same version of the LHCb software (that should provide a defined version of ROOT).I use the following protection when I loop over all the input rootfiles:f = r.TFile(filePath, 'read')
if f:if not f.IsZombie():#hadd file...This saves me from a lot of possible errors. In addition, I always try to make sure that the same version of ROOT is used during the production and the HADDing of those rootfiles, by setting up the same LHCb software version before each operation.However, sometimes the whole process results in:root  TBrowser troot  Error R__unzip_header: error in headerError R__unzip_header: error in headerwhen I open the merged rootfile and try to browse its histograms. This happens even when the hadding process doesn't produce any error/warning.I tried to recover the merged file with
root  _file0->Recover()Info in <TFile::Recover>: STTrackMonitor-2012-MagDown.root, recovered key TDirectoryFile:DaVinciInitAlg.DaVinciMemory at address 460Info in <TFile::Recover>: STTrackMonitor-2012-MagDown.root, recovered key TDirectoryFile:ChargedParticlesToTracks at address 11225Info in <TFile::Recover>: STTrackMonitor-2012-MagDown.root, recovered key TDirectoryFile:Track at address 12306(Int_t)3But this only turns the preceding error intoroot  R__unzip: error -3 in inflate (zlib)R__unzip: error -3 in inflate (zlib)when I try to open the desired histograms.Is it possible that a rootfile that passes the IsZombie() check is still corrupted in some way? How can I overcome this problem? How can I skip further "bad" input files?I can't see any other option, at the moment, other that regenerating all the 900 input files on the grid and hoping for better luck, but this can't be the only way to get a working merged rootfile...Can you suggest me something?Thanks in advance for your help.
2014-10-29 15:30:59 GMT
Root 5.34 spec file does not work on Centos 6 for me
2014-10-29 12:01:40 GMT
I tried to compile Rott 5.34.21 on Centos 6 (should be equivalent to Redhat 6 and Scientific Linux 6, up to date as of today, actual release 6.5) using the provided .spec file, and I have got this error:
> tar xvzf ../../SOURCES/root_v5.34.21.source.tar.gz
> cd root/
> ./configure linux
> make redhat
> cp root.spec ../../../SPECS/
> cd ../../../SPECS/
> rpmbuild -ba root.spec
+ ./configure --enable-cintex --disable-clarens --enable-explicitlink --enable-gdml --enable-gsl-shared --disable-fftw3 --enable-ldap --disable-qt --disable-qtgsi --enable-mathcore --enable-mathmore --enable-minuit2 --enable-mysql --disable-peac --enable-pgsql --enable-odbc --enable-reflex --enable-roofit --enable-ruby --enable-shadowpw --enable-shared --enable-soversion --enable-table --disable-rpath --disable-afs --disable-srp --enable-builtin-ftgl --disable-builtin-freetype --disable-builtin-pcre --disable-builtin-zlib --disable-alien --disable-chirp --disable-dcache --disable-g4root --disable-gfal --disable-globus --disable-monalisa --disable-oracle --disable-pythia6 --disable-rfio --fail-on-missing --enable-unuran --enable-xrootd --disable-sapdb --enable-cern --prefix=/usr --libdir=/usr/lib/root/5.34 --mandir=/usr/share/man/man1 --docdir=/usr/share/doc/root-5.34.21 --cintincdir=/usr/lib/root/5.34 --etcdir=/etc/root --with-sys-iconpath=/usr/share/pixmaps
Checking for source directory ... /home/lusiani/local/src/RPM/BUILD/root
Configuring for linux
INFO: --enable-cintex: already enabled by default.
Invalid option '--disable-clarens'. Try ./configure --help
error: Bad exit status from /var/tmp/rpm-tmp.WRDi8z (%build)
This is just to let you know that this documented way of building Root fails.
I have worked out a working .spec file, for installing Root versions in a dedicated directory in /opt, the related .nosrc file is here:
Error R__unzip_header in HADDed rootfiles
2014-10-29 11:24:26 GMT
Random number following Landau distribution
2014-10-25 15:29:54 GMT
Good afternoon, I want to produce a random number following the Landau distribution with the the prerequisite that the nr does not exceed a predifined cut value. my idea so far is to produce the landau distribution and apply a cut at the value of interest. Is this way correct or I could do it also another way round? Thanks, E.Chaniotakis
Question about win64gcc
2014-10-24 16:52:07 GMT
Department of Physics
TH2 zoom differences (ROOT 5.32 vs 5.34) in command draw
2014-10-24 13:15:43 GMT
Hi I have a strange 2D histo drawing behavior in ROOT 5.34/09 (v5-34-09 <at> v5-34-09, Jun 26 2013, 17:10:36 on linux) compared to ROOT 5.32/00 (tags/v5-32-00 <at> 42375, Dec 02 2011, 12:42:25 on linux) The code: TH2F *h2 = new TH2F("h2","h2",10,-1,1,10,-1,1); h2->FillRandom("gaus",100000) h2->Draw("colz") When I zoom-in near the first bin in 5.32 the X axis stops at -1 (top drawing in the attachment) When I zoom-in in version 5.34 it shows a white bin (bottom drawing) and it looks as if the histogram has been booked and filled differently, which is misleading Is this behavior (5.34) something I can avoid?
Reading different branches using MakeSelector
2014-10-23 23:26:58 GMT
Hello, I have a root file which consists of a single tree ("T") and four different branches. I am using the utility 'T->MakeSelector("MyClass")' to read the input file. I am able to read one branch correctly which can be judged from the amount of data read by PROOFlite (~ 37 MB). Size of each branch is around 37 MB. The amount of data read from proofserve daemon for two branches is same as when I read one branch. It means the analysis code is not reading two branches separately. My analysis code can be found in the folder /afs/cern.ch/user/j/jha/public/CMS/Proof/SameBranches Number of read branches can be controlled using the variable 'icase' (line number 41: MyClass.C) How to run the code: """ cp -r /afs/cern.ch/user/j/jha/public/CMS/Proof/SameBranches /tmp cd /tmp/SameBranches #Setup root source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.18/x86_64-slc6-gcc48-dbg/root/bin/thisroot.sh source /afs/cern.ch/sw/lcg/external/gcc/4.8/x86_64-slc6-gcc48-opt/setup.sh root -b .x Analysic.C """ Thanks, Manoj -- -- ------------------------------------------------------------------ Manoj Kumar Jha Department of Physics jha2 <at> purdue.edu Purdue University (765) 494-5987 W. Lafayette, IN 47907-2036, USA -------------------------------------------------------------------