ClassDef version

Dear ROOTers
I read that after changes in my class structure I should increment ClassDef number. But let say that I would like to to something like this:

class A: public TObject{
protected:
Double_t A;
Double_t B;
Int_t C;
}

And I would like to have something like this:

class A: public TObject{
private:
Int_t C;
protected:
Double_t A;
Double_t B;
}

My question is: how ROOT handle with those changes. I made some simple tests and noticed than when I set A=1 B=2 C=3 write to tree, change ClassDef(1->2) and don’t change member names then my ROOT correctly find out that “protected C” is now “private C”. But when I change “protected C” into “private Cx” ROOT I get A=1 B=2 Cx=0 (default parameter from c-tor.
Does it mean that keeping the same name of member guarantee such “compatibility”? And how ROOT figure out that last member of class becomes first member?


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Yes.

Based on the name.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.