Skip to content

Fix conflict between snapshotting all columns and collection structs #83

@lcorcodilos

Description

@lcorcodilos

Right now, if someone snapshots with columns == 'all' while also using the collection structs (via something like the AutoJME tool), an error will occur because the struct cannot be written to a TTree. The block below should be added before here [1] to check for the struct and skip adding it to the snapshot.

[1] -

self.DataFrame.Snapshot(treename,outfilename,'',opts)

columns_to_save = []
for c in a.GetColumnNames():
    if c.split('_')[0] in a.GetCollectionNames():
        continue
    elif c.endswith('s') and c[:-1] in a.GetCollectionNames():
        continue
    else:
        columns_to_save.append(c)

for c in a.GetCollectionNames():
    columns_to_save.append(c+'_[^_].*')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions