RE: [ROOT] filling tree with objects

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jul 02 2003 - 18:37:17 MEST


Hi Paul,

This should work.

Did you create a dictionary for the namespace recocert?
	#pragma link C++ namespace recocert;


Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Paul Balm
Sent: Wednesday, July 02, 2003 8:07 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] filling tree with objects


Hello,

I'm trying to fill a TTree with objects of a class "V0", declared in a
namespace "recocert". I do this:

TTree* _mytree = new TTree("V0tree","secondary vertices");
V0* _myV0 = new V0();

_mytree->Branch("V0s", "recocert::V0",&_myV0);

This gives me an error message:

Error in <TTree::Bronch>: Cannot find class:recocert::V0

At first I was creating the branch like this:

_mytree->Branch("V0s", "V0",&_myV0);

(i.e. omitting the "recocert::"), this gave me the same error message,
but, without "recocert::".

In the same file where I create the tree and the branch, I have "using
namespace recocert;"

Any idea what the problem is here? Is this just not supported? Are there
ways to work around it?

I'm using this root version:
/D0/ups/root/Linux-2-4/v3_05_00bKCC_4_0-exception-opt-thread
On Red Hat 7.1.

Thanks!

Paul



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET