Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflict between snapshotting all columns and collection structs #83

Open
lcorcodilos opened this issue Dec 3, 2021 · 0 comments
Open

Comments

@lcorcodilos
Copy link
Owner

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+'_[^_].*')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant