diff --git a/k4FWCore/scripts/k4run b/k4FWCore/scripts/k4run index 12d24df2..1526e61f 100755 --- a/k4FWCore/scripts/k4run +++ b/k4FWCore/scripts/k4run @@ -60,11 +60,9 @@ def add_arguments(parser, app_mgr): # skip public tools and the applicationmgr itself if "ToolSvc" in conf.name() or "ApplicationMgr" in conf.name(): continue - props = ( - conf.getPropertiesWithDescription() - ) # dict propertyname: (propertyvalue, propertydescription) + # dict propertyname: (propertyvalue, propertydescription) + props = conf.getPropertiesWithDescription() for prop in props: - # only add arguments for relevant properties if ( prop in FILTER_GAUDI_PROPS or "Audit" in prop @@ -208,7 +206,12 @@ def main(): opts_dict = vars(opts) for optionName, propTuple in option_db.items(): logger.info("Option name: %s %s %s", propTuple[1], optionName, opts_dict[optionName]) - propTuple[0].setProp(propTuple[1].rsplit(".", 1)[1], opts_dict[optionName]) + if "_Axis" in optionName: + propTuple[0].setProp( + propTuple[1].rsplit(".", 1)[1], tuple(x for x in opts_dict[optionName] if x != ()) + ) + else: + propTuple[0].setProp(propTuple[1].rsplit(".", 1)[1], opts_dict[optionName]) if opts.verbose: from Gaudi.Configuration import VERBOSE diff --git a/test/k4FWCoreTest/options/ExampleFunctionalTransformerHist.py b/test/k4FWCoreTest/options/ExampleFunctionalTransformerHist.py index c81e249d..334ffab8 100644 --- a/test/k4FWCoreTest/options/ExampleFunctionalTransformerHist.py +++ b/test/k4FWCoreTest/options/ExampleFunctionalTransformerHist.py @@ -73,6 +73,14 @@ root_hist_svc = RootHistoSink("RootHistoSink") root_hist_svc.FileName = "functional_transformer_hist.root" +try: + transformer1.CustomHistogram_Title = "Custom Title" + # Bins can be defined here + transformer1.CustomHistogram_Axis0 = (10, -5.0, 10.0, "X") +# Before Gaudi v40 there isn't a way to set the bins from python +except Exception: + pass + app = ApplicationMgr( TopAlg=[producer1, producer2, transformer1, transformer2],