Project

General

Profile

Feature #13860

Request structure/comparator for matching EventId

Added by David Brown about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Paul Russo
Category:
-
Target version:
Start date:
09/15/2016
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
Scope:
Internal
Experiment:
Mu2e
SSI Package:
Duration:

Description

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.

History

#1 Updated by Kyle Knoepfel about 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 Run, SubRun, and Event numbers. However, we are not sure what you mean by including the "producer" as one of the fields. Can you explain?

#2 Updated by David Brown about 4 years ago

Sorry for the confusion, 'producer' is the wrong term, I meant 'process_name', which I believe is part of the key for identifying event data objects.

#3 Updated by Kyle Knoepfel about 4 years ago

The 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 Run, SubRun, and Event fields (or something that translates to them).

#4 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from Feedback to Accepted

#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.

#6 Updated by Kyle Knoepfel over 3 years ago

  • Target version set to 1209

#7 Updated by Paul Russo over 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

#8 Updated by Kyle Knoepfel over 3 years ago

  • Target version changed from 1209 to 2.07.01

#9 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF