Skip to content

Problem with RDataFrame Alias when using . in the alias name. #22762

Description

@jminguezCern

Check duplicate issues.

  • Checked for duplicates

Description

When trying to use RDataFrame Alias using an alias that contains a . in the string the following error message is thrown:
RDataFrame::Alias: cannot define variation "reco.el_e_NOSYS_B". Not a valid C++ variable name.

This is because the function CheckValidCppVarName() checks if the new alias characters are either a letter, an underscore or a number. Since the . is not identified as a neither of these cases the error is thrown.

This was found when matching 2 trees and trying to alias a systematic variation column of the matched tree.
For example:
Original column in the matched tree: truth.variation_customName
Desired alias: truth.variation_commonName

Reproducer

The minimal reproducer can be found here in the following cern box link: https://cernbox.cern.ch/s/c12lOxGVx0vahWy

ROOT version

ROOT Version: 6.40.00
Built for linuxx8664gcc on May 26 2026, 15:56:51
From tags/v6-40-00@v6-40-00

Installation method

Build from source

Operating system

Ubuntu 25.10

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions