Re: new classes

From: Mario Kadastik <mario.kadastik_at_cern.ch>
Date: Sat, 1 Jul 2006 21:37:37 +0300


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
mario.kadastik_at_cern.ch

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

Received on Sat Jul 01 2006 - 20:37:55 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET