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   """
0016     Small test for process splitting by segmentation.
0017     Assigned parts of the segmentation are processed by a specified
0018     container action (here a DigiSegmentDepositPrint instance)
0019 
0020     \author  M.Frank
0021     \version 1.0
0022   """
0023   import DigiTest
0024   digi = DigiTest.Test(geometry=None)
0025   digi.load_geo()
0026   input_action = digi.input_action('DigiParallelActionSequence/READER')
0027   # ========================================================================
0028   digi.info('Created SIGNAL input')
0029   signal = input_action.adopt_action('DigiDDG4ROOT/SignalReader',
0030                                      mask=0x0,
0031                                      input=[digi.next_input()])
0032   digi.check_creation([signal])
0033   # ========================================================================
0034   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0035   split_action = event.adopt_action('DigiContainerSequenceAction/SplitSequence',
0036                                     parallel=True,
0037                                     input_mask=0x0,
0038                                     input_segment='inputs',
0039                                     output_segment='deposits',
0040                                     output_mask=0xFEED)
0041   splitter = digi.create_action('DigiSegmentSplitter/Splitter',
0042                                 parallel=True,
0043                                 split_by='module',
0044                                 detector='Minitel1',
0045                                 processor_type='DigiSegmentDepositPrint')
0046   split_action.adopt_container_processor(splitter, splitter.collection_names())
0047 
0048   event.adopt_action('DigiStoreDump/StoreDump')
0049   digi.info('Created event.dump')
0050   # ========================================================================
0051   digi.run_checked(num_events=5, num_threads=10, parallel=3)
0052 
0053 
0054 if __name__ == '__main__':
0055   run()