diff --git a/DDDigi/plugins/DigiSegmentDepositPrint.cpp b/DDDigi/plugins/DigiSegmentDepositPrint.cpp index 471201ecfacba642be1ad0ab8c269240272ae7fd..9c3007728d6373a478f9fbea3230b6548eee67e5 100644 --- a/DDDigi/plugins/DigiSegmentDepositPrint.cpp +++ b/DDDigi/plugins/DigiSegmentDepositPrint.cpp @@ -54,8 +54,7 @@ namespace dd4hep { else if ( const auto* v = work.get_input<DepositVector>() ) std::for_each(v->begin(), v->end(), call); else - error("+++ Request to dump an invalid container %s", - Key::key_name(work.input.key.item())); + error("+++ Request to dump an invalid container %s", Key::key_name(work.input.key.item()).c_str()); } }; } // End namespace digi diff --git a/DDDigi/python/dddigi.py b/DDDigi/python/dddigi.py index c808cfa693823636cef6236fc617824c625ad998..a525ba70aa67dceceacf4385e4f413909c3a4ff5 100644 --- a/DDDigi/python/dddigi.py +++ b/DDDigi/python/dddigi.py @@ -229,16 +229,18 @@ def _get_container_action(self): def TestAction(kernel, nam, sleep=0): - obj = Interface.createEventAction(kernel, str('DigiTestAction/' + nam)) + obj = Interface.createAction(kernel, str('DigiTestAction/' + nam)) if sleep != 0: obj.sleep = sleep return obj # --------------------------------------------------------------------------- -def Action(kernel, nam): - obj = Interface.createAction(kernel, str(nam)) - return obj +def Action(kernel, nam, **options): + action = Interface.createAction(kernel, str(nam)) + for option in options.items(): + setattr(action, option[0], option[1]) + return action # --------------------------------------------------------------------------- @@ -335,8 +337,8 @@ def _props2(obj, **extensions): # --------------------------------------------------------------------------- -_setup('DigiSynchronize', py_call=_adopt_event_action) -_setup('DigiActionSequence', py_call=_adopt_event_action) +_setup('DigiSynchronize', call='adopt', py_call=_adopt_event_action) +_setup('DigiActionSequence', call='adopt', py_call=_adopt_event_action) _import_class('digi', 'DigiKernel') _import_class('digi', 'DigiContext') diff --git a/examples/DDDigi/scripts/TestFramework.py b/examples/DDDigi/scripts/TestFramework.py index 0173d3795205c54a5be7035554bcb2e7aebb28f0..bf332ba1c634b64804a9052c8edcaefbb40dc2e5 100644 --- a/examples/DDDigi/scripts/TestFramework.py +++ b/examples/DDDigi/scripts/TestFramework.py @@ -32,7 +32,7 @@ def make_subdetector(kernel, name): action_3 = dddigi.TestAction(kernel, name + '_deadChan', 100) action_4 = dddigi.TestAction(kernel, name + '_noiseChan', 50) action_5 = dddigi.TestAction(kernel, name + '_merge', 200) - seq = dddigi.ActionSequence(kernel, 'DigiActionSequence/' + name + '_sequence', True) + seq = dddigi.Action(kernel, 'DigiActionSequence/' + name + '_sequence', parallel=True) seq.adopt(action_1) seq.adopt(action_2) seq.adopt(action_3) @@ -53,7 +53,7 @@ def run(): digi = dddigi.Digitize(kernel) digi.printDetectors() - event_processor = dddigi.Synchronize(kernel, 'DigiSynchronize/MainDigitizer', True) + event_processor = dddigi.Action(kernel, 'DigiSynchronize/MainDigitizer') event_processor.parallel = True # input make_input(kernel)