Axel Naumann | 1 Jun 2007 14:53
Picon
Picon

Re: [ROOT] use of '#define FOO' in macro

Hi,

sorry for the slow reply! -p invokes the external preprocessor - all
preprocessor macros will already be expanded when CINT sees your code.
It will thus not be able to use it.

Instead, do not use -p, and instead use the following hack. Put in your
Linkdef.h:
extern const bool b1;
#pragma link C++ global b1;

This way, CINT will know that b1 is a variable. And you don't have to
change the CCfits header files.

Cheers, Axel.

OKUMURA, Akira wrote:
> Hello ROOTers,
> 
> '-p' option given to rootcint seems to prevent my code from using global
> macro. I wrote simple test codes which had some '#define' constants and
> compiled them using '-p' option of rootcint. I could not access such
> constants from interpreter but I could do it if I delete '-p'.
> 
> However in my original code which was linked to CCFITS needs '-p'
> because a declaration of bool in its header cannot be handled by CINT
> correctly.
> (see http://root.cern.ch/root/roottalk/roottalk06/1562.html)
> 
> Any suggestion?
(Continue reading)

Axel Naumann | 1 Jun 2007 14:56
Picon
Picon

Re: [ROOT] Problems compiling root 5.15/04 on Solaris 10

Hi Francesco,

sorry for the late replay; seems like you didn't get an answer after
all? Could you send me the output of gmake install SHELL="/bin/sh -x"?
It's going to be a lot, so better pipe it into a file.

Cheers, Axel.

Francesco Perfetto wrote:
> Hello all,
> 
> excuse me if this mail is arrived more times, in last days I have had
> any problems with mail.
> 
> I have problem installing root version 5.15/04 on solaris 10.
> After compiling with the following configuration:
> 
> $ ./configure solarisgcc --prefix=/cern --etcdir=/cern/root/etc
> --disable-xrootd (the last disable there is because otherwise i have an
> error in compilation)
> i do make and all work fine.
> After
> when i do "gmake install", i get the following error:
> 
> [sunkloe1 2] root > gmake install
> gmake[1]: Entering directory `/SCARICATO/root'
> bin/rlibmap -r etc/system.rootmap -l lib/libRIO.so \
>            -d  -c io/inc/LinkDef.h
> bin/rlibmap -r etc/system.rootmap -l lib/libNet.so \
>            -d lib/libRIO.so -c net/inc/LinkDef.h
(Continue reading)

OKUMURA, Akira | 2 Jun 2007 08:21
Picon

Re: [ROOT] use of '#define FOO' in macro

Hello Axel,

> extern const bool b1;
> #pragma link C++ global b1;
I tried your hack but it did not compile.

$ make
rootcint -f FITS.cxx -c -I/usr/local/include FITSfunctions.h  
FITSLinkDef.h
Syntax error /usr/local/include/CCfits/FITSUtil.h:322:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing FITS.cxx FITS.h !!!
Error: rootcint: error loading headers...
make: *** [FITS.cxx] Error 1

I attache four files.
- Makefile
- FITSfunctions.h
- FITSLinkDef.h
- rootfits.cxx

Would you check the files? There may be my mistakes. However
- CFITSIO http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html
- CCFITS http://heasarc.gsfc.nasa.gov/fitsio/CCfits/
are needed if you compile my code.

gcc version 4.0.1 (Apple Computer, Inc. build 5367)
cint revision     : 5.16.18, February 9, 2007 by M.Goto
root Version   5.15/02  13 February 2007
(Continue reading)

Benjamin Monreal | 2 Jun 2007 16:45
Picon
Favicon

[ROOT] How to make TH1 recalculate stats?


Hello ROOTers,

How do I force ROOT to recompute the mean, RMS, etc. of a histogram  
after a SetBinContent operation?   I had thought that TH1::Rebuild()  
would do it but this seems not to be the case:

root [0] test = new TH1F("test","test",2,0,10)
(class TH1F*)0x7149a00
root [1] test->FillRandom("pol0",1000)
root [2] test->GetMean()
(const Double_t)5.01881719480501509e+00
root [3] test->SetBinContent(2,0)   // the mean should now be 2.5
root [4] test->GetMean()   // but it is not
(const Double_t)5.01881719480501509e+00
root [5] test->Rebuild()      //nothing seems to trigger a recalc  
based on bin contents
root [6] test->GetMean()
(const Double_t)5.01881719480501509e+00
root [7] test->Add(test,1e-5)
root [8] test->GetMean()
(const Double_t)5.01881719480501509e+00
root [9] test->Fill(7,1e-5)
(Int_t)2
root [10] test->GetMean()
(const Double_t)5.01881721461664476e+00
root [11] test->Sumw2()
root [12] test->GetMean()
(const Double_t)5.01881721461664476e+00
root [13] test->Rebuild()
(Continue reading)

Tom Roberts | 4 Jun 2007 23:52
Favicon

[ROOT] macro works on 5.14.00, fails on 5.15.08; Windows

I tried the latest Root release 5.15.08 on my Windows VM, but my macro 
crashes Root after typing a message to stdout but before displaying its 
GUI dialog box. I get stacktraces for 3 threads, each with 2 or 3 
entries, none of which mention any part of my code at all.

This macro works fine on Root 5.14.00, on Windows, Mac OS, and Linux. I 
have tried 5.15 only on Windows.

This is a 1000-line macro and I can only provide a .tiff image of the 
stacktraces, so I'm not posting them to the list. If anyone wants to 
look at them, respond privately.

This is my HistoRoot.C macro that provides a user-friendly interface to 
constructing histograms from NTuples in Root files. It is in some sense 
a Root implementation of the old HistoScope program.

Tom Roberts

Bertrand Bellenot | 5 Jun 2007 08:21
Picon
Picon

Re: [ROOT] macro works on 5.14.00, fails on 5.15.08; Windows

Hi Tom,

Please send me the stack trace, and if possible the macro.

Cheers,
Bertrand.

----- Original Message ----- 
From: "Tom Roberts" <tjrob <at> fnal.gov>
To: "'ROOT Talk'" <roottalk <at> pcroot.cern.ch>
Sent: Monday, June 04, 2007 11:52 PM
Subject: [ROOT] macro works on 5.14.00, fails on 5.15.08; Windows

>I tried the latest Root release 5.15.08 on my Windows VM, but my macro 
> crashes Root after typing a message to stdout but before displaying its 
> GUI dialog box. I get stacktraces for 3 threads, each with 2 or 3 
> entries, none of which mention any part of my code at all.
> 
> This macro works fine on Root 5.14.00, on Windows, Mac OS, and Linux. I 
> have tried 5.15 only on Windows.
> 
> This is a 1000-line macro and I can only provide a .tiff image of the 
> stacktraces, so I'm not posting them to the list. If anyone wants to 
> look at them, respond privately.
> 
> This is my HistoRoot.C macro that provides a user-friendly interface to 
> constructing histograms from NTuples in Root files. It is in some sense 
> a Root implementation of the old HistoScope program.
> 
> 
(Continue reading)

Danilo.Piparo | 5 Jun 2007 15:24
Picon
Picon

[ROOT] h2root script

Hi rooters,
I have to convert some MC samples stored in ntpl files in rootfiles.

Does anybody know where the h2root program puts the information of
"Isthep" (i.e.codes relevant to know whether the particle dacayed or not)?

Thank you very much,
     Danilo Piparo

Rene Brun | 5 Jun 2007 16:34
Picon
Picon

Re: [ROOT] h2root script

h2root does not know anything about Isthep. If this is a column in your 
ntuple, it should be converted automatically into a branch of a ROOT 
Tree. If this is not teh case
  -indicate which version of ROOT you are using
  -post a small hbook file to be converted

Rene Brun

Danilo.Piparo <at> mib.infn.it wrote:
> Hi rooters,
> I have to convert some MC samples stored in ntpl files in rootfiles.
>
> Does anybody know where the h2root program puts the information of
> "Isthep" (i.e.codes relevant to know whether the particle dacayed or not)?
>
> Thank you very much,
>      Danilo Piparo
>   

William Robbins | 6 Jun 2007 20:15
Picon

[ROOT] atom error

Hi-
I'm using SSH and X11 on Mac OSX to open a root file on a remote  
server. When I attempt to open a TBrowser, I get an "atom" error.  
Does documentation on errors and their meanings exist somewhere on  
the web?
cheers
-Billy Robbins

WLavrijsen | 6 Jun 2007 21:23
Favicon

Re: [ROOT] atom error

William,

> When I attempt to open a TBrowser, I get an "atom" error.

is a problem with X11 forwarding. Use '-X' or '-Y' as an argument to your
ssh connection. See 'man ssh' for details.

Best regards,
           Wim
--
Wim.Lavrijsen <at> cern.ch   --   WLavrijsen <at> lbl.gov   --   www.lavrijsen.net

"Stop making excuses for your software."    --first step towards quality
   "GIGO is not a valid design pattern."         --corollary


Gmane