THtml and namespace trouble

Hi ROOTERS

I am running on a Mandriva 2006 64 bits linux box (gcc 4.0.1, kernel 2.6) with Intel Xeon processor. ROOT version is 5.15/04.

I cannot (or don’t know how to ) generate HTML documentation for a class in a namespace.

Assuming I have the following class BestInTown

In the header file I have

[i]class BestInTown: public TObject
{
public:
BestInTown() ;
~BestInTown() ;

void  setValue(Int_t value);

private:
Int_t best_ ; // really, no kidding

ClassDef(BestInTown, 1);

};[/i]

and the implementation file

[i]ClassImp(BestInTown);

BestInTown::BestInTown() : TObject(), best_(0)
{

}

BestInTown::~BestInTown()
{
// nothing to do
}

void
BestInTown::setValue(Int_t value)
{
// plain affectation
// no value check
best_ = value;
}
[/i]
with the LinkDef.h

[i]#ifdef CINT
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all function;

#pragma link C++ class BestInTown+ ;

#endif[/i]

Following the THtml online documentation, I am able to generate the class documentation and everything is fine: attributes and class methods are documented nicely.
Now, since I know some other people claim to have designed their own BestInTown class, I put mine in a namespace BestLab (they wouldn’t dare to do the same)

and essentially

  1. I just surround my class declaration with a namespace BestLab { // class declaration goes here}. No change to ClassDef since it is inside the namespace
  2. in my implementation file I change the ClassImp with ClassImp(BestLab::BestInTown) and surround the set of methods with namespace BestLab { // all methods go here}
  3. in my LinkDef. h file I just add the line
    #pragma link C++ namespace BestLab+;
    and change the line for the class
    #pragma link C++ class BestLab::BestInTown+ ;

If I do that, everything compile nicely, cint understand the class and namespace (nice!) but the documentation is completely wrong (no method comments, no public inheritance, no attribute comments).
What I am doing wrong? Or may be the THtml doesn’t yet handle namespaces?

Thank for your help.

Hi,

I cannot reproduce this; classes inside namespaces work for me. Could you send me your actual code? You can email me at Axel.Naumann@cern.ch if you want.

Axel.

Hi Axel

Sorry to have bothered you with that. The problem was in my Makefile. I fixed it and it works fine now.

Thanks for your help