Check duplicate issues.
Description
It appears that a rule trying to read a leaf count array must also specify the leaf count branch. This is logical in most cases, but sometimes the user can infer the size from other information, for example because it's always constant (single element). In the worst case, this should be documented but I guess it could be taken care of automatically?
Reproducer
A reproducer is SoAEvolv.source.tar.gz which is writing
struct SoAEvolv {
int fElements = 0;
float *fA = nullptr; //[fElements]
ClassDefNV(SoAEvolv, 2)
};
and then trying to evolve it with
#pragma read sourceClass="SoAEvolv" source="float *fA" version="[-2]" targetClass="SoAEvolv" target="fA" code="{printf(\"onfile.fA = %p\n\", onfile.fA);}"
not specifying fElements. When running ./read_soaevolv the output is:
onfile.fA = (nil)
Error in <TBufferFile::CheckByteCount>: object of class SoAEvolv read too few bytes: 7 instead of 11
showing that ROOT didn't even populate onfile.fA...
ROOT version
6.36, but also latest master
Installation method
CMSSW, but also from source
Operating system
Linux
Additional context
FYI @Electricks94
Check duplicate issues.
Description
It appears that a rule trying to read a leaf count array must also specify the leaf count branch. This is logical in most cases, but sometimes the user can infer the size from other information, for example because it's always constant (single element). In the worst case, this should be documented but I guess it could be taken care of automatically?
Reproducer
A reproducer is SoAEvolv.source.tar.gz which is writing
and then trying to evolve it with
not specifying
fElements. When running./read_soaevolvthe output is:showing that ROOT didn't even populate
onfile.fA...ROOT version
6.36, but also latest
masterInstallation method
CMSSW, but also from source
Operating system
Linux
Additional context
FYI @Electricks94