File indexing completed on 2026-04-19 08:00:05
0001 import sys
0002 import time
0003
0004 from pandaharvester.harvestercore.job_spec import JobSpec
0005 from pandaharvester.harvestercore.plugin_factory import PluginFactory
0006 from pandaharvester.harvestercore.queue_config_mapper import QueueConfigMapper
0007
0008 queueName = sys.argv[1]
0009
0010
0011 queueConfigMapper = QueueConfigMapper()
0012
0013 queueConfig = queueConfigMapper.get_queue(queueName)
0014
0015
0016 jobSpec = JobSpec()
0017 jobSpec.computingSite = sys.argv[1]
0018 jobSpec.jobParams = {
0019 "inFiles": "EVNT.06820166._000001.pool.root.1",
0020 "scopeIn": "mc15_13TeV",
0021 "fsize": "196196765",
0022 "GUID": "B7F387CD-1F97-1C47-88BD-D8785442C49D",
0023 "checksum": "ad:326e445d",
0024 "ddmEndPointIn": "MWT2_DATADISK",
0025 "realDatasetsIn": "mc15_13TeV:mc15_13TeV.301042.PowhegPythia8EvtGen_AZNLOCTEQ6L1_DYtautau_250M400.evgen.EVNT.e3649_tid06820166_00",
0026 }
0027
0028
0029 pluginFactory = PluginFactory()
0030
0031
0032 preparatorCore = pluginFactory.get_plugin(queueConfig.preparator)
0033 print(f"plugin={preparatorCore.__class__.__name__}")
0034
0035 print("testing preparation")
0036 tmpStat, tmpOut = preparatorCore.trigger_preparation(jobSpec)
0037 if tmpStat:
0038 print(" OK")
0039 else:
0040 print(f" NG {tmpOut}")
0041
0042 print
0043
0044 print("testing status check")
0045 while True:
0046 tmpStat, tmpOut = preparatorCore.check_stage_in_status(jobSpec)
0047 if tmpStat is True:
0048 print(" OK")
0049 break
0050 elif tmpStat is False:
0051 print(f" NG {tmpOut}")
0052 sys.exit(1)
0053 else:
0054 print(" still running. sleep 1 min")
0055 time.sleep(60)
0056
0057 print
0058
0059 print("checking path resolution")
0060 tmpStat, tmpOut = preparatorCore.resolve_input_paths(jobSpec)
0061 if tmpStat:
0062 print(f" OK {jobSpec.jobParams['inFilePaths']}")
0063 else:
0064 print(f" NG {tmpOut}")