get_failureToPut_flag.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_detail_get_failureToPut_flag_h
2 #define art_Framework_Core_detail_get_failureToPut_flag_h
3 
4 /*
5  =============================================================
6 
7  'get_failureToPut_flag' determines the error handling behavior
8  whenever a module that calls 'produces' on a product fails to 'put'
9  the product onto the Event. There are two configuration parameters
10  that can be used to govern this behavior:
11 
12  Global flag: "services.scheduler.errorOnFailureToPut" (default 'true')
13  Local flag: "thisModuleLabel.errorOnFailureToPut" (default 'true')
14 
15  The behavior is as follows:
16 
17  (1) If the global flag is set to 'true', the individual module
18  instances can override the behavior by setting the local flag to
19  'false'.
20 
21  (2) If the global flag is 'false', then any attempt to override the
22  global flag at the per-module level will be ignored.
23 
24  The reason for the asymmetry is motivated by the following use case.
25  Consider the configuration:
26 
27  services.scheduler.errorOnFailureToPut: true
28  physics.producers: {
29  p1: @local::experiment.p1
30  p2: { ... }
31  t1: [p1,p2]
32  }
33 
34  In this example, "experiment.p1" is owned by the experiment. Should
35  the experiment decide that, for that particular module, it is okay
36  to allow a failure to 'put' without throwing an exception, then the
37  user's job continues without incident.
38 
39  However, if the flags were reversed--i.e. the global flag were set
40  to 'false', and the "experiment.p1" flag were set to 'true', the
41  user might be surprised to find that their job has failed. We
42  believe this approach is most user-friendly, and it is therefore
43  incumbent on particular owners of modules or for software leads of
44  experiments to determine reasonable policies for their own
45  experiments.
46 
47  =============================================================
48 
49 */
50 
51 namespace fhicl {
52  class ParameterSet;
53 }
54 
55 namespace art::detail {
56  bool get_failureToPut_flag(fhicl::ParameterSet const& scheduler_pset,
57  fhicl::ParameterSet const& module_pset);
58 }
59 
60 #endif /* art_Framework_Core_detail_get_failureToPut_flag_h */
61 
62 // Local variables:
63 // mode: c++
64 // End:
parameter set interface
bool get_failureToPut_flag(ParameterSet const &scheduler_pset, ParameterSet const &module_pset)