RE: problem with ROOT 5.08 on SolarisCC5

From: Philippe Canal <>
Date: Tue, 04 Apr 2006 10:07:07 -0500


I can reproduce the problem and will work on fixing it. In the meantime, you can work-around the problem by either compiling your script (simple via ACLiC) or by disabling the CINT byte-code optimization (CINT's command: .O 0).


-----Original Message-----
From: [] On Behalf Of Fechner Maximilien
Sent: Monday, April 03, 2006 9:46 AM
Subject: [ROOT] problem with ROOT 5.08 on SolarisCC5

Dear ROOT-ers,

I've come across the following strange behaviour.

I stored 500 'events' in a tree.
This is the relevant part :

   for (int i = 0 ; i< 500 ; i++) {

     count = ((float)i)*1.02;


Then I select events with count>200. :

const float qcut = 200.0;
  for( int i = 0; i < nevts; i++) {
    if (count > qcut){

On an intel machine (normal behaviour) the output is :   Total number of events = 500
Selected events: 303
(ROOT v4.04/f

Using ROOT Version 5.08/00, 13 December 2005, on a SUN machine running SunOS 5.8,
SUN CC compiler version 5.3
Compiled on 19 December 2005 for solarisCC5, the result is :   Total number of events = 501
Selected events: 477
--> meaning events for which count is obviously <200. still get selected
(+ ROOT apparently sees an extra event...).

Strangely enough I also noticed that variable "bool a = (count>qcut);" is correctly filled (ie 1 when count>200.). Replacing the if statement with "if (a) {..." solves the problem. e.g.

const float qcut = 200.0;
  for( int i = 0; i < nevts; i++) {
    bool a = (count>qcut);
    if (a){
      cout << "*" << count << endl;

However in a more complicated version of this macro (attached to this message), in which I fill histograms in the loop, this still gives me the wrong answer unless I add a statement between the declaration of 'a' and the 'if' statement (apparently any statement will do).

I've attached a simple program to build the tree and the macro to read it (2 versions). I'd greatly appreciate your help.

Thanking you in advance,
Maximilien Fechner Received on Tue Apr 04 2006 - 17:11:28 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET