gallery series 1.10

Previous series release notes
Next series release notes

 New features

art::ProductID through gallery handles

Users may now retrieve the product ID for a retrieved product.

auto const& prod = e.getValidHandle<MyProduct>(...);
ProductID const productID{prod->id()};

This will be helpful for retrieving the product description of the retrieved product (see next feature). If getByLabel is used instead, and the product retrieval fails, the corresponding product ID is invalid.

Product description retrieval via an art::ProductID

Users are now able to retrieve the product description through the gallery event, given an art::ProductID object:

auto const& pd = e.getProductDescription(productID);
std::cout << pd.inputTag() << '\n';

If a product description is not available for a given product ID, an exception will be thrown. This resolves feature #16547.

getManyByType supported

The getManyByType member function template has been added to the gallery event. Its interface parallels that of art's getManyByType interface:

std::vector<gallery::Handle<MyProduct>> hs;

for (auto const& h : hs) {
  // Handles retrieved via 'getManyByType' are guaranteed to be valid

  // Do something with the product
  auto const& prod = *h;

  // Where did the product come from?
  art::ProductID const id{h->id()};
  std::cout << e.getProductDescription(id).inputTag() << '\n';

This resolves feature #16546.

 Compiler support

This series of releases is the last to support the e15 qualifier. Starting with art series 3.01, only builds with the C++17 standard enabled will be provided.

To upgrade to using the C++17 standard, use the e17 or c2 qualifiers.

  gallery releases