Version: 4.02
Hardware: ATHLON MP
OS: linux Fedora 3
Severity: normal
Reproducable: always
The following commands differ in brackets around logical AND.
They produce different histograms
h4 is a root tree with CWN ntuple in it.
I am plotting adc1 for those events when det equals 9 and bits 1 and 17 of
fera_reg are 1.
Obviously logic is screwed up if I do not put brackets around logical AND.
h4->Draw(“adc1”,"det == 9 && ((fera_reg & 1) == 1) && (fera_reg & pow(2.0,17) == pow(2.0,17)) ")
h4->Draw(“adc1”,"det == 9 && ((fera_reg & 1) == 1) && ( (fera_reg & pow(2.0,17)) == pow(2.0,17)) ")
By the way , how can I check bits in a word without calculating 2 to 17 order ?