Request structure/comparator for matching EventId
I would like to filter events based on EventId. To facilitate that I would like a struct/comparator to match an EventId, which I can construct from a string (ultimately from fhicl), which allows me to choose which fields (producer, run, subrun, event) I want to match, and wildcard the ones I don't care about, much like how InputTag works. Full regexp matching with ranges (i.e. [0-59]) would be nice. With such a struct I could easily write a module to select events just providing a (fhicl) input vector of strings. Because the EventId fields are internal features of art I think the art development team is best suited to produce this struct/comparator.
#1 Updated by Kyle Knoepfel almost 4 years ago
- Status changed from New to Feedback
We are able to provide a utility that allows configurability, allowing wildcards and/or ranges on the
Event numbers. However, we are not sure what you mean by including the "producer" as one of the fields. Can you explain?
#3 Updated by Kyle Knoepfel almost 4 years ago
process_name is irrelevant as far as
Run/SubRun/Event numbering is concerned. The events as defined in the very first process (usually created by
EmptyEvent) are the same events in any processes that derive from the initial one. Implementing the utility you request can be done with just the
Event fields (or something that translates to them).
#5 Updated by Kyle Knoepfel over 3 years ago
- Status changed from Accepted to Assigned
- Assignee set to Paul Russo
- Estimated time set to 4.00 h
We will create a class from which an object can be initialized with a list of patterns that are used to match against an
EventID. Our proposal is to allow a pattern to be specified as:
1:*:* // Process Run 1, any SubRun, any Event 1:2:* // Process Run 1, SubRun 2, any Event 1:2:3 // Process Run 1, SubRun 2, Event 3 1:*:4 // Process Run 1, any SubRun, Event 4 1:2-5:* // Process Run 1, SubRuns 2 through 5 (inclusive), any Event *:9:10,11 // Process any Run, SubRun 9, Events 10 and 11 7:2-5,8:* // Process Run 7, SubRuns 2 through 5 (inclusive) and 8, any Event
Each field must include either a single number, a comma-and/or-dash delimited set of numbers, or a single asterisk.