Re: using an external preprocessor from ROOT prompt

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Mon, 28 Jun 2010 12:41:02 +0200


Hi Erkcan,

Erkcan Ozcan wrote on 06/28/2010 12:29 PM:

> Thanks a lot for the quick implementation. Two questions:
> 
> 1-This is on svn I assume, will it appear in the next production release?

Yes and yes.

> 2-Can't I somehow cheat by writing some "smart" macro by isolating TObject.h etc. #includes inside some #if statement like: #if !defined(__CINT__), and #else gROOT->ProcessLine(".preproc")?

Probably not - the preprocessor needs to see Rtypes.h for things like ClassDef, so you cannot completely hide it from CINT, even with preproc turned on. This will only work for completely independent packages.

Another option is to not interpret your sources but use ACLiC: .L mycode.C+
That uses the external preprocessor automatically for generating dictionaries, and afterwards you can "just" use functions and types from mycode.C.

Cheers, Axel.

> 
> On 28 Jun 2010, at 11:29, Axel Naumann wrote:
> 

>> Hi Erkcan,
>>
>> that *was* impossible. Good point! I have now implemented it in the
>> prompt interface: you can do "root [] .proproc" and it will toggle the
>> external preprocessing on/off. Programatically you can do the same
>> though gROOT->ProcessLine(".preproc").
>>
>> Note, though: this does not work for any file #including e.g. TObject,
>> as it disables ROOT's ignore-include mechanism for include files (see
>> TROOT::IgnoreInclude()).
>>
>> Cheers, Axel.
>>
>> Erkcan Ozcan wrote on 06/27/2010 12:50 PM:
>>> Dear experts,
>>>
>>> I was wondering if it is possible to enable the use of an external preprocessor inside ROOT. I read that there are some command line options for CINT itself - what I want to do is to enable it within ROOT. I checked TCint documentation but did not see any mention of the preprocessor or passing command line arguments to TCint instances.
>>>
>>> Cheers,
>>> e.
>>>

> Received on Mon Jun 28 2010 - 12:41:06 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 29 2010 - 05:50:02 CEST