Re: [CINT] Re: [ROOT] User command too long

From: George M. Irwin (gmieg@SLAC.stanford.edu)
Date: Mon Feb 17 2003 - 20:54:17 MET


On Sat, 15 Feb 2003, Masaharu Goto wrote:

> Hello Heather,
>
> Indeed, command line is lmited to 251 characters. Is it a problem
> if you type it in multiple lines?  I think it is more convenient.
>
>   root[0]  { char *line[] = {
>   end with '}', '@':abort >      "..............."
>   end with '}', '@':abort >      "..............." }: }
>   root[1]
>
> Thank you
> Masa Goto

Hi Masa,  I attach a similar item about "user command too long" that
I submitted to roottalk last July.  The point is that, even if a
user may be able to limit his commands to 251 characters (which is
extra work for the user), the TreeViewer easily generates longer
expressions, which the user has no control over.  I repeat the
question:  Why is it necessary to have any character limit in a C++
(or C) program?  George

Date: Sat, 27 Jul 2002 13:11:14 -0700 (PDT)
From: George M. Irwin <gmieg@slac.stanford.edu>
To: roottalk@pcroot.cern.ch
Subject: "User command too long"

Hi, A ROOT limit on the length of user commands makes it difficult
to execute complicated expressions, as the appended example shows.
Although my expression is longer than one wants to type, the
TreeViewer easily generates the same expression using only a few
of the "Expression" slots provided.  And the TreeViewer-generated
Draw command is then rejected by CINT for the same "User command
too long".  So I'm wondering how the TreeViewer can be useful for
any but the shortest Draw commands.  Why does there have to be a length
limit for command strings?  I'm using RH6.2 egcs1.1.2 with a recent
CVS development release.  Thanks.  George

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.03/07      25 July 2002   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v1.x used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.50, July 7 2002
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Note: File "iostream.h" already loaded

Executing rootlogon.C
Loading user dynamic libraries.
root [0] TFile tf("tracksr.root");
root [1] tf.ls();
TFile**         tracksr.root
 TFile*         tracksr.root
  KEY: TTree    stripnt;9       StripSR Tree
  KEY: TTree    stripnt;8       StripSR Tree
  KEY: TTree    planent;4       PlaneSR Tree
  KEY: TTree    planent;3       PlaneSR Tree
  KEY: TTree    tracknt;1       TrackSR Tree
root [2] TTree *tnt = tf.Get("tracknt");
root [3]
tnt->Draw("(uvzend[0]+uvzend[1])/sqrt(2.):(uvz[0]+uvz[1])/sqrt(2.)");
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [4]
tnt->Draw("(uvzend[0]+uvzend[1])/sqrt(2.):(uvz[0]+uvz[1])/sqrt(2.)","uvz[2]>0.
&& uvz[2]<14.7 && uvzend[2]>0. && uvzend[2]<14.7 &&
sqrt((uvz[0]+uvz[1])/sqrt(2.)*(uvz[0]+uvz[1])/sqrt(2.)+(uvz[0]-uvz[1])/sqrt(2.)*
(uvz[0]-uvz[1])/sqrt(2.))<4. &&
sqrt((uvzend[0]+uvzend[1])/sqrt(2.)*(uvzend[0]+uvzend[1])/sqrt(2.)+(uvzend[0]-uv
zend[1])/sqrt(2.)*(uvzend[0]-uvzend[1])/sqrt(2.))<4.","", 5104, 0);
 !!! User command too long !!!
root [5] .q



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET