CINT for loop problem

From: OKUMURA, Akira <oxon_at_astro.isas.jaxa.jp>
Date: Wed, 11 Aug 2010 19:47:53 -0700


Hello ROOTers,

The following macro does not run in CINT, while it is a very simple code. If you use ACLiC or comment out the line of an array declaration, it runs as I expected. Does anyone have a workaround?



#include "TH2.h"
#include <iostream>

void tmp()
{
  TH2D h("", "", 100, 0, 1, 100, 0, 1);
  for(int y = 1; y <= h.GetYaxis()->GetNbins(); y++){     for(int x = 1; x <= h.GetXaxis()->GetNbins(); x++){

      std::cout << x << "\t" << y << std::endl;
      if(h.GetBinContent(x, y) == 0){
	continue;
      } // if
      Double_t pix[2] = {x, y}; // the macro runs if you comment out this line
    } // x
  } // y
}

Regards,

--
OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
Institute of Space and Astronautical Science (ISAS/JAXA)
Now at KIPAC/SLAC/Stanford
Varian Physics #306
382 Via Pueblo Mall, MC 406 Stanford, CA94305
TEL 650-736-0971/FAX 650-724-5065
Skype : okumura.akira
Received on Thu Aug 12 2010 - 04:48:12 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 12 2010 - 11:50:01 CEST