Re: [ROOT] location of the ClassDef

From: Jiri Masik (masik@fzu.cz)
Date: Thu Oct 30 2003 - 16:08:04 MET


Ingo Strauch <strauch@mail.desy.de> writes:

> Jiri Masik wrote:
>> 
>> I have written an interface to the pdflib library. While Root is not
>> necessary for its function I'd like to extend it by some features if
>> Root is available on a given system. So I have the following lines
>> 
>> class PDFSet
>> #ifdef HAVE_ROOT
>>   : public TObject
>> #endif
>> {
>> 
>> public:
>>   PDFSet();           //keep the currently set PDF
>>   PDFSet(Int_t Type, Int_t Group, Int_t Set); //set PDF
>> 
>>   ~PDFSet();
>> private:
>>   UShort_t fType;        // PDF type
>>   UShort_t fGroup;       // PDF group
>>   UShort_t fSet;         // PDF set
>> 
>> #ifdef HAVE_ROOT
>>   ClassDef(PDFSet,1)
>> #endif
>> };
>> 
>> It probably fails due to the limitation on the position of the
>> ClassDef macro which has to be on the last line before };.
>
> Although I think I remember it's stated that way somewhere this is not
> entirely true. I guess it's just an advice to avoid unnecessary hassle
> ;-)
>
>
>> If it is
>> surrounded by #ifdef/#endif there is an unresolved reference
>> PDFSet::ShowMembers(TMemberInspector&, char*) whenever I attempt to
>> load the library into Root. Is there a way around this?
>
> Do you have the corresponding ClassImp in the .C file?
>

Yes I have. It worked without the #ifdef/#endif pair. As Maarten and
Vincent pointed out the problem can be avoided by using conditionals
more cleverly.  Thanks to those who replied.
cheers

Jiri



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