Skip to content
Snippets Groups Projects
Commit 41a999e6 authored by Philippe Canal's avatar Philippe Canal
Browse files

Add proper support for writing in the presence of io rules.

In the case a read rule applies to the current StreamerInfo,
which is used for writing, there was no good StreamerElement
describing the location and means to write the data member
(unless there was a repating element).

Now, in this case we introduce yet another StreamerElement
and mark it as a 'Write' element.  We also ignore it in
the 'right' places and similarly ignore the caching and
artificial element when writing.

For example with writeTree.C in roottest/root/io/datamodelevolution/misc
we get:

StreamerInfo for class: MyClass, version=1, checksum=0x36b5f1f8
  MyClass@@1     @@alloc         offset=  0 type=1001
  TObject        BASE            offset=  0 type=66 Basic ROOT object
  TObjArray      fArray          offset= 24 type=61  (cached)
  TObjArray      fArray          offset=  0 type=61  (write)
  TObjArray      fArray          offset= 16 type=1000
  MyClass@@1     @@dealloc       offset=  0 type=1002
   i= 0, @@alloc         type=1001, offset=  0, len=1, method=0
   i= 1, TObject         type= 66, offset=  0, len=1, method=0
   i= 2, fArray          type= 61, offset= 24, len=1, method=0 [cached]
   i= 3, fArray          type= 61, offset=  0, len=1, method=0 [write]
   i= 4, fArray          type=1000, offset= 16, len=1, method=0
   i= 5, @@dealloc       type=1002, offset=  0, len=1, method=0
(cherry picked from commit c7e58492)
parent 2ad754a8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment