Hello,
I use ROOT 3.05/07 with gcc 2.96 in lxplus. I am trying to define a
logical cut for a histogram. The variable c_site is an array of chars. I
tried using the cut "strcmp(c_site,\"RM1\") != 0", but this does not work.
I get an empty pad instead of a histogram.
I have also tried "c_site == \"RM1\"", but this too does not work. This
behavior is more puzzling. Without the cut, I have 7 entries. When I add
the cut, the number of entries jumps to 140, though the histogram looks
the same and the mean does not change.
Here is my draw command with the cut:
tree->Draw("c_theta_x_p_mean[0]:c_serial_no>>h1_2_1",
"c_theta_x_p_mean[0] > -9000" && cut,"BOX");
where cut = "c_site == \"RM1\"";
and here is the command without:
tree->Draw("c_theta_x_p_mean[0]:c_serial_no>>h1_2_1",
"c_theta_x_p_mean[0] > -9000","BOX");
The ROOT file is too large to attach to the message, but I can send it
along with my code on request. I have, however, attached the two
histograms so that it is possible to see this behavior.
Cheers,
Chris
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET