Project

General

Profile

Feature #19970

Configuration validation for event mixing

Added by Andrei Gaponenko over 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
05/16/2018
Due date:
% Done:

100%

Estimated time:
Spent time:
Scope:
Internal
Experiment:
Mu2e
SSI Package:
art
Duration:

Description

Hello,

Please provide a way to create event mixing modules with the configuration validation functionality. The art/Framework/Modules/MixFilter.h template can pass to the user code only a ParameterSet, not Table<Config> at the moment.

Andrei

History

#1 Updated by Kyle Knoepfel over 1 year ago

  • Status changed from New to Accepted

#2 Updated by Kyle Knoepfel over 1 year ago

  • Target version set to Vega

#3 Updated by Kyle Knoepfel over 1 year ago

  • Status changed from Accepted to Assigned
  • Assignee set to Kyle Knoepfel
  • % Done changed from 0 to 90

This feature is almost complete. Interestingly, this issue is slightly coupled to issue #20063 as enabling configuration validation has induced a change in how the random number engines are configured. Once that issue is resolved, I will mark this one as resolved, too.

To enable configuration validation and description, one will need to provide the 'Parameters' type, which is an alias to art::MixFilterTable<Config>, per the usual pattern:

class MyMixFilterDetail {
public:
  struct Config{
    fhicl::Atom<bool> someFlag{fhicl::Name{"someFlag"}};
    // ...
  }
  using Parameters = art::MixFilterTable<Config>;
  explicit MyMixFilterDetail(Parameters const& p,
                             art::MixHelper&);

  // ...
}

Providing the Parameters type does the following:

  • Adds the EDFilter parameters to the allowed configuration
  • Adds the MixHelper parameters to the allowed configuration
  • Adds the detail parameters to the allowed configuration
  • Requires users to specify the Parameters type in the detail constructor

In essence, unlike bare modules, providing the Parameters type not only provides configuration description, but it also requires configuration validation. For bare modules, it is allowed to provide the Parameters type (i.e. enable configuration description) but the user can still specify fhicl::ParameterSet as the constructor argument type (i.e. not enable configuration validation). Description and validation cannot be separated for MixFilter detail classes.

#4 Updated by Kyle Knoepfel over 1 year ago

  • Category set to Infrastructure
  • Status changed from Assigned to Resolved
  • % Done changed from 90 to 100
  • SSI Package art added

Implemented with commit art:d00ef23.

#5 Updated by Kyle Knoepfel over 1 year ago

  • Experiment Mu2e added
  • Experiment deleted (-)

#6 Updated by Kyle Knoepfel about 1 year ago

  • Target version changed from Vega to 3.01.00

#7 Updated by Kyle Knoepfel about 1 year ago

  • Target version changed from 3.01.00 to 3.02.00

#8 Updated by Kyle Knoepfel 9 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF