Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:54

0001 # ==========================================================================
0002 #  AIDA Detector description implementation
0003 # --------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 # ==========================================================================
0011 from __future__ import absolute_import
0012 
0013 
0014 def run():
0015   import DigiTest
0016   digi = DigiTest.Test(geometry=None)
0017   digi.load_geo()
0018   input_action = digi.input_action('DigiParallelActionSequence/READER')
0019   # ========================================================================
0020   digi.info('Created SIGNAL input')
0021   signal = input_action.adopt_action('DigiDDG4ROOT/SignalReader',
0022                                      mask=0x0,
0023                                      input=[digi.next_input()])
0024   digi.check_creation([signal])
0025   # ========================================================================
0026   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0027   split_action = event.adopt_action('DigiContainerSequenceAction/SplitSequence',
0028                                     parallel=True,
0029                                     input_mask=0x0,
0030                                     input_segment='inputs',
0031                                     output_segment='deposits',
0032                                     output_mask=0xFEED)
0033   splitter = digi.create_action('DigiSegmentSplitter/Splitter',
0034                                 parallel=True,
0035                                 split_by='module',
0036                                 detector='Minitel1')
0037   printer = digi.create_action('DigiSegmentDepositPrint/P1')
0038   splitter.get().adopt_segment_processor(printer, 1)
0039   printer = digi.create_action('DigiSegmentDepositPrint/P2')
0040   splitter.adopt_segment_processor(printer, [2, 3, 4, 5, 6])
0041   printer = digi.create_action('DigiSegmentDepositPrint/P3')
0042   splitter.adopt_segment_processor(printer, [7, 8, 9])
0043   split_action.adopt_container_processor(splitter, splitter.collection_names())
0044 
0045   event.adopt_action('DigiStoreDump/StoreDump')
0046   digi.info('Created event.dump')
0047   # ========================================================================
0048   digi.run_checked(num_events=5, num_threads=10, parallel=3)
0049 
0050 
0051 if __name__ == '__main__':
0052   run()