suneel | 1 Apr 2008 03:00
Picon

[ROOT] Installing ROOT to Linux (Fedora8)

Hi all,

    I am trying to install ROOT on my Linux machine (OS-Fedora 8). But the
make command is exiting with the following error. It seems that it is
trying to find the file mysql.h which is not getting created during
the compilation. I tried to search this file inside the root directory
but could not find.
Any suggestions to get rid of the problem.
Thanks in advance for any kind of help.
With Regards
Suneel

In file included from mysql/src/TMySQLResult.cxx:12:
include/TMySQLResult.h:25:19: error: mysql.h: No such file or directory
include/TMySQLResult.h:35: error: ISO C++ forbids declaration of
‘MYSQL_RES’ with no type
include/TMySQLResult.h:35: error: expected ‘;’ before ‘*’ token
include/TMySQLResult.h:36: error: ISO C++ forbids declaration of
‘MYSQL_FIELD’ with no type
include/TMySQLResult.h:36: error: expected ‘;’ before ‘*’ token
include/TMySQLRow.h:35: error: ISO C++ forbids declaration of ‘MYSQL_RES’
with no type
include/TMySQLRow.h:35: error: expected ‘;’ before ‘*’ token
include/TMySQLRow.h:36: error: ‘MYSQL_ROW’ does not name a type
mysql/src/TMySQLResult.cxx: In constructor
‘TMySQLResult::TMySQLResult(void*)’:
mysql/src/TMySQLResult.cxx:23: error: ‘fResult’ was not declared in this
scope
mysql/src/TMySQLResult.cxx:23: error: ‘MYSQL_RES’ was not declared in this
scope
(Continue reading)

Johan Bregeon | 1 Apr 2008 10:23
Picon
Picon
Favicon

Re: [ROOT] Installing ROOT to Linux (Fedora8)

Hello to all happy Fedora users :o)
it looks like you're missing mysql.h
on my system it's provided by the mysql-devel package.
so, just try to install it :
yum install mysql-devel.i386

ROOT works fine on my Fedora 8... but it does not compile yet on Fedora 9.
Cheers,
Johan

suneel <at> puhep.res.in a écrit :
> Hi all,
>
>
>     I am trying to install ROOT on my Linux machine (OS-Fedora 8). But the
> make command is exiting with the following error. It seems that it is
> trying to find the file mysql.h which is not getting created during
> the compilation. I tried to search this file inside the root directory
> but could not find.
> Any suggestions to get rid of the problem.
> Thanks in advance for any kind of help.
> With Regards
> Suneel
>
> In file included from mysql/src/TMySQLResult.cxx:12:
> include/TMySQLResult.h:25:19: error: mysql.h: No such file or directory
> include/TMySQLResult.h:35: error: ISO C++ forbids declaration of
> ‘MYSQL_RES’ with no type
> include/TMySQLResult.h:35: error: expected ‘;’ before ‘*’ token
> include/TMySQLResult.h:36: error: ISO C++ forbids declaration of
(Continue reading)

Philip Rodrigues | 1 Apr 2008 16:43
Picon
Picon
Favicon

RE: [ROOT] CINT stringstream bug

Hi Axel,
Thanks for the suggestion - I'll try it out. Would it be possible to
have CINT generate a warning or an error when attempting to cast an
istream to a bool? This would help protect against bugs in users' code.

By the way, more generally, is there a list anywhere of STL features
that are not yet implemented in CINT? I've noticed a few other things,
which I think are known issues, but I'd like to be able to check.

Regards,
Philip 

>-----Original Message-----
>From: Axel Naumann [mailto:Axel.Naumann <at> cern.ch] 
>Sent: 01 April 2008 15:04
>To: Philip Rodrigues
>Cc: roottalk <at> root.cern.ch
>Subject: Re: [ROOT] CINT stringstream bug
>
>Hi Philip,
>
>the problem is the cast from istream to bool which just 
>doesn't work right with 
>CINT. Use the explicit test with good() instead:
>
>#include <sstream>
>#include <string>
>#include <iostream>
>
>void cint_stringstream()
(Continue reading)

Axel Naumann | 1 Apr 2008 17:20
Picon
Picon

Re: [ROOT] CINT stringstream bug

Hi Philip,

On 2008-04-01 16:43, Philip Rodrigues wrote:
> Thanks for the suggestion - I'll try it out. Would it be possible to
> have CINT generate a warning or an error when attempting to cast an
> istream to a bool? This would help protect against bugs in users' code.

Problem is: we need to detect the cast from istream to bool so we can issue a 
warning. But if we do that we could as well fix the cast :-) I know it's 
annoying, but the best way for us is to fix it in the new version of CINT: we 
need to fix all the cast operation properly, the istream problem you found is 
just one of them.

> By the way, more generally, is there a list anywhere of STL features
> that are not yet implemented in CINT? I've noticed a few other things,
> which I think are known issues, but I'd like to be able to check.

There is of course the list of limitations available on the web, linked from 
the CINT site: <http://root.cern.ch/viewcvs/trunk/doc/limitati.txt?root=cint>.

Many of the limitations with templates can be solved by creating a dictionary 
for the STL type or by compiling the code using ACLiC (.L code.C+) which is the 
recommended way to work with more complex files anyway.

Cheers, Axel.

Philippe Canal | 1 Apr 2008 18:05
Favicon

RE: [ROOT] problem creating vector<TLorentzVector> particles in CINT

Hi,

This is a (unfortunately :)) known deficiency of CINT which has
trouble to deal with interpreted STL container of objects. 

To work around the problem you need to either generated the
dictionary for your vector (see below) or simply compile 
your whole example:
   .x example.C+

Cheers,
Philippe.

// stlloader.C
#include "TLorentzVector.h"
#include <vector>
#ifdef __MAKECINT__
#pragma link C++ class vector<TLorentzVector>;
#endif
// and use with:
// root [] .L stlloader.C+ 

-----Original Message-----
From: owner-roottalk <at> root.cern.ch [mailto:owner-roottalk <at> root.cern.ch] On
Behalf Of Konstantinos.Theofilatos <at> cern.ch
Sent: Tuesday, April 01, 2008 11:00 AM
To: roottalk <at> root.cern.ch
Subject: [ROOT] problem creating vector<TLorentzVector> particles in CINT

Hi ROOT experts,
(Continue reading)

Konstantinos.Theofilatos | 1 Apr 2008 21:06
Picon
Picon

RE: (SOLVED) [ROOT] problem creating vector<TLorentzVector> particles in CINT

Dear Philippe,
Thanks for the quick and accurate reply, both of your suggestions
worked, so my problem is now solved.
cheers!
kostas

On Tue, 1 Apr 2008, Philippe Canal wrote:

> Hi,
> 
> This is a (unfortunately :)) known deficiency of CINT which has
> trouble to deal with interpreted STL container of objects. 
> 
> To work around the problem you need to either generated the
> dictionary for your vector (see below) or simply compile 
> your whole example:
>    .x example.C+
> 
> Cheers,
> Philippe.
> 
> // stlloader.C
> #include "TLorentzVector.h"
> #include <vector>
> #ifdef __MAKECINT__
> #pragma link C++ class vector<TLorentzVector>;
> #endif
> // and use with:
> // root [] .L stlloader.C+ 
> 
(Continue reading)

Deepak Kar | 1 Apr 2008 22:22
Picon

[ROOT] Merging Histograms with different names

Hi,

I dont know if I am missing something obvious, but this is what I have.

hist1.root with just one histogram in it, named hist1
hist2.root with just one histogram in it, named hist2
Neither have any directory structure.

I somehow want hist1 and hist2 merged. Now when I try the usual
hadd.C, it just gives me back whichever I put in first, hist1 or
hist2, not the combined one.
And I cant certainly do hist1->Add(hist2); since that does not care
for the relative weights, which are much different - otherwise I could
have just did that and divided by 2.

Can it be done?

Thanks a lot,
Deepak

--

-- 
Deepak Kar
Graduate Student of Physics
University of Florida
Homepage - www.phys.ufl.edu/~dkar

Philip Rodrigues | 1 Apr 2008 22:27
Picon
Picon
Favicon

Re: [ROOT] CINT stringstream bug

Hi Axel,

> On 2008-04-01 16:43, Philip Rodrigues wrote:
> > Thanks for the suggestion - I'll try it out. Would it be possible to
> > have CINT generate a warning or an error when attempting to cast an
> > istream to a bool? This would help protect against bugs in users' code.
>
> Problem is: we need to detect the cast from istream to bool so we can issue
> a warning. But if we do that we could as well fix the cast :-) I know it's
> annoying, but the best way for us is to fix it in the new version of CINT:
> we need to fix all the cast operation properly, the istream problem you
> found is just one of them.

Good point - I didn't think of that!

> > By the way, more generally, is there a list anywhere of STL features
> > that are not yet implemented in CINT? I've noticed a few other things,
> > which I think are known issues, but I'd like to be able to check.
>
> There is of course the list of limitations available on the web, linked
> from the CINT site:
> <http://root.cern.ch/viewcvs/trunk/doc/limitati.txt?root=cint>.
>
> Many of the limitations with templates can be solved by creating a
> dictionary for the STL type or by compiling the code using ACLiC (.L
> code.C+) which is the recommended way to work with more complex files
> anyway.

Thanks for the tip.

(Continue reading)

Rene Brun | 2 Apr 2008 12:37
Picon
Picon

Re: [ROOT] Merging Histograms with different names

Deepak Kar wrote:
> Hi,
>
> I dont know if I am missing something obvious, but this is what I have.
>
> hist1.root with just one histogram in it, named hist1
> hist2.root with just one histogram in it, named hist2
> Neither have any directory structure.
>   
The result of hadd will be a file containing both hist1 and hist2. of 
course hadd should not add/merge (or whatever) hist1 and hist2.
> I somehow want hist1 and hist2 merged. Now when I try the usual
> hadd.C, it just gives me back whichever I put in first, hist1 or
> hist2, not the combined one.
> And I cant certainly do hist1->Add(hist2); since that does not care
> for the relative weights, which are much different - otherwise I could
> have just did that and divided by 2.
>   
If what you want to do is the average of hist1 and hist2, see the doc of 
TH1::Add (version >=5.18)

 SPECIAL CASE (Average/Efficiency histograms)
 For histograms representing averages or efficiencies, one should compute the average
 of the two histograms and not the sum. One can mark a histogram to be an average
 histogram by setting its bit kIsAverage <http://root.cern.ch/root/html/TH1.html#TH1:kIsAverage> with
    myhist.SetBit <http://root.cern.ch/root/html/TObject.html#TObject:SetBit>(TH1
<http://root.cern.ch/root/html/TH1.html>::kIsAverage <http://root.cern.ch/root/html/TH1.html#TH1:kIsAverage>);
 Note that the two histograms must have their kIsAverage
<http://root.cern.ch/root/html/TH1.html#TH1:kIsAverage> bit set

(Continue reading)

Gabriel Perdue | 3 Apr 2008 16:21
Favicon

[ROOT] Compilation failure on Mac OSX 10.5.2

Hello,

	I am using:

MacBook Pro w/ Intel Core 2 Duo
OSX 10.5.2
XCode 3.0
g77 3.4.0

root_v5.18.00

I also have installed X11-2.1.4 from XQuartz, which has me mildly  
worried, but not really.  Using

./configure macosx64

and

make -j2

the make process fails with:

===================

gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC  -I/usr/local/include/freetype2 - 
I/usr/local/include    -c libungif/gif_hash.c -o libungif/gif_hash.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC  -I/usr/local/include/freetype2 - 
I/usr/local/include    -c afterbase.c -o afterbase.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC  -I/usr/local/include/freetype2 - 
I/usr/local/include    -c asimage.c -o asimage.o
(Continue reading)


Gmane