[ROOT] Speed issues with filling histograms in TSelector

From: Martin Turner (martin@hep.ph.liv.ac.uk)
Date: Mon Apr 15 2002 - 00:02:30 MEST


Hello ROOT experts, I have a seemingly twisted speed related bug when
using TSelector.
TSelector is called using a pre-defined selection from TEventList. Before
begin is called, but inside the TSelector script, there are 22 histograms
made on the heap with names and range etc. and another 18 are made in
TSelector::Begin().
It appears that my analysis macro takes a sweet 2 seconds to run provided
there are only 37 out of the 40 histograms filled. If there are 38 or
more, the job takes 32 seconds, which for a larger data sample makes my
script not very practical. This is the case even when I comment out
histograms that are not actually filled because they are dependent on a
particular flag in an if statement! Another related mystery is when I do a
cout<<.... in an if statement that is never passed, The time is takes for
my script to complete is comparable to the time it takes to complete if
the if statement does pass, yet I do not see the printout. Comment out the
cout statement and I'm back on 2 seconds. Has anyone got any idea what's
going on? I get the same problem running on two seperate computers with a
Linux and IRIS OS.

Another problem is when I have an array of TStrings that contain the title
of histograms. I make a for loop to fill an array of histograms and attach
the associated title as I go. If the loop is at the top before
TSelector::Begin(); it crashes. If it's inside TSelector::Begin() it
works. Why should it matter?

Thanks in advance

Martin



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET