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

provide a thread-safe way to reload configurations, for example, when the run number changes #95

Open
c-dilks opened this issue Jan 26, 2024 · 3 comments · May be fixed by #258
Open

provide a thread-safe way to reload configurations, for example, when the run number changes #95

c-dilks opened this issue Jan 26, 2024 · 3 comments · May be fixed by #258
Assignees
Labels
enhancement New feature or request

Comments

@c-dilks
Copy link
Member

c-dilks commented Jan 26, 2024

When a run number changes, the configuration may also change. We need some way of handling this during event processing, which will require mutation of some algorithm class members, namely those from a configuration.

@c-dilks c-dilks self-assigned this Jan 31, 2024
@c-dilks c-dilks added the enhancement New feature or request label Apr 12, 2024
@dglazier
Copy link
Contributor

I think it would be good to sort this issue sooner rather than later. As more algorithms come online it will mean more code re-working and more time spent to do it. It also will delay integration into analysis until this is sorted. I would class it more as urgent and essential rather than enhancement!

@c-dilks c-dilks pinned this issue May 22, 2024
@c-dilks c-dilks changed the title implement Algorithm::ChangeRun provide a thread-safe way to reload configurations, for example, when the run number changes May 22, 2024
@c-dilks
Copy link
Member Author

c-dilks commented May 22, 2024

Fully agree, though I think we need something a bit more general than ChangeRun. We want to trigger a reload of the configuration parameters when some variable(s) change, such as run number.

I'm thinking perhaps a new function ReloadConfig; users of Run won't have to change anything, since Run can call ReloadConfig, whereas users of action functions will need to call ReloadConfig themselves (per event, not per every bank row). What do you think?

@dglazier
Copy link
Contributor

I think run number will be the most useful and general switch. At the same time from the parameter point of view they will often be defined for run periods, so just need to define parameters for groups of runs.
I think I would expect users of actions to call Reload themselves, but there is a risk of misuse there so need to make sure it is well advertised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
2 participants