I have two simple classes with pointers to each other:
A a1; B b1;
a1 has a pointer to b1. b1 has a pointer to a1.
Is it true that:
“Objects that are pointed
to by a raw pointer are save uniquely in a ‘single I/O operation’.”?
So if i will try to write object “a1” to the single branch without
splitting i must obtaine precisely same result as I will write to
TFile directly by TFile::WriteObject(). I mean that after reading(one
IO operation) it will be allocated only one object “a1” and “b1”.
Is it true or not? Or it is more complicated?
see TRef class description at:
From TRef class description:
[quote]When a top level object (eg Event *event) is a tree/graph of many objects,
the normal ROOT Streaming mechanism ensures that only one copy of each object
in the tree/graph is written to the output buffer to avoid circular
However if the object event is split into several files or into several
branches of one or more Trees, normal C++ pointers cannot be used because
each I/O operation will write the referenced objects.[/quote]
So in the documentation I see that if I disable splitting than
"the normal ROOT Streaming mechanism ensures that only one copy of each object is written to the output buffer".
What limitation of this statement?
In the message
one of the solutions in same problem was:
a) Do not split the branch at all
this would prevent reading only part of the tree[/quote]
Is it the working solution? Will be any problem in the current version of ROOT?
Execuse me if I lose sight of something.