Hi Rene,
thanks for the answer but I am afraid that I did not describe my problem
properly.
Following the example I reported in previous email, let's say that I
need to create and save a TTree with a branch filled with objects of the
class B (the embedded class).
Do I need to use the ClassDef statement explicitly for the embedded
class in this case?
Thanks and regards.
Alberto
Rene Brun wrote:
> Alberto,
>
> You can leave your ClassDef statements in all the classes,
> or only on some classes, or remove ClassDef completly.
>
> ClassDef is mainly used by THtml. In case of automatic schema
> evolution, the read mechanism is a bit faster if you use ClassDef.
>
> Rene Brun
>
> On Tue, 18 Oct 2005, Alberto Pulvirenti wrote:
>
>> Dear Rooters,
>>
>> I am creating a small compiled library as a new ROOT class with its
>> dictionary definition.
>> In particular, the structure should be a class with some other
>> classes embedded into it.
>> If I wont to store into a TTree some data in the format of one of the
>> embedded classes, do I need to include a ClassDef statement in *each*
>> embedded class, or it is enough to put one in the "mother" class?
>>
>> In other words, should I do like this (1)
>>
>> class A : public TObject {
>> ...
>> public:
>>
>> class B : public TObject {
>> public:
>> ...
>> private:
>> ...
>> ClassDef(B,1)
>> };
>>
>> ...
>> private:
>> ...
>>
>> ClassDef(A,1)
>> };
>>
>> ... or like this (2)
>>
>> class A : public TObject {
>> ...
>> public:
>>
>> class B : public TObject {
>> public:
>> ...
>> private:
>> ...
>> };
>>
>> ...
>> private:
>> ...
>>
>> ClassDef(A,1)
>> };
>>
>> Thanks,
>>
>> Alberto
>>
Received on Tue Oct 18 2005 - 16:36:47 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET