Hi, You need to declare the typedef to CINT. For example Add to your linkdef file #pragma link C++ typedef UHTTrkListType; Cheers, Philippe -----Original Message----- From: owner-about-root@listserv.fnal.gov [mailto:owner-about-root@listserv.fnal.gov] On Behalf Of j.rademacker1@physics.ox.ac.uk Sent: Thursday, November 11, 2004 12:21 PM To: cdf_software_help@fnal.gov; about-root@fnal.gov; roottalk@root.cern.ch Subject: root trees Hi I'm trying to write an object I have to a root file, from within root. I compile my code with the + option and then run it in batch mode. In my class header, I have the ClassDef macro, and in my .C file the correspondig ClassImp macro. I have that for all classes involved, and the class I want to save inherits from TObject (other classes that are members of this one don't inherit from TObject, but I guess that doesn't matter?). Everything compiles fine. My program even produces a non-empty output file. But when I want to read it back in, I get the following run-time error: ========================================================== Warning in <TStreamerInfo::BuildOld>: Cannot convert UHTDecay::stableParts from type:vector< UHTTrack> to type:UHTTrkListType, skip element ========================================================== Now UHTTrkListType is just a typedef for std::vector<UHTTrack>. So there is no conversion to be done. What am I doing wrong? Can I use typedefs at all? And vectors? If so, how do I get root to know about them? Thanks a lot! Jonas -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Jonas Rademacker, Denys Wilkinson Bldg, Keble Road, Oxford OX1 3RH, UK Tel: +44-1865-273410 Fax: +44-1865-273418
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET