Re: [ROOT] Script

From: Norbert Danneberg (norbert.danneberg@psi.ch)
Date: Fri Jun 09 2000 - 19:55:41 MEST


Hi Alexey,

do root -b script.C

e.g without < !! Redirect

norbert

Alexey Toptygin wrote:

> Hi
>
> When I try to run the following code by doing:
>
> root -b <script.C
>
> I get:
>
> Limitation: Can't instantiate precompiled template >
> FILE:/tmp/fileG4CKti_cint LINE:15
> Error: G__getvariable: expression  FILE:/tmp/fileG4CKti_cint LINE:15
> Syntax Error: > FILE:/tmp/fileG4CKti_cint LINE:15
> Error: type > not defined FILE:/tmp/fileG4CKti_cint LINE:15
> *** Interpreter error recovered ***
>
> I can't see anything wrong. Do you know what's causing this?
>
> Here's the script:
>
> #include <fstream.h>
>
> {
>   Int_t i,j,x,y;
>   Char_t c,c1;
>   Float_t mean0,sdev0,mean1,sdev1;
>
>   ifstream old("pedestal.old",ios::in);
>   ifstream new("pedestal.new",ios::in);
>
>   TFile file("Comp.root","Recreate");
>   TNtuple nt("nt","Diffirence","inx:iny:diff");
>
>   for(j=0;j<56;j++){
>     for(i=0;i<12;i++){
>       old >> c >> c1 >> x >> y >> mean0 >> sdev0;
>       if((x!=i)||(y!=j)){
>         cerr << "Error 1" << endl;
>       }
>       new >> c >> c1 >> x >> y >> mean1 >> sdev1;
>       if((x!=i)||(y!=j)){
>         cerr << "Error 2" << endl;
>       }
>       nt.Fill(i,j,(mean1-mean0));
>     }
>   }
>   nt.Write();
>   file.Close();
>
>   old.close();
>   new.close();
> }
> .q

--

Norbert Danneberg

ETH Zurich - Institute for Particle Physics
  Laboratory for Nuclear Physics          Phone.: +41-1-633-2034
  Hoenggerberg                            Fax.:   +41-1-633-1067
  CH-8093 Zurich


ETH Zurich - Institute for Particle Physics
  Paul Scherrer Institute                 Phone.: +41-56-310-3284
  CH-5232 Villigen PSI                    Fax.:   +41-56-310-4362

email: Norbert.Danneberg@psi.ch



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET