Limitation in ROOT.gROOT.ProcessLine?

hi,
I am using the ProcessLine to compile some struct such that i can then use them for TTree branch creation.
Unfortunately there seems to be a limitation in the length of the ProcessLine. Can one extend this to be able to process longer string lengths?
thanks, nabil

I can’t answer your specific question, but if you post more details about what you are trying to do, there may be another solution.

Cheers,
Charles

[quote=“cplager”]I can’t answer your specific question, but if you post more details about what you are trying to do, there may be another solution.

Cheers,
Charles[/quote]

For instance:
ROOT.gROOT.ProcessLine(
"struct bqQ_t{\
Double_t t_bqQ_m;\
Double_t t_bqQ_px;\
Double_t t_bqQ_py;\
Double_t t_bqQ_pz;\
etc…
the string length (of the ProcessLine parameter seems to be limited). and thus i need to split my struct into two struct.
my question
ProcessLine(s). the length for s seems to have an upper limit. how can i change this, to be able to give a “very long” struct? is this feasible, and if yes how.
thanks.

I’m sure Wim will respond with the right way to do this. :smiley:

One thing I’ve done in the past is had Python write a temporary .cc file and then had root compile it into a dictionary and then load that dictionary into PyRoot.

Cheers,
Charles

thanks Charles, i am aware of this approach, but I would prefer to have everything semi-pythonised. thus being able to extend the limit size for ProcessLine would be more flexible in my case.
I wonder whether this is a ProcessLine limit or a CINT limit in the end ?

Hi Nabil,

This is a CINT limit, you can increase the limit but this requires a recompilation of ROOT (you need to modify G__ci.h).

I would recommend that instead you store the string in a temporary file and pass it back to gROOT.LoadMacro.

Cheers,
Philippe.

ok
i will live with it then, since i am reluctant to split my macro in several pieces.
thanks for the fast feedback.