Re: Gross CINT runtime error

From: Christian Holm Christensen <cholm_at_nbi.dk>
Date: Tue, 28 Aug 2007 02:23:04 +0200


Hi,

On Mon, 2007-08-27 at 17:03 -0500, Tom Roberts wrote:
> .O [0123] all work, .O 4 fails as before. This works after loading the
> script but before pressing the buttons, so for now I'm going to put
> gROOT->ProcessLine(".O 3"); into my script.
>
> Re-structuring the code to avoid cascaded signals did not affect the
> problem.

How about if you do post-increments rather than pre-increments?

        int ntotal=0;
        for(int j=0; j<nNtuples; j++) {
          TNtuple *ntuple = ntuples[j];
          ntotal += ntuple->GetEntries();
        }

rather than

        int ntotal=0;
        for(int j=0; j<nNtuples; ++j) {
          TNtuple *ntuple = ntuples[j];
          ntotal += ntuple->GetEntries();
        }


> I'd rather not compile my script, as I want to support it on all OSs,
> and compiling it is an extra hassle. I tried simply running root and
> doing ".X HistoRoot.C+", but it gets a zillion errors because there are
> no #includes (well, just 1 to load the GUI library).

I think Phillipe was suggesting using Aclic to compile the script, by doing

        .x foo.C+
        

The attached script works on my Debian GNU/Linux sid box with ROOT 5.16/00.

> > printf("scan total entries C: j=%d\n",j); fflush(stdout);

I don't think the `fflush' is really needed here. I think `printf' should flush the output if it sees a '\n'. Anyways, you should be using the C++ iostream library instead :-)

Yours,

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:   cholm_at_nbi.dk               Web:    www.nbi.dk/~cholm
 | |

Received on Tue Aug 28 2007 - 02:23:11 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 28 2007 - 11:50:04 CEST