Skip to content

Commit

Permalink
[tree] Ensure branch names are C++ variable names
Browse files Browse the repository at this point in the history
* [tree] valid branch names or filenames does not ensure valid C++ variable names

So convert wherever need in produced selector code

Fixes https://its.cern.ch/jira/browse/ROOT-8775

* simplify

thanks to silverweed

* [tree] reuse map-cpp-name function from clingutils

as suggested by dpiparo

* [tree] clarify variable names

as suggested by pcanal

* [tree] clarify variable names

as suggested by pcanal

* [core] clarify warning
  • Loading branch information
ferdymercury authored Nov 21, 2024
1 parent 0ca0432 commit 832b0c0
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 75 deletions.
2 changes: 2 additions & 0 deletions tree/treeplayer/inc/TTreeReaderGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class TLeaf;
namespace ROOT {
namespace Internal {

TString GetCppName(TString name);

/// 0 for the general case, 1 when this a split clases inside a TClonesArray,
/// 2 when this is a split classes inside an STL container.
enum ELocation { kOut=0, kClones, kSTL };
Expand Down
Loading

0 comments on commit 832b0c0

Please sign in to comment.