TTree:MakeClass

Today I’ve found this method, and I think it’s very userful, but I’ve a problem with brach name.

In my tree there are Branches called: “L0_DiMuon,down”, “L0_electron,down”, … the problem is the comma “,”

when I call MakeClass it creates a code like:

Int_t L0_DiMuon;
Int_t L0_DiMuon,down;
Int_t L0_Electron;
Int_t L0_Electron,down;

fChain->SetBranchAddress(“L0_DiMuon”, &L0_DiMuon, &b_L0_DiMuon);
fChain->SetBranchAddress(“L0_DiMuon,down”, &L0_DiMuon,down, &b_L0_DiMuon,down);

can someone fix this? I can’t rename the branch name without using commas.

In the SVN trunk, I have added “’” to the list of special characters replaced by “_”.
It is in general a very bad cidea to use special characters in object names. This prevents an easy translation to C++ variable names, pointers or key names.

Rene

[quote=“brun”]In the SVN trunk, I have added “,” to the list of special characters replaced by “_”.
It is in general a very bad cidea to use special characters in object names. This prevents an easy translation to C++ variable names, pointers or key names.

Rene[/quote]

I agree, but I can’t (want) modify the TTree. Can you fix the problem for all special characters and so on? Maybe a simple regex can fix the problem.

if you read my mail, i told you that I added the treatment of the “,” character. Did you try?
I am not planning to make more changes in this area. It is likely that in a coming version we will check for special characters in the branch names.
So you better change your code now.

Rene

[quote=“brun”]if you read my mail, i told you that I added the treatment of the “,” character. Did you try?
I am not planning to make more changes in this area. It is likely that in a coming version we will check for special characters in the branch names.
So you better change your code now.

Rene[/quote]

Ok, sorry but in your post you say ’ instead of , and I didn’t understand. Thanks