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

Allow creation and storing of superruns if SaveWhen > 0 #509

Merged
merged 5 commits into from Aug 20, 2021

Conversation

WenzDaniel
Copy link
Collaborator

What is the problem / what does the code in this PR do
Changed get_components such that superruns can be created from every plugin type except SaveWhen.NEVER plugins. This addresses: XENONnT/straxen#605

@JoranAngevaare
Copy link
Member

Quick question, although this seems to works, would it not be more intuitive to always make the data when making a super-run, also when using a SaveWhen.NEVER plugin or do you foresee a reason why not to do this? Otherwise, for SaveWhen.NEVER we will keep the same behavior right?

@WenzDaniel
Copy link
Collaborator Author

WenzDaniel commented Aug 9, 2021

Yes, I thought about it too. But in the end I decided against it to distinguish more explicitly between SaveWhen.NEVER and SaveWhen.EXPLICIT. I think the latter was added later, was not it? At least I had the impression that SaveWhen.EXPLICIT makes SaveWhen.NEVER a bit obsolete. I think any plugin should be saveable if asked for, unless there might be some technical reasons for which we would forbid saving and make it a SaveWhen.NEVER plugin.

But one thing which just comes to my mind. Since a superrun cannot be created in that case I should raise an error early.

@JoranAngevaare
Copy link
Member

Right, I never used savewhen explicit, I had to write a test to understand it:
#510

But agree, SaveWhen.Never is a bit of a strange choice generally when SaveWhen.Explicit is available

strax/context.py Outdated Show resolved Hide resolved
@JoranAngevaare JoranAngevaare merged commit 4adacdc into master Aug 20, 2021
@JoranAngevaare JoranAngevaare deleted the fix_superrun_save_never branch August 20, 2021 08:09
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.

None yet

2 participants