[ROOT] Pointer to member problem.

From: Ricardo Eusebi (eusebi@fnal.gov)
Date: Sun Feb 08 2004 - 04:13:57 MET


Hi,
I'm running Root  Version   3.05/04 on a Linux  2.4.20-24.7s  machine.
I'm trying to make a class(Cut)  that will be fed with  the pointer to 
another class' method. This class will later execute the other class 
method and keep track of statistics.
At compiling time  I'm getting an error I can't get around.
The  class follows

class LJets;
class Cut {

 public :
    Cut() { /* default Ctor */ };
    void  Cut2(Bool_t (LJets::*Member)(Int_t));

    // Classdef ID 0 because I don't input output
    ClassDef(Cut,0)
};

ClassImp(Cut)
void Cut::Cut2(Bool_t(LJets::*Member)(Int_t))  { /* nothing for now */ }


When compiling I get :
root [0] .L ~/root_macros/LJets/Cut.h++
Info in <TUnixSystem::ACLiC>: creating shared library 
/home/people/eusebi/root_macros/LJets/Cut_h.so
"/home/people/eusebi/root_macros/LJets/fileZuTOLg.cxx", line 229: error 
#167:
          argument of type "Bool_t (*)(Int_t)" is incompatible with 
parameter
          of type "Bool_t (LJets::*)(Int_t)"
        ((Cut*)(G__getstructoffset()))->Cut2((Bool_t 
(*)(Int_t))G__int(libp->para[0]));

What does it mean ?
Can I get around this in root ??

Thanks in advance,

Ricardo

-- 
  --------------------------------------------------------------------
| Ricardo Eusebi                |   Office :  CDF trailer 168-"O"    |
| High Energy Physics           |   Phone  : (630) 840 8622          |
| University of Rochester       |   email  : eusebi@fnal.gov         |
  --------------------------------------------------------------------
|               Fermi National Accelerator Laboratory                |
|                    CDF - MS318 .  PO Box 500                       |
|                     Batavia 60510, Illinois.                       |
  --------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET