Exercise 4

  1. Example code
    1. Exercise 3 but get the module label of the product creator from the parameter set
  2. Activities
    1. In the fcl file, misspell "hitMakerModuleLabel". Observe the error message. # In the .fcl file, remove the line that defines "hitMakerModuleLabel". Observe the error message. # ex04Activity01.fcl defines lots of additional parameters for the module. Extend to read these parameters and print out their values.
      The answer is given in # The files # ex04Activity02.fcl and introduce the idea of optional parameters. Run this example and observe the output. Comment out the definitions of debugLevel and efficency in the .fcl file; rerun and observe the changed printout. Add a line to read parameter b as an int; observe the run-time error.
  3. Ideas to discuss
    1. Use of member data to connect c'tor and analyze method. # leading _ syntax for data members ( most other options OK. Do not use double underscore or underscore capital ). # Initializer syntax for c'tor. # fhcil::ParameterSet # key : value pairs; value types: atomic, sequence, table # art parameter set = fhicl table # When are quotes required in values. ( embedded spaces or special characters ) # Required vs optional parameters; default values. # Why do we want to use parameter sets? # $FHICL_INC and source code browser. # Links to FHICL documentation