File indexing completed on 2025-01-18 09:14:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 from __future__ import absolute_import
0012
0013
0014 def run():
0015 import DigiTest
0016 digi = DigiTest.Test(geometry=None)
0017
0018 rdr_output = DigiTest.DEBUG
0019 input_action = digi.input_action('DigiParallelActionSequence/READER')
0020
0021 digi.info('Created SIGNAL input')
0022 signal = input_action.adopt_action('DigiDDG4ROOT/SignalReader',
0023 mask=0x0,
0024 input=[digi.next_input()],
0025 OutputLevel=rdr_output)
0026 digi.check_creation([signal])
0027
0028 digi.info('Creating collision overlays....')
0029
0030 overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-1')
0031 evtreader = overlay.adopt_action('DigiDDG4ROOT/Read-1', mask=0x1, input=[digi.next_input()], OutputLevel=rdr_output)
0032 digi.check_creation([overlay, evtreader])
0033 digi.info('Created input.overlay-1')
0034
0035 overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-2')
0036 evtreader = overlay.adopt_action('DigiDDG4ROOT/Read-2', mask=0x2, input=[digi.next_input()], OutputLevel=rdr_output)
0037 digi.check_creation([overlay, evtreader])
0038 digi.info('Created input.overlay-2')
0039
0040 event = digi.event_action('DigiSequentialActionSequence/EventAction')
0041 combine = event.adopt_action('DigiContainerCombine/Combine',
0042 parallel=True,
0043 input_masks=[0x0, 0x1, 0x2, 0x3],
0044 output_mask=0xFEED,
0045 output_segment='deposits',
0046 erase_combined=False)
0047 combine.erase_combined = True
0048 proc = event.adopt_action('DigiContainerSequenceAction/Weight',
0049 parallel=True,
0050 input_mask=0xFEED,
0051 input_segment='deposits',
0052 output_mask=0xBABE,
0053 output_segment='deposits')
0054 count = digi.create_action('DigiDepositWeightedPosition/CellsWeighted')
0055 proc.adopt_container_processor(count, digi.containers())
0056
0057 event.adopt_action('DigiStoreDump/StoreDump')
0058 digi.info('Created event.dump')
0059
0060
0061 digi.run_checked(num_events=5, num_threads=5, parallel=3)
0062
0063
0064 if __name__ == '__main__':
0065 run()