Fix crash in TupleToolHerschel when multiple versions are present
TupleToolHerschel causes a crash without any error message when a file from a run with one calibration is followed by a file from another run with another calibration in the same job. @crsanche ran into the problem with files 00069074_00008083_1.ew.dst and 00069074_00010274_1.ew.dst from 2015.
The reason is that the name of the variable is changed depending on calibration. On the first J/psi->mumu event of these two files we have
log_hrc_fom_v5 = 5.62789
log_hrc_fom_B_v5 = 5.61727
log_hrc_fom_F_v5 = 1.07714
and
log_hrc_fom_v4 = -15.9944
log_hrc_fom_B_v4 = -17.4217
log_hrc_fom_F_v4 = -16.2688
This is a bug. A TupleTool should not crash. I suggest to add a variable that gives the version and remove it from the name of the log chi2.
Merge request reports
Activity
@cattanem, @masmith - this has broken
DecayTreeTuple.addTupleTool
for tools with::
or__
in their type and no given name. To reproduce:lb-run DaVinci/v45r6 python -c "from DecayTreeTuple.Configuration import DecayTreeTuple DecayTreeTuple('dtt').addTupleTool('LoKi::Hybrid::TupleTool')"
gives
AttributeError: '<class 'DecayTreeTupleBase.DecayTreeTupleBaseConf.DecayTreeTuple'>' object has no attribute 'LoKi__Hybrid__TupleTool'
The problem is that
DecayTreeTuple.addTool
gives the tool a different name when called with an instance rather than a type:from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool dtt = DecayTreeTuple('dtt') print(dtt.addTool(LoKi__Hybrid__TupleTool).getName()) print(dtt.addTool(LoKi__Hybrid__TupleTool()).getName())
outputs:
dtt.LoKi__Hybrid__TupleTool dtt.LoKi::Hybrid::TupleTool
I'm not sure the best fix in this case.
Thanks, I'll have a look.
Edited by Mark Smith
requested review from @johndan