Project

General

Profile

art series 2.07

Previous series release notes
Next series release notes

 New features

Thread-safe art-provided services

All art-provided services intended to be used in a multi-threaded context are now thread-safe. Some services, however, such as TFileService, will require serialized access. Instructions will be given at a later release for how such services are to be used.

Some breaking changes to how services behave were required to enable this. Please see the comprehensive list here.

Resolves issues: #15374, #15655, #15656, #15657, #15658, #15650, #15660, #15661, #15663, #15672, #15673, and #15676.

DatabaseConnection service

In order to support using SQLite on NFS-mounted systems, art must explicitly disable the locking mechanisms that SQLite depends upon. To guarantee thread-safe interactions with SQLite, art has introduced a DatabaseConnection service which, when used with a cet::sqlite::Ntuple, provides a handle to an SQLite object that is implicitly thread-safe.

For more information, please contact (resolves issue #15676).

EventID pattern-based comparator/filter

art::EventIDMatcher is a functor class which can be used to filter EventIDs using patterns. The public interface is:

explicit EventIDMatcher(std::string const& pattern);
explicit EventIDMatcher(std::vector<std::string> const& patterns);

bool operator()(EventID const&) const;
bool match(EventID const&) const;

There are two constructors, the first takes one argument which is the pattern the matcher should use, while the second takes one argument which is a list of patterns the matcher should use. The match and operator() member functions are synonyms and take an EventID to be matched against the patterns.

The format of a pattern string consists of three fields:

"<Run-part>:<SubRun-part>:<Event-part>" 

Each of the Run, SubRun, and Event fields can be represented by a number, or set of numbers. The '*' wildcard can be used to represent any number, and the ',' and '-' characters can be used to specify sets or ranges of numbers. For example:

"1:*:*"     // Accept Run 1, any SubRun, any Event
"1:2:*"     // Accept Run 1, SubRun 2, any Event
"1:2:3"     // Accept Run 1, SubRun 2, Event 3
"1:*:4"     // Accept Run 1, any SubRun, Event 4
"1:2-5:*"   // Accept Run 1, SubRuns 2 through 5 (inclusive), any Event
"*:9:10,11" // Accept any Run, SubRun 9, Events 10 and 11
"7:2-5,8:*" // Accept Run 7, SubRuns 2 through 5 (inclusive) and 8, any Event

When specifying multiple patterns, each pattern is tried in the specified order, and if any pattern matches the EventID, then true is returned. In other words, if the event in question matches any (not all) of the patterns, the event is accepted.

EventIDFilter is a filter module that has been introduced to encapsulate the above functionality. It is configured with a sequence of patterns such that when any art::Event matches at least one of the patterns, the EDFilter::Pass value is returned, accepting the event. For details, type art --print-description EventIDFilter.

Python extension module for FHiCL

Herb Greenlee of the MicroBooNE experiment has provided a Python extension module that converts a FHiCL document to a native Python dictionary. When setting up fhiclcpp 4.05.01, the PYTHONPATH environment variable is appropriately set so that users can type:

import fhicl
pset = fhicl.make_pset('my_document.fcl')
fhicl.pretty(pset) # print the pset

When calling the fhicl.pretty(...) method, users will need to appropriately handle the newline characters included in the prettified string.

Other improvements

  • A succinct memory summary is printed at the bottom of each art job, reporting the maximum virtual memory (VmPeak) and the maximum resident set size (VmHWM).
  • ServiceHandle<MyService const> constructions are now allowed.
  • A convenience function for retrieving the art::InputTag corresponding to a retrieved product has been introduced.
  • Time-tracking abilities have been extended to include event-read time.
  • ROOT::EnableThreadSafety() is now called to support limited multi-threaded I/O with ROOT.

 Breaking changes

Please consult the list of breaking changes to determine if/how your code should be modified.

  art releases