Skip to content

Commit 5666021

Browse files
committed
[ntuple] Add clarifying comment
1 parent 6285697 commit 5666021

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tree/ntuple/v7/src/RNTupleProcessor.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@ ROOT::Experimental::RNTupleJoinProcessor::RNTupleJoinProcessor(const RNTupleOpen
398398
return fieldName.substr(0, n.fNTupleName.size()) == n.fNTupleName;
399399
});
400400

401+
// If the current field name does not begin with the name of one of the auxiliary ntuples, we are dealing with a
402+
// field from the primary ntuple, so it can be added as a field context. Otherwise, if it does begin with the
403+
// name, but is not equal to just the name (e.g. it is a subfield of `auxNTupleName`, which means it is a proper
404+
// field in the corresponding auxiliary ntuple) we also need to add it as a field context. If it is exactly equal
405+
// to an auxiliary ntuple name, it is the untyped record field containing the auxiliary fields itself. This one we
406+
// don't want to add as a field context, because there is nothing to read from.
407+
// TODO(fdegeus) handle the case where a primary field has the name of an auxiliary ntuple.
401408
if (auxNTupleName == auxNTuples.end()) {
402409
fFieldContexts.try_emplace(fieldName, field.Clone(field.GetFieldName()), fEntry->GetToken(fieldName));
403410
} else if (fieldName != auxNTupleName->fNTupleName) {

0 commit comments

Comments
 (0)