Skip to content

[tmva][sofie] ParseMod validation for float/double never fires #21736

@harz05

Description

@harz05

Check duplicate issues.

  • Checked for duplicates

Description

In tmva/sofie_parsers/src/ParseBasicBinary.cxx, the validation meant to catch invalid use of fmod=0 with floating point inputs has two bugs that make it completely inoperative.

Line 121 checks FLOAT || FLOAT instead of FLOAT || DOUBLE:

if (input_type == ETensorType::FLOAT || input_type == ETensorType::FLOAT)

Reproducer

Found via code inspection. The two defects are directly visible in the source at tmva/sofie_parsers/src/ParseBasicBinary.cxx lines 121 and 123

ROOT version

6.39.01

Installation method

Built from source

Operating system

Linux (Ubuntu 22.04)

Additional context

On going through tmva/sofie_parsers/src/ParseBasicBinary.cxx you can see that the switch statement(line 129) already unconditionally uses FMod for FLOAT and DOUBLE inputs regardless of the fmod attribute value, so this validation block is also redundant. The fix could either be to correct the bug or simply remove the dead block entirely.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions