Hi, Also, currently, namespace and nested class are not supported by the StreamerInfo facility. Thus it is not possible (yet) to read those file without the original shared library. Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Axel Naumann Sent: Tuesday, April 17, 2001 3:48 PM To: Roottalk@Pcroot. Cern. Ch Subject: [ROOT] Again: namespaces and dictionaries Hi, I have two sets of classes, both have their own dictionary generated seperatly. Everything works fine. I'm using Root 3.06. Now I add a namespace for all my classes. I change both linkdefs to the following (here's just one linkdef, the other looks the same, just with other classes): --- #ifndef _INCLUDE_LINKDEF #define _INCLUDE_LINKDEF #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ nestedclass; // added for namespace #pragma link C++ nestedtypedef; // added for namespace #pragma link C++ namespace d0nau; // added for namespace #pragma link C++ class d0nau::TEventSample-; #pragma link C++ class d0nau::TEventSampleInfo+; #pragma link C++ class d0nau; // added for namespace #endif #endif --- Now that works fine for writing the data (Streamer out). But when reading the data back (within another program, linking against the same class library with the same dictionaries as the streamer out program) I get the following errors (with the output from TClassTable above to prove that Root knows the classes): --- Defined classes class version bits initialized ============================================================= [...] d0nau::TCaloJet 1 4 No d0nau::TDataObj 1 1 No d0nau::TDataObjIter 1 1 No d0nau::TDataObjList 1 4 No d0nau::TEvent 1 4 No d0nau::TEventSample 1 1 No d0nau::TEventSampleInfo 1 4 No d0nau::TJet 1 4 No d0nau::TKinemObj 1 4 No d0nau::TPrecisionValue 1 4 No ------------------------------------------------------------- Total classes: 181 initialized: 0 ============================================================= Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TDataObj is availabl e Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TJet is available Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TKinemObj is availab le Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TEventSample is avai lable Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TEventSampleInfo is available Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TEvent is available Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TDataObjList is avai lable Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TCaloJet is availabl e Error: class,struct,union or type d0nau not defined FILE: LINE:0 Error: class,struct,union or type d0nau not defined FILE: LINE:0 Warning in <TClass::TClass>: no dictionary for class d0nau::TPrecisionValue is a vailable Error in <TKey::ReadObj>: Cannot create new object of class d0nau::TEventSample Error: TEventSample::Load: Could not load entry 'NIKHEFEventSample' in root file ! --- The ClassDef/Imp macros look like this: namespace d0nau{ ... ClassDef( TEventSample, 1 ) ... }; using namespace d0nau; ClassImp( TEventSample ) This doesn't help: ClassImp( d0nau::TEventSample ) using namespace d0nau; nor does this: ClassImp2( d0nau, TEventSample ) using namespace d0nau; So what's the right way to do it? What might be wrong here? Why does streamer out work (and it does, I have some streamer stats that tell me how often a streamer has been called for a certain class, and my classes have member classes, and their streamers are called correctly, too, so the whole ShowMembers->Streamer stuff works) but not Streamer in? I had a look at the map file: All the methods I expected to exist do exist, even with the correct namespace. So how can I debug this? How can I find out what's wrong and what's going on? Thanks for any help in advance, regards, Axel.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:49 MET