Re: Medley of questions

Rene Brun (Rene.Brun@cern.ch)
Mon, 09 Jun 1997 09:16:59 +0200


Chris Green wrote:
>
> Hi,
>
> These comments concern root v1.01/4 and (where applicable) the 1.00
> documentation (haven't wasted another tree, yet, so apologies if my
> comments conerning this have already been addressed):
>
> 1) -- easy one first -- The error message triggered by trying to add two
> histograms with different numbers of bins has a typo -- it says `Attemp'
> rather than `Attempt'. It's also not clear what actually happens in this
> case -- are the bins added anyway, and if so, how many bins does the new
> histogram have -- the same as the smaller histogram, or the same as the
> larger? An extra line clarifying what happens probably wouldn't go amiss.

Thanks for reporting the typo.
When an error is reported by the functions adding, multiplying, dividing
histograms, no action is taken. The operation is not performed.

>
> 2) GetBinLowEdge and related functions don't give well-defined responses
> if you specify a bin which doesn't exist in the histogram -- they give an
> answer (which is presumably what would have been the right answer had
> their been that many bins) with no error message. Is this the intended
> behaviour, or is some trapping required?

These functions are protected internally to avoid floating point operand
errors. Otherwise they behave as you say. Which value should be returned ?
The point is that if in your code, you add a test for a special return
value from the ROOT functions, very likely you have already protected
the input parameter !

>
> 3) Now we're getting nasty: TTree::Select(). The 1.00 documentation is
> sparse to the point of confusion, and the function doesn't work --
> certainly as I interpret the documentation, anyway. I would expect lines
> of the form
>
> TEventList *elist = T->Select("mu==-100")
>
> to a return an eventlist giving me the numbers of all events where the key
> mu has value -100. Instead I get the NULL pointer despite the fact I
> *know* entries with this key value exist. Connected with this, the
> documentation on selectors a) doesn't explain what they are or what they
> do, and b) isn't clear about whether this is a function a normal user
> would want to use (and under what circumstances), or if it is mainly (or
> exclusively) for the internal gubbins of TTree and related classes (in
> which case why isn't it protected?).
>

That is what this function should do ! It returns NULL currently.
The class TEventList is already implemented. However, we did not announce
this class yet because we still need to finish its adaptation to some
TTree functions (Select, Draw) and in particular the TChain system.
I hope to finish the implementation for the release of 1.01.

> Finally, an easy one -- have macro search paths been implemented yet? If
> so, how are they set, and if not, is this in the pipeline?

Macro search paths are not yet implemented. In the pipeline!

Rene Brun