Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9701

IO read rules no longer executed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: master, 6.14/02, 6.14/04
    • Fix Version/s: 6.16/00, 6.14/06
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      CC7, devtoolset-7, several versions of ROOT

      Description

      In the attached example the read rule is not executed since ROOT version 6.14.02, this was still working in 6.14.00. The class Data contains an integer that should be stored, an transient integer, and a vector of a split-able class Sub. When reading a Data object, the transient variable should be calculated from the other integer, there is a corresponding read rule. The objects are stored in a TTree. For this test to be (non-)working, it seems to be important that in addition to the integer values also the vector of a split-able class is filled. If Sub is not split-able, or if the corresponding vector is empty, the read rule is executed as expected. The read rule is also executed if splitting is entirely switched off.

      To compile the test a simply make should be working. The expected output is

      tree entry 0 contains 1 entries, the entry number times two is 0
      tree entry 1 contains 2 entries, the entry number times two is 2
      tree entry 2 contains 3 entries, the entry number times two is 4
      tree entry 3 contains 4 entries, the entry number times two is 6
      tree entry 4 contains 5 entries, the entry number times two is 8
      tree entry 5 contains 6 entries, the entry number times two is 10
      tree entry 6 contains 7 entries, the entry number times two is 12
      tree entry 7 contains 8 entries, the entry number times two is 14
      tree entry 8 contains 9 entries, the entry number times two is 16
      tree entry 9 contains 10 entries, the entry number times two is 18
      

      the output from ROOT 6.14.02 and later is

      tree entry 0 contains 1 entries, the entry number times two is 0
      tree entry 1 contains 2 entries, the entry number times two is 0
      tree entry 2 contains 3 entries, the entry number times two is 0
      tree entry 3 contains 4 entries, the entry number times two is 0
      tree entry 4 contains 5 entries, the entry number times two is 0
      tree entry 5 contains 6 entries, the entry number times two is 0
      tree entry 6 contains 7 entries, the entry number times two is 0
      tree entry 7 contains 8 entries, the entry number times two is 0
      tree entry 8 contains 9 entries, the entry number times two is 0
      tree entry 9 contains 10 entries, the entry number times two is 0
      

        Attachments

        1. Data.h
          0.3 kB
        2. linkdef.h
          0.4 kB
        3. Makefile
          0.3 kB
        4. read.cc
          0.6 kB
        5. write.cc
          0.5 kB

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              suhl Sebastian Uhl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual Start:
                Actual End: