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 meta data handling in ROOTReader and unify tests #133

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

tmadlener
Copy link
Collaborator

BEGINRELEASENOTES

  • Make ROOTReader handle file switches properly for meta data reading.

ENDRELEASENOTES

Fixes #132

In principle #132 is not yet completely fixed by this, because only the run, collection and event meta data are handled properly. Each file also has another metadata collection which currently is not yet updated during a file switch.

Unifying the testing code by making read and read-multiple use the same processEvent function (which lead to the discovery #132). Additionally making write a template function to easily switch out different writers. This significantly reduces code duplication, increases test coverage and also (hopefully) makes maintenance a bit easier in the future.

@tmadlener
Copy link
Collaborator Author

Rebased to fix the merge conflict.

Can the two commits here be squashed into one when merging? Then the read-multiple test will not be broken intermediately, which it currently is after the first commit.

@tmadlener
Copy link
Collaborator Author

Since #97 changed the behavior of the EventStore (exception on non-existant collections), the tests needed some changes as well.

Make write / read tests reuse the same function

Significantly reduces code dupliation by having the write and
processEvent functions defined only once and re-used throughout all the
read and write tests.

Also increases test coverage in some places (e.g. MetaData have only
been partially covered until now) and reduces future maintenance costs.
@hegner hegner merged commit 3b890f2 into AIDASoft:master Oct 6, 2020
@tmadlener tmadlener deleted the unify-tests branch January 26, 2021 10:18
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

Successfully merging this pull request may close these issues.

ROOTReader doesn't handle meta data properly when reading from multiple files
2 participants