Skip to content

Conversion StreamerInfo not properly found if classes are unversioned. #14491

Open
@pcanal

Description

@pcanal

Check duplicate issues.

  • Checked for duplicates

Description

When a class is schema evoled (see reproducer) using a renaming rules

At least on line 1258 of StreamerInfoReadBuffer.cxx:

                    subinfo = (TStreamerInfo*)newProxy->GetValueClass()->GetConversionStreamerInfo( oldProxy->GetValueClass(), vClVersion );

is not properly handling the case whether the classes are unversion and thus the search ought to be done using the checksum rather than the class version.

Reproducer

template <typename T>
struct Wrapper
{
   bool present = true;
   T obj;
};

struct MatchedCSCSegment
{
   float someValue = 0.0;

   MatchedCSCSegment(float in = 0.0) : someValue{in} {}

   // The simeple update fails if the class version is not set.
   ClassDef(MatchedCSCSegment, 5);
};

struct CSCSegment
{
   float someValue;

   operator MatchedCSCSegment()
   {
      return MatchedCSCSegment{someValue};
   }

#ifdef OLD_VERSION
   std::vector<CSCSegment> theDuplicateSegments;
   ClassDef(CSCSegment, 3);
#else
   std::vector<MatchedCSCSegment> theDuplicateSegments;

   ClassDef(CSCSegment, 4);
#endif
};

and rule:

#pragma read sourceClass="CSCSegment" targetClass="MatchedCSCSegment"

ROOT version

master

Installation method

any

Operating system

any

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions