[ROOT] typedefs

From: j.rademacker1@physics.ox.ac.uk
Date: Mon Nov 15 2004 - 20:22:30 MET


Hi

I made a lot of progress in my attempts to save and retrieve data to and
from a root file (Thanks Philippe!), but there is still one thing that
doesn't work, and that is handling typedefs. The symptoms are that

 o my code compiles fine
 o it saves the data to a file
 o when I want to read them, it comlains that it cannot convert a
   list<UHTDecay> to a UHTDecayList, although UHTDecayList is just a
   typedef of list<UHTDecay>.
 o Oddly, when I read the file in the same program where I write it, it
   works fine. I only have problems if I first write it, and then want
   to read it back in at another time (which is of course the point of storing
   things in a file).

 I suspect that I don't declare the typedefs right. I use ACliC to
compile my code and don't have any makefiles, LinkDef.h, etc. I put my
__CINT__ statements into my header files. They look like this:

#ifdef __MAKECINT__
#pragma link C++ typedef UHTPolyProb;
#pragma link C++ typedef UHTDecay::intervListType;
#pragma link C++ typedef UHTDecay::listOfListsType;
#pragma link C++ typedef UHTDecay::TrkIndexSetList;
#pragma link C++ typedef UHTDecay::TrkProb;
#pragma link C++ typedef UHTDecay::TrkProbList;
#pragma link C++ typedef DecayListType;
#pragma link C++ class std::set<int>+;
//#pragma link C++ class std::pair<double, double>+;
#pragma link C++ class UHTDecay::intervType+;
#pragma link C++ class std::list< UHTDecay::intervType >+;
#pragma link C++ class std::vector< std::list< UHTDecay::intervType >
>+;
#pragma link C++ class UHTDecay::TrkIndexSet+;
#pragma link C++ class std::list< UHTDecay::TrkIndexSet >+;
#pragma link C++ class std::pair< UHTDecay::TrkIndexSet,
UHTPolyWithBool<int> >+
;
#pragma link C++ class std::list<UHTLxyCut>+;
#pragma link C++ class UHTDecay+;
#pragma link C++ class std::list<UHTDecay>+;
#pragma link C++ class DecayListType+;
#endif

Greateful for any ideas,

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