art-framework-suite / art

The implementation of the art physics event processing framework
Other
2 stars 7 forks source link

Passing value between threads in art module #147

Open sophiemiddleton opened 4 months ago

sophiemiddleton commented 4 months ago

Describe your request or issue Hello,

i'm currently developing the REveMu2e framework for our event display: https://github.com/Mu2e/REve .

we currently have this module: https://github.com/Mu2e/REve/blob/main/src/REveEventDisplay_module.cc which launches a two-threaded process. This is to allow the application to stay open, pause for user input and skip between events.

REve operate like any ROOT based GUI program, using a TApplication setup.

The issue is that I want to enter information in the GUI text field. The display manager( which is added here: https://github.com/Mu2e/REve/blob/main/src/REveEventDisplay_module.cc#L466) sets up the text boxes on the display and takes input from the user...I want to use that information in the module (e.g. for event selection, time cuts, energy cuts, things like that).

So here is the current situation:

https://github.com/Mu2e/REve/blob/main/src/REveEventDisplay_module.cc#L268

which sets up the function where I'm trying access that value and the function which makes. the display object in different threads.

My query is, what would be the best way to pass the value (e.g. run number) from the display class to the event class such that I can use it?

Is this a high-priority issue?

knoepfel commented 4 months ago

@sophiemiddleton, we are trying to understand your use case better. Are you:

  1. Hoping to instruct the art framework as to which event should be processed? (requires driving the input source)
  2. Hoping to display only the event specified by the user while ignoring all other events from the input stream? (could be implemented as a module)
sophiemiddleton commented 4 months ago

Hi Kyle, at this point I want to either really. But the usecase is more general than that....the usecase of user input via GUI can be applied to anything for example, it could be a time or energy cut, we could be asking for a specific track to be shown etc....so its not just about solving the "go to an event" use case here

knoepfel commented 2 months ago

@sophiemiddleton, sorry for the delay. Is this still an issue?

sophiemiddleton commented 2 months ago

Yes, I did not solve this yet and it would be a useful feature