Re: Problem with reading TTrees on Windows

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 15 Sep 2009 13:07:23 +0200


Writing your own main program has many drawbacks
-you have as many interfaces than executables to pass the arguments
-your interactive program will not even the event (GUI) loop processed
-You do not know the chunk of objects (could be large) with which it has
  been linked with.
-It is an encouragement to write non-modular systems that grow and grow
  with time.

Using root.exe has many more advantages:
-it is a known starting base and user interface
-you load what you use via the dynamic linking
-you can execute interpreted scripts (that in turn can call compiled code)

    root > .x myscript.C
   this provides the flexibility of a script vs the rigidity of a main program
-you can compile on the fly scripts with ACLIC in a portable way

    root > .x myscript.C+
   or
    root > .L mysystem.C+
    root > myclass m;
  instead of messing with makefiles,
-you can load as many pre-compiled shared libs as you want

    root > gSystem->Load(mylib");

Rene Brun

James Jackson wrote:

> Hi Rene,
>
>>  In general it is a bad idea to implement your own main program. 
>> Simply call your class, code from the root prompt.
>
> Could you please elaborate on this?
>
> Regards,
> James.
>
Received on Tue Sep 15 2009 - 13:06:57 CEST

This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 17:50:03 CEST