Object serialization and splitting

but in fact it cannot be transformed in such object I think. At least I cannot replace it by TTree

I was not clear enough.

Where as you do something like

SomeClass object;
....
directory->Write(&object);

I recommend you do:

SomeClass object;
....
TTree *t = new TTree("holder","just one entry");
t->SetDirectory(directory);
t->Branch("object.",&object); // Defaults to maximum splitting.
t->Fill();
t->GetFile()->Write();
delete t;  // or reuse.

Cheers,
Philippe.

1 Like