Project

General

Profile

Feature #8872

Feature #7538: art service/module command-line helpers

Feature #8770: Implement parameter set validation - task 3a of issue #7538

Feature #8773: Create new types in FHiCL that automatically register allowed parameters.

Set and retrieve values from FHiCL using new C++ types

Added by Kyle Knoepfel over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
05/19/2015
Due date:
08/01/2015
% Done:

100%

Estimated time:
24.00 h
Spent time:
Scope:
Internal
Experiment:
-
SSI Package:
FHiCL
Duration: 75

Description

Using the key map in issue #8868 (and, where appropriate, as adjusted for Sequence<T> objects as in issue #8870), retrieve parameters for user's use from the ParameterSet object. Using the class Configuration in issue #8868, the following types should be returned on function calls:

Table<Configuration> pset { Key("pset") };

/*a*/ pset() // ........................ -> Configuration
/*b*/ pset().flag() // ................. -> bool
/*c*/ pset().tup<1>() // ............... -> std::string
/*d*/ pset().vecOfVecs() // ............ -> std::vector< std::vector< int > >
/*e*/ pset().vecOfVecs(1) // ........... -> std::vector< int > - second element of 'd' [[ OPTIONAL ]]
/*f*/ pset().vecOfVecs(1,1) // ......... -> int - second element of 'e' [[ OPTIONAL ]]
/*g*/ pset().funSeq() // ............... -> std::tuple< std::array< double, 2>, bool, int >
/*h*/ pset().funSeq<0>() // ............ -> std::array<double,2>
/*i*/ pset().funSeq<0>(1) // ........... -> double - second element of 'h' [[ OPTIONAL ]]
/*j*/ pset().tablesequence() // ........ -> std::array< ForRootInput, 2>
/*k*/ pset().tablesequence(1) // ....... -> ForRootInput - second element of 'j'
/*l*/ pset().tablesequence(1).value() // -> int
/*m*/ pset().pset2().test() // ......... -> std::string


Related issues

Blocked by art - Feature #8868: Develop key map for automatic registration of FHiCL typesClosed05/19/201508/01/2015

History

#1 Updated by Kyle Knoepfel over 5 years ago

  • Blocked by Feature #8868: Develop key map for automatic registration of FHiCL types added

#2 Updated by Kyle Knoepfel over 5 years ago

For case 'j', the return type will be std::array< ForRootInput, 2>.

#3 Updated by Kyle Knoepfel over 5 years ago

  • Description updated (diff)

#4 Updated by Kyle Knoepfel over 5 years ago

  • % Done changed from 0 to 70

It has been verified that the above types (save one) are returned for the above function calls. Not yet supported is the arbitrary-depth indexing (item 'f' above), and setting values for Sequence<T> types needs to be implemented.

#5 Updated by Kyle Knoepfel over 5 years ago

  • % Done changed from 70 to 100

Tests are in place verifying that all types and values above are retrieved -- from defaults (as appropriate) or from FHiCL files. Not yet supported is option 'f', which will become another issues once there is demand for it.

Will mark as resolved once code has been pushed.

#6 Updated by Kyle Knoepfel over 5 years ago

  • Status changed from Assigned to Resolved

Pushed to repository with commit fhicl-cpp:36dcfbccdb0d127855fc25838fef209dd042103f.

#7 Updated by Kyle Knoepfel about 5 years ago

  • Target version changed from 1.18.00 to 1.16.00

#8 Updated by Christopher Green about 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF