Hoe to use CompileVariables on root v5.08

Hi,
I have a program on root v2.23 and I’m trying to update it to root v5.08 on AIX v5.3.
I have a problem on the statement at :6 of the following code, because the method CompileVariables is now defined in the class TSelectorDraw (it was defined in the class TTreePlayer in root v2.23) and it is protected.
I can I use it now, how can I write the :6 statement in order to use that method?
I tried also to extend TTree in order to include TSelectorDraw class, but the multiple inheritance could in that case generate problems (variables with the same name…).

1: Generic_function(TTree *tr, Text_t *varexp, Float_t *fx, Float_t *fy)
2: {
3: Int_t Nevent = (Int_t)tr->GetEntries();
4: Float_t *x = new Float_t[Nevent];
5: Float_t y = new Float_t[Nevent];
6: ((TTreePlayer
)tr->GetPlayer())->CompileVariables(varexp, “”);

Really thank you,
Best,
Salvatore.