Skip to content

Attempt to fix handling of Histos in ref files

Sebastien Ponce requested to merge sponce_fixHistoRefs into master

Original description :

The content of histograms was simply dropped when doing a ref update... I do not get how this was missed for so long, but it's now fixed.

Second round after more understanding :

Histogram checking has never been implemented properly. The only attempt had the problem described above but this was actually allowing us to work in more cases, hiding the big mess behind. So far here is what I found :

  • there are 2 types of histogram output, with different syntax but same header
  • one type (using ' | ' at start of line) is understood asa counter by the counter parsing
  • so it's handled twice : as a counter and as an histogram
  • and thus readded twice at the bottom of the ref file if histogram parsing is fixed
  • creating further troubles of histogram collision when we parse the ref and found it twice (and handle it 4 times of course...)
  • in all this, only 1D histogram are considered, 2D and 3D are forgotten (more or less, half of it but let's stop here)
  • TTree parsing was broken the same as histograms
  • and further broken as the regexp for finding the whole block was also wrong

In front of all this, and knowing we want to go to newer histograms in C++ and switch to structured output for all this, I've commented the addition of histograms at the end of ref files. De facto recreating (in a sane way) the situation we had so far.

Note that histograms are still checked (by mistake) if they are in "counter" shape, as part of counter checking.

@rmatev for info

Edited by Rosen Matev

Merge request reports