TDSet from TChain problem

root [0] TChain chain("PAUReco","PAUReco")
root [1] chain.Add("reduced.root")
(Int_t)1
root [2] TDSet *set = new TDSet(&chain, 0)
Error: Can't call TDSet::TDSet(&chain,0) in current scope (tmpfile):1:
Possible candidates are...
(in TDSet)
/gpfs/users/proof/root/lib/libProof.so  -1:-1   0 private: TDSet TDSet::TDSet(const TDSet&); //not implemented
/gpfs/users/proof/root/lib/libProof.so  -1:-1   0 public: TDSet TDSet::TDSet(void);
/gpfs/users/proof/root/lib/libProof.so  -1:-1   0 public: TDSet TDSet::TDSet(const char* name,const char* objname="*",const char* dir="/",const char* type=0);
/gpfs/users/proof/root/lib/libProof.so  -1:-1   0 public: TDSet TDSet::TDSet(const TChain& chain,Bool_t withfriends=kTRUE);
*** Interpreter error recovered ***
*** Interpreter error recovered ***

where am I wrong? Thanks

[quote=“wiso”] root [0] TChain chain("PAUReco","PAUReco") root [1] chain.Add("reduced.root") (Int_t)1 root [2] TDSet *set = new TDSet(&chain, 0) Error: Can't call TDSet::TDSet(&chain,0) in current scope (tmpfile):1: Possible candidates are... (in TDSet) /gpfs/users/proof/root/lib/libProof.so -1:-1 0 private: TDSet TDSet::TDSet(const TDSet&); //not implemented /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(void); /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(const char* name,const char* objname="*",const char* dir="/",const char* type=0); /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(const TChain& chain,Bool_t withfriends=kTRUE); *** Interpreter error recovered *** *** Interpreter error recovered ***

where am I wrong? Thanks[/quote]
why do you use “chain” as a reference
TDSet *set = new TDSet(&chain, 0)
if you want to call this one
TDSet::TDSet(const TChain& chain,Bool_t withfriends=kTRUE);
?

[quote=“anar”][quote=“wiso”] root [0] TChain chain("PAUReco","PAUReco") root [1] chain.Add("reduced.root") (Int_t)1 root [2] TDSet *set = new TDSet(&chain, 0) Error: Can't call TDSet::TDSet(&chain,0) in current scope (tmpfile):1: Possible candidates are... (in TDSet) /gpfs/users/proof/root/lib/libProof.so -1:-1 0 private: TDSet TDSet::TDSet(const TDSet&); //not implemented /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(void); /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(const char* name,const char* objname="*",const char* dir="/",const char* type=0); /gpfs/users/proof/root/lib/libProof.so -1:-1 0 public: TDSet TDSet::TDSet(const TChain& chain,Bool_t withfriends=kTRUE); *** Interpreter error recovered *** *** Interpreter error recovered ***

where am I wrong? Thanks[/quote]
why do you use “chain” as a reference
TDSet *set = new TDSet(&chain, 0)
if you want to call this one
TDSet::TDSet(const TChain& chain,Bool_t withfriends=kTRUE);
?[/quote]

Sorry, all my apologies. I’m working too much, I need a break.

[quote=“wiso”]
Sorry, all my apologies. I’m working too much, I need a break.[/quote]
No need to be sorry. It happens with everyone :wink: