RE: ProcessLine() and passing characters....

From: Fine, Valeri <fine_at_bnl.gov>
Date: Thu, 7 Sep 2006 15:22:44 -0400


Try:
gROOT->ProcessLine("leggi(8207,0,4,\"235U\",\"FIC1\")");

Best Regards

                         Valeri Fine


Brookhaven National Laboratory
Upton, NY 11973, USA
Phone: +1 631 344 7806
Fax: +1 631 344 4206
E-mail: fine_at_bnl.gov

> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch

[mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Marco Calviani
> Sent: Thursday, September 07, 2006 2:07 PM
> To: roottalk_at_cern.ch
> Subject: [ROOT] ProcessLine() and passing characters....
>
> Hi ROOTers,
> i'm using an analysis program that can be called with a leggi()
> function
> (the prototype is leggi(int, int, int, char, char)). In order to
> launch multiple analysis i've created a macro file that looks like
> this:
>
> {
> gROOT->ProcessLine(".L produz_thre8.cpp++");
> gROOT->ProcessLine("leggi(8207,0,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,1,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,2,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,3,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,4,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,5,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,6,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,7,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,8,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,9,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,10,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,11,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,12,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,13,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,14,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,15,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,16,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,17,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,18,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,19,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,20,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,21,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,22,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,23,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,24,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,25,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,26,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,27,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,28,4,"235U","FIC1")");
> gROOT->ProcessLine("leggi(8207,29,4,"235U","FIC1")");
>
> }
>
> Unfortunately launching this macro with
> $ root -l -q < file.macro
> produces this:
>
> Error: String literal syntax error produz_thre.macro:3:
> Error: String literal syntax error produz_thre.macro:3:
> Error: String literal syntax error produz_thre.macro:3:
> Error: String literal syntax error produz_thre.macro:3:
>
> I can understand that it doesn't like the fact that 235U and FIC1 are
> with " " signs. How can i circumvent this problem?
>
> Thanks in advance,
> Marco Calviani
Received on Thu Sep 07 2006 - 21:24:11 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET