Adapt to ROOT6 interface changes
Merge pull request #5082 from wmtan/AddOrRemoveConst

Adapt to ROOT6 interface changes by adding or removing const qualifiers