File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,20 @@ BOOST_AUTO_TEST_CASE(ParameterGas_test2)
186186 BOOST_CHECK_CLOSE (o2::conf::ConfigurableParam::getValueAs<float >(" TPCGasParam.BetheBlochParam[4]" ), 16 .f , 1e-12 );
187187}
188188
189+ // / \brief Trivial test of the two ways to setValue for a ConfigurableParameter
190+ // / Precision: 1E-3 %
191+ BOOST_AUTO_TEST_CASE (setValues_test1)
192+ {
193+ BOOST_CHECK_CLOSE (ParameterGas::Instance ().Wion , o2::conf::ConfigurableParam::getValueAs<float >(" TPCGasParam.Wion" ), 1e-3 );
194+ o2::conf::ConfigurableParam::setValue<float >(" TPCGasParam" , " Wion" , 3.0 );
195+ BOOST_CHECK_CLOSE (ParameterGas::Instance ().Wion , 3.0 , 1e-3 );
196+ BOOST_CHECK_CLOSE (o2::conf::ConfigurableParam::getValueAs<float >(" TPCGasParam.Wion" ), 3.0 , 1e-3 );
197+ o2::conf::ConfigurableParam::setValue (" TPCGasParam.Wion" , " 5.0" );
198+ BOOST_CHECK_CLOSE (ParameterGas::Instance ().Wion , 5.0 , 1e-3 );
199+ BOOST_CHECK_CLOSE (o2::conf::ConfigurableParam::getValueAs<float >(" TPCGasParam.Wion" ), 5.0 , 1e-3 );
200+ ParameterGas::Instance ().printKeyValues (true );
201+ }
202+
189203// / \brief Trivial test of the default initialization of Parameter GEM
190204// / Precision: 1E-3 %
191205// /
You can’t perform that action at this time.
0 commit comments