Axel Naumann | 1 Jul 01:24 2006
Picon
Picon

Re: [ROOT] new classes

Hi Mario,

Mario Kadastik wrote:
>> create a dictionary. See the excellent users guide, which is meant to
>>
>> help you with these questions. Also read the chapter about ACLiC - esp
>>
>> if you want "just a tree with my class" there's absolutely no reason to
>>
>> build a binary.
>>
> 
> well I want to run my event generation in a compiled version as it's 10x
> faster. 

As I said - read the chapter on ACLiC. It _is_ about compiled code.

> And I want to use the libraries for other applications as well
> (CMSSW as it's gonna be my actual tree writing part with root being the
> reading part later). 

Sure - again a perfectly vaid reason to prototype it with ACLiC.

>> You can additionally have a look at the Event examples in $ROOTSYS/test.
>>
> 
> if you think that it's an easy example, then you are way off :P 

Yeah, that's true, it's not that easy :-)

(Continue reading)

Mario Kadastik | 1 Jul 01:26 2006
Picon
Picon

Re: [ROOT] new classes

root [0] .L MyEvent.cxx+
root [1] .L MyTreeCreator.cxx+
root [2] createTree()

would be an example. Move your main into a CreateTree() func in
MyTreeCreator.cxx, and you're done.

ok, thanks for the response and I will take a look into it with testing as well, but just to spare time at this moment can you also tell me what do I have to do to actually compile a working binary with the new class and my test code? Seems the g++ commands I used didn't quite do the trick. I probably have to incorporate the dictionary, but have no idea how.

--------------------------------
Mario Kadastik
CMS experiment

"Physics is like sex, sure it may give some practical results, but that's not why we do it"
    --- Richard P. Feynman


Axel Naumann | 1 Jul 01:47 2006
Picon
Picon

Re: [ROOT] new classes

Hi Mario,

I'm positive that the total time of you reading the part on ACLiC in
chapter 7 is less than me copying its content into an email and you
reading this email. So why don't you read the users guide, chapter 7.

As I'm a nice guy (sometimes :-), I even gave you the way to compile
your code with root - you probably didn't realize it, though: the ".L
..+" compiles it.

If you have to use GCC (trust me, you don't, but you seem not be the
listening kind of guy :-) then look at root-config, which returns the
flags you'll need to pass to GCC. And you can check rootcint to build
the dict, which you then need to compile and link into a library,
together with your compiled code.

Or you just read ch7 and use ACLiC.

Cheers, Axel.

Mario Kadastik wrote:
>> root [0] .L MyEvent.cxx+
>>
>> root [1] .L MyTreeCreator.cxx+
>>
>> root [2] createTree()
>>
>>
>> would be an example. Move your main into a CreateTree() func in
>>
>> MyTreeCreator.cxx, and you're done.
>>
> 
> ok, thanks for the response and I will take a look into it with testing
> as well, but just to spare time at this moment can you also tell me what
> do I have to do to actually compile a working binary with the new class
> and my test code? Seems the g++ commands I used didn't quite do the
> trick. I probably have to incorporate the dictionary, but have no idea how.
> 
> 
> --------------------------------
> 
> Mario Kadastik
> 
> CMS experiment
> 
> mario.kadastik <at> cern.ch <mailto:mario.kadastik <at> cern.ch>
> 
> 
> "Physics is like sex, sure it may give some practical results, but
> that's not why we do it"
> 
>     --- Richard P. Feynman
> 
> 
> 

Dimitri Bourilkov | 1 Jul 02:49 2006
Picon

Re: [Fwd: Re: [ROOT] Wikipedia criticism about root]

Hi all,

     The discussions have steadily increased in scope, so let's go back
to some of the initial points. To add, I am just a ROOT user (was a
PAW and HBOOK one as well), know both the strong sides and limitations,
and have developed code on top of ROOT without major problems.

     1) Regardless of what you think of Andy's criticisms, the wikipedia
page right now is not balanced: the info about ROOT is squeezed to less
than 50 % of the page?!

     2) Let's not forget the users. ROOT provides a one-stop, easy to
install/port package, that does a lot. Many users don't want/need
beautifully designed, but "lean" frameworks, where you are mostly left
with do-it-yourself (and you need the plots for the conference in
two days).

     3) ROOT was developed in an extreme programming style with frequent
releases and tons of user feedback (as this list is a witness), so
it does many things that people have asked for.

     Now to the criticisms. Some of them are really matter of taste,
I don't believe there is a one size fits all solution:

     - object oriented design issues: I personally like the original
       ROOT design (TObject as base class), and as the success of JAVA
       shows this is a viable design methodology

     - monolithic design: yes (was true already for HBOOK), but this
       gives speed, and makes life simpler for many users; I know,
       developers will ALWAYS complain about this

     - re-invention: yes, if you love templates; in ROOT you can do a
       lot without them ;->
       <aside> I really prefer languages like PYTHON where e.g.
       writing a factory is a two-line affair instead of major
       undertaking as in strongly typed languages like C++; in that sense
       ROOT's design was quite refreshing for a baroque language
       </aside>

     - CINT interpreter: probably I am not alone starting often by
       playing on the command line and converting my trials and errors
       to C++ scripts later; the C-style syntax is not ideal (e.g. kumacs
       were more concise BUT a separate language), still CINT and ACLIC
       produce useful code FAST;
       when I was first exposed to JAS, my first question was about
       the command line, and learned that I have to start by writing
       code - for me this was a show-stopper.

     To summarize, staying close to users has given ROOT its
strongest sides, I think the features (criticisms) listed here
actually work quite well for many people.

     Best, Dimitri

--

-- 
        _/_/_/                             _/_/_/
       _/    _/   Dimitri  BOURILKOV      _/    _/
      _/    _/   University of Florida   _/_/_/
     _/    _/   bourilkov <at> phys.ufl.edu  _/    _/
    _/_/_/                             _/_/_/

Dimitri Bourilkov | 1 Jul 03:52 2006
Picon

Re: [Fwd: Re: [ROOT] Wikipedia criticism about root]

Hi all,

    The discussions have steadily increased in scope, so let's go back
to some of the initial points. To add, I am just a ROOT user (was a
PAW and HBOOK one as well), know both the strong sides and limitations,
and have developed code on top of ROOT without major problems.

    1) Regardless of what you think of Andy's criticisms, the wikipedia
page right now is not balanced: the info about ROOT is squeezed to less
than 50 % of the page?!

    2) Let's not forget the users. ROOT provides a one-stop, easy to
install/port package, that does a lot. Many users don't want/need
beautifully designed, but "lean" frameworks, where you are mostly left
with do-it-yourself (and you need the plots for the conference in
two days).

    3) ROOT was developed in an extreme programming style with frequent
releases and tons of user feedback (as this list is a witness), so
it does many things that people have asked for.

    Now to the criticisms. Some of them are really matter of taste,
I don't believe there is a one size fits all solution:

    - object oriented design issues: I personally like the original
      ROOT design (TObject as base class), and as the success of JAVA
      shows this is a viable design methodology

    - monolithic design: yes (was true already for HBOOK), but this
      gives speed, and makes life simpler for many users; I know,
      developers will ALWAYS complain about this

    - re-invention: yes, if you love templates; in ROOT you can do a
      lot without them ;->
      <aside> I really prefer languages like PYTHON where e.g.
      writing a factory is a two-line affair instead of major
      undertaking as in strongly typed languages like C++; in that sense
      ROOT's design was quite refreshing for a baroque language
      </aside>

    - CINT interpreter: probably I am not alone starting often by
      playing on the command line and converting my trials and errors
      to C++ scripts later; the C-style syntax is not ideal (e.g. kumacs
      were more concise BUT a separate language), still CINT and ACLIC
      produce useful code FAST;
      when I was first exposed to JAS, my first question was about
      the command line, and learned that I have to start by writing
      code - for me this was a show-stopper.

    To summarize, staying close to users has given ROOT its
strongest sides, I think the features (criticisms) listed here
actually work quite well for many people.

    Best, Dimitri

--

-- 
       _/_/_/                             _/_/_/
      _/    _/   Dimitri  BOURILKOV      _/    _/
     _/    _/   University of Florida   _/_/_/
    _/    _/   bourilkov <at> phys.ufl.edu  _/    _/
   _/_/_/                             _/_/_/

Julius Hrivnac | 1 Jul 09:58 2006
Picon
Picon

Re: [Fwd: Re: [ROOT] Wikipedia criticism about root]

Hi Dimitri,

>       when I was first exposed to JAS, my first question was about
>       the command line, and learned that I have to start by writing
>       code - for me this was a show-stopper.

JAS has a commamd line in two languages, Python and PNuts (which
is a scripting version of Java).

                 Julius

--

-- 
########################################################################
# E-mail: Julius.Hrivnac <at> cern.ch                                       #
# WWW:    http://home.cern.ch/~hrivnac/                                #
# S-mail: LAL, BP 34, F - 91898 Orsay cedex, France                    #
# phone: (F)-(0)1-64-46-82-51; private: (F)-(0)8-71-19-31-70           #
# mobil: (F)-622-741-151; (CZ)-607-918-415                             #
# ICQ: 10804323                                                        #
# AIM: jhrivnac                                                        #
########################################################################

Mario Kadastik | 1 Jul 20:37 2006
Picon
Picon

Re: [ROOT] new classes

Thanks,

well I understand now why you pointed me to ACLiC and what it does, however it doesn't still give me the final solution which I'm after. Basically what I want to have is a binary called test which I can execute with some arguments. If I use ACLiC, then I will get libraries and can execute functions in CINT, but if I want to make it work straight from the commandline, then I do need the g++ commands.

Also what do I have to do to be able to just add #include "MyEvent.h" and then just use the object in any code segment? What kind of compilation does that have to be? Is ACLiC compiled .so file enough (if it's in LD_LIBRARY_PATH) or do I have to do something else?

Mario

On Jul 1, 2006, at 2:47 AM, Axel Naumann wrote:

Hi Mario,

I'm positive that the total time of you reading the part on ACLiC in
chapter 7 is less than me copying its content into an email and you
reading this email. So why don't you read the users guide, chapter 7.

As I'm a nice guy (sometimes :-), I even gave you the way to compile
your code with root - you probably didn't realize it, though: the ".L
..+" compiles it.

If you have to use GCC (trust me, you don't, but you seem not be the
listening kind of guy :-) then look at root-config, which returns the
flags you'll need to pass to GCC. And you can check rootcint to build
the dict, which you then need to compile and link into a library,
together with your compiled code.

Or you just read ch7 and use ACLiC.

Cheers, Axel.

Mario Kadastik wrote:
root [0] .L MyEvent.cxx+

root [1] .L MyTreeCreator.cxx+

root [2] createTree()


would be an example. Move your main into a CreateTree() func in

MyTreeCreator.cxx, and you're done.


ok, thanks for the response and I will take a look into it with testing
as well, but just to spare time at this moment can you also tell me what
do I have to do to actually compile a working binary with the new class
and my test code? Seems the g++ commands I used didn't quite do the
trick. I probably have to incorporate the dictionary, but have no idea how.


--------------------------------

Mario Kadastik

CMS experiment

mario.kadastik <at> cern.ch <mailto:mario.kadastik <at> cern.ch>


"Physics is like sex, sure it may give some practical results, but
that's not why we do it"

    --- Richard P. Feynman





--------------------------------
Mario Kadastik
CMS experiment

"Physics is like sex, sure it may give some practical results, but that's not why we do it"
    --- Richard P. Feynman


Axel Naumann | 1 Jul 21:29 2006
Picon
Picon

Re: [ROOT] new classes

Hi Mario,

have a look at the Makefile in test, where libEvent is build from
Event.cxx and the dictionary generated on Event.h. You'll need

gcc `root-config --cflags` -c MyClass.cxx
rootcint -f MyClassDict.cxx -c -p MyClass.h MyClassLinkdef.h
gcc `root-config --cflags` -c MyClassDict.cxx
ld `root-config --ldflags` `root-config --glibs` MyClass.o MyClassDict.o
-o test

MyClassLinkdef.h contains
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class TMyClass;
#endif

There's no contradiction between a script and a set of command line
parameters: you can always call

root -l -b -q "MySteeringScript.C(\"whats the question\",42)"

where MySteeringScript.C contains e.g.

void MySteeringScript(const char sentence, int number) {
  if (gSystem->CompileMacro("MyClass.C"))
    gSystem->ProcessLine(Form("myfunc(\"%s\", %d);", sentence, number);
}

That way you don't have to write a build system, but can immediately
work on code. The build system you're going to come up with is most
probably not the one used when your code goes into production - it's
just for prototyping.

> Also what do I have to do to be able to just add #include "MyEvent.h"
> and then just use the object in any code segment? What kind of
> compilation does that have to be? Is ACLiC compiled .so file enough (if
> it's in LD_LIBRARY_PATH) or do I have to do something else?

The .so file will be enough. Again, in ACLiC you don't have to care, you
just load the lib before you use it.

Cheers, Axel.

> On Jul 1, 2006, at 2:47 AM, Axel Naumann wrote:
> 
> 
>> Hi Mario,
>>
>>
>> I'm positive that the total time of you reading the part on ACLiC in
>>
>> chapter 7 is less than me copying its content into an email and you
>>
>> reading this email. So why don't you read the users guide, chapter 7.
>>
>>
>> As I'm a nice guy (sometimes :-), I even gave you the way to compile
>>
>> your code with root - you probably didn't realize it, though: the ".L
>>
>> ..+" compiles it.
>>
>>
>> If you have to use GCC (trust me, you don't, but you seem not be the
>>
>> listening kind of guy :-) then look at root-config, which returns the
>>
>> flags you'll need to pass to GCC. And you can check rootcint to build
>>
>> the dict, which you then need to compile and link into a library,
>>
>> together with your compiled code.
>>
>>
>> Or you just read ch7 and use ACLiC.
>>
>>
>> Cheers, Axel.
>>
>>
>> Mario Kadastik wrote:
>>
>>>> root [0] .L MyEvent.cxx+
>>>>
>>>>
>>>> root [1] .L MyTreeCreator.cxx+
>>>>
>>>>
>>>> root [2] createTree()
>>>>
>>>>
>>>>
>>>> would be an example. Move your main into a CreateTree() func in
>>>>
>>>>
>>>> MyTreeCreator.cxx, and you're done.
>>>>
>>>>
>>>
>>> ok, thanks for the response and I will take a look into it with testing
>>>
>>> as well, but just to spare time at this moment can you also tell me what
>>>
>>> do I have to do to actually compile a working binary with the new class
>>>
>>> and my test code? Seems the g++ commands I used didn't quite do the
>>>
>>> trick. I probably have to incorporate the dictionary, but have no
>>> idea how.
>>>
>>>
>>>
>>> --------------------------------
>>>
>>>
>>> Mario Kadastik
>>>
>>>
>>> CMS experiment
>>>
>>>
>>> mario.kadastik <at> cern.ch <mailto:mario.kadastik <at> cern.ch>
>>>
>>>
>>>
>>> "Physics is like sex, sure it may give some practical results, but
>>>
>>> that's not why we do it"
>>>
>>>
>>>     --- Richard P. Feynman
>>>
>>>
>>>
>>>
>>
> 
> --------------------------------
> 
> Mario Kadastik
> 
> CMS experiment
> 
> mario.kadastik <at> cern.ch <mailto:mario.kadastik <at> cern.ch>
> 
> 
> "Physics is like sex, sure it may give some practical results, but
> that's not why we do it"
> 
>     --- Richard P. Feynman
> 
> 
> 

Edmond Offermann | 2 Jul 05:29 2006
Picon

Re: [ROOT] fit parameter errors

Hi Guy,

No, those who claim that parameter correlations are not taken into
account
when taking the diagonal elements of the error matrix are wrong !!

You can read up on it by checking the "Minuit" documentation, in
particular
section 7.3.1, page 41 "Error Matrix"  amd further on .

Google for "Minuit documentation" and you will find for instance :

http://hep.fi.infn.it/minuit.pdf

Eddy

--- Guy Roche <roche <at> in2p3.fr> wrote:

> Dear Rooters,
> I am frequently asked about the fit parameters errors given in
> the statistics/fit info box. People claim that the correlations
> in between parameters are not included in the parametors errors.
> Is it right?
> From the screen output of the fit parameters, it is not clear to
> me whether the diogonal elements of the error matrix are the only
> ones taken into account (thus meaning no correlation taken into
> account).
> Well, I was just looking into the TMinuit class, source file
> section, seems to be the case.
> Thanks for your help,
> Guy.
> 
> 
> 

Satya J | 2 Jul 07:31 2006
Picon

[ROOT] OpenGl

Hi,

Here my problem is little offline.  I am facing some problem regarding opengl
display driver . 
                       myShapes->Draw("ogl");

I am running with FedoraCore 2. Can somebody suggest me how can I set
opengl libs so that it will work in my os.

Note: myShapes->Draw("x3d"); is working well.

Thanks
satya

--
*****************************************************************************************
Afection is much more higer then heaven for me... So trust me I will always with you...
**********************************************************************************************


Gmane