BxCppDev / Bayeux

Core Persistency, Geometry and Data Processing C++ Library for Particle and Nuclear Physics Experiments
GNU General Public License v3.0
4 stars 9 forks source link

Review the current processing of variant directive from a datatools::properties config file #3

Closed fmauger closed 7 years ago

fmauger commented 7 years ago

Directives like:

#@variant_if geometry:layout/if_basic/magnetic_field/is_active|true
dummy : string = "A"
#@variant _endif
#@variant_if geometry:layout/if_basic/magnetic_field/is_inactive|false
dummy : string = "B"
#@variant _endif

should be processed in a more coherent manner. While the "geometry:layout/if_basic/magnetic_field/is_active" is found not activated, the processor fallback to the 'true' value then pickup dummy=="A" then "geometry:layout/if_basic/magnetic_field/is_inactive" is found and then duplicates the entry "dummy : string = ...". this must be fixed.

Files to consider : "datatools/properties.cc" and "datatools/configuration/io.cc"

fmauger commented 7 years ago

Impacted methods to be refactored/revisited in "datatools/configuration/io.cc":