Re: cint :: Limitation: Function can not be defined in a command line or a tempfile

From: Benjamin Bannier <bbannier_at_gmail.com>
Date: Fri, 29 Jul 2011 15:57:20 -0400


Hi Adrian,

> > #!/bin/bash
> >
> > root -l -b <<EOF
> > .L someROOTmacro.C+
> > someROOTmacro(..)
> > .q
> > EOF
> hmm.. thanks! this is an idea worth exploring...

I do not want to spoil your love for CINT, but since you are already exploring: ROOT comes with decent python bindings with which writing standalone scripts is at least as easy as this.

    #!/bin/env python
    import ROOT as r
    r.gROOT.ProcessLine(".L someROOTmacro.C+")     r.someROOTmacro()

Of course this becomes much more straight-forward if you define someROOTmacro as a function inside your python script.

Just my 2 cents,

Benjamin

Received on Fri Jul 29 2011 - 21:57:35 CEST

This archive was generated by hypermail 2.2.0 : Sat Jul 30 2011 - 11:50:01 CEST