art series 3.04

Previous series release notes
Next series release notes

 New features

Among other minor enhancements, the following features have been implemented.

art::Assns::addMany overload set

In order to support one-to-many associations, the art::Assns::addMany overload set has been introduced. The following interface is supported:

art::Ptr<A> a; std::vector<art::Ptr<A>> as;
art::Ptr<B> b; std::vector<art::Ptr<B>> bs;

art::Assns<A, B> ab;
ab.addMany(a, bs); // Associate each element in 'bs' to 'a'
ab.addMany(as, b); // Associate each element in 'as' to 'b'

For Assns objects with data associated with them, a container of the same length as the art::Ptr container can be presented to the addMany function.

std::vector<D> ds;

art::Assns<A, B, D> abd;
abd.addMany(a, bs, ds); // Case 1: The sizes of 'bs' and 'ds' must be the same
abd.addMany(as, b, ds); // Case 2: The sizes of 'as' and 'ds' must be the same

In the first (second) case, element i of ds corresponds to the association between a (b) and element i of bs (as).

Support for std::map<art::InputTag, T> and std::set<art::InputTag>

Users may now create associative arrays whose key type is art::InputTag. Although a specific ordering has been implemented to achieve this feature, users should not interpret that ordering to match the product-lookup behavior within art or gallery. Resolves issue #23320.

Specifying default engine type for RandomNumberGenerator service

In past versions of art, the RandomNumberGenerator services has used the HepJamesRandom CLHEP random-number engine as its default engine. Users can now specify the CLHEP random-number engine to be used via FHiCL configuration (e.g.):

services.RandomNumberGenerator.defaultEngineKind: "MixMaxRng" 

Any art job using the above configuration will create CLHEP MixMaxRng random-number engines when calling createEngine(...) without specifying the engine type in source code.

 Platform/compiler support changes

Discontinuation of e17 and c2 support

To prepare for an upgrade in compiler versions in the near future, the only compilers supported for this series are GCC 8.2 (e19) and Clang 7 (c7).

Discontinuation of macOS 10.13 (High Sierra) support

This series supports only macOS 10.14 (Mojave) with SIP disabled; support for High Sierra has been dropped. This change is in line with the SciSoft policy change to discontinue support for macOS (see here for information).

 Breaking changes

Python 3 enabled by default

Python 3 is enabled by default for this series. In order to use Python 2, the py2 qualifier should be used when setting up the art UPS product:

setup art v3_04_00 -q +e19:+prof      # sets up Python 3
setup art v3_04_00 -q +e19:+prof:+py2 # sets up Python 2

N.B. Python 3 is not supported on SLF6 systems--users will need to specify the py2 qualifier when using this series on SLF6.

Configuration validation required when configuration description is enabled

For users of the configuration validation and description system, any plugin using configuration description must also implement configuration validation. For example:

class MyProducer : public art::EDProducer {
  struct Config { ... };
  using Parameters = Table<Config>;       // Configuration description enabled
  MyProducer(fhicl::ParameterSet const&); // Error - Must be 'Parameters' to enable validation
  MyProducer(Parameters const&);          // Okay - validation enabled

cet::enable_if_type_exists_t deprecated

The cet::enable_if_type_exists_t metaprogramming utility has been deprecated in favor of std::void_t. The std::void_t class template should be used in exactly the same way as cet::enable_if_type_exists_t was used.

  art releases