Feature #9594

Accessing a specific event from the command line

Added by Rebecca Diesing almost 6 years ago. Updated over 2 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
24.00 h
Spent time:
SSI Package:


I have been working on a script that would allow a user to input a text file listing runs, subruns, and events. Ideally, the script would then obtain those events and make the appropriate calls to art. However, art doesn't allow event access from the command line, and, since the number of events in any given subrun is variable, --nskip will not resolve the issue. At the moment, I am modifying the source portion of the fcl file to include firstEvent : <EVENT #>, and then using sed to insert the appropriate number. If possible, I would love to streamline this process, especially since text files can include repeat runs and subruns. In other words, if my script were to separate all events corresponding to a given root file, I would like to find a way to make only one call to art, instead of making a separate call for each event. At the moment, command line access seems like the most efficient way to accomplish this.

Related issues

Related to art - Support #7308: -e/--estart command line option not workingClosed11/11/2014

Related to art - Feature #1000: Run/event rangeAssigned05/29/201108/01/2015


#1 Updated by Christopher Green almost 6 years ago

  • Related to Support #7308: -e/--estart command line option not working added

#2 Updated by Christopher Green almost 6 years ago

  • Category set to Application
  • Status changed from New to Accepted
  • Estimated time set to 24.00 h
  • SSI Package art added
  • SSI Package deleted ()

We will come up with a proposal for event ID specification from the command line, and disseminate it to stakeholders for consensus, since other experiments have expressed a desire for similar features in the past and we would like to meet everyone's needs, if possible. Please consult with your representative (currently Ken Herner, we believe) to ensure your needs are represented as you would wish in this discussion.

#3 Updated by Rob Kutschke almost 6 years ago

I believe that CMS has a syntax for this. We should certainly evaluate their syntax for our purposes. Every little bit of reduced learning curve helps.

#4 Updated by Marc Paterno over 5 years ago

#5 Updated by Marc Paterno over 5 years ago

  • Target version set to 2.01.00

#6 Updated by Kyle Knoepfel almost 5 years ago

  • Target version changed from 2.01.00 to Vega

#7 Updated by Kyle Knoepfel about 3 years ago

  • Target version changed from Vega to Capella

#8 Updated by Kyle Knoepfel over 2 years ago

  • Target version changed from Capella to 3.02.00

#9 Updated by Kyle Knoepfel over 2 years ago

  • Status changed from Accepted to Resolved
  • Assignee set to Kyle Knoepfel
  • % Done changed from 0 to 100

This has been resolved with commits:

The proper specification for -e|--estart is no longer a single number, but a valid EventID, which contains a triplet of numbers that corresponds to the run, subrun, and event numbers. For example, to start processing at run 12, subrun 3, event 16, the user would type:

art -c config.fcl -e 12:3:16

A legacy mode is permitted, where single integers can be specified corresponding to the event number in run 1, subrun 0:

art -c config.fcl -e 7
Specifying an event number of 7 is now deprecated when using
the -e|--estart program option.  Please explicitly specify the
run and subrun numbers (e.g.):
   -e "1:0:7" 

Misspecified EventIDs will result in an exception throw:

art -c config.fcl -e "1:9:hi bob" 
OptionsHandler caught a cet::exception calling art::BasicSourceOptionsHandler::doProcessOptions()
---- Configuration BEGIN
  An error was encountered while processing the -e|--estart program option.
  The specification '1:9:hi bob' is not a valid EventID.
  Please specify a value of the form '<run>:<subrun>:<event>' where:
    <run>    is in the range [1, 4294967295)
    <subrun> is in the range [0, 4294967295)
    <event>  is in the range [1, 4294967295)
---- Configuration END

Art has completed and will exit with status 90.

N.B. The current behavior is that each input file is opened and event processing begins once there is an event whose ID is greater than or equal to the specified EventID. If event-processing begins and a subsequent input file has events with IDs lower than the specified EventID, then those events will be skipped. In other words, the event-ID search occurs for each input file. This behavior should probably be changed in the future so that it is not specific to each input file.

#10 Updated by Kyle Knoepfel over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF