Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-11 08:41:04

0001 #!/usr/bin/env python
0002 # Licensed under the Apache License, Version 2.0 (the "License");
0003 # you may not use this file except in compliance with the License.
0004 # You may obtain a copy of the License at
0005 # http://www.apache.org/licenses/LICENSE-2.0
0006 #
0007 # Authors:
0008 # - Wen Guan, wen.guan@cern.ch, 2017
0009 
0010 """
0011 Hooks for ARC-ControlTower EventService.
0012 """
0013 
0014 from pilot.eventservice.eshook import ESHook
0015 
0016 
0017 class ACTESHook(ESHook):
0018     def get_payload(self):
0019         """
0020         Get payload to execute.
0021 
0022         :returns: dict {'payload': <cmd string>, 'output_file': <filename or without it>, 'error_file': <filename or without it>}
0023         """
0024         raise Exception("Not Implemented")
0025 
0026     def get_event_ranges(self, num_ranges=1):
0027         """
0028         Get event ranges.
0029 
0030         :returns: dict of event ranges.
0031                  None if no available events.
0032         """
0033         raise Exception("Not Implemented")
0034 
0035     def handle_out_message(self, message):
0036         """
0037         Handle ES output or error messages.
0038 
0039         :param message: a dict of parsed message.
0040                         For 'finished' event ranges, it's {'id': <id>, 'status': 'finished', 'output': <output>, 'cpu': <cpu>,
0041                                                            'wall': <wall>, 'message': <full message>}.
0042                         Fro 'failed' event ranges, it's {'id': <id>, 'status': 'finished', 'message': <full message>}.
0043         """
0044         raise Exception("Not Implemented")