4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 kwargs.setdefault(
"bufferSize", 8192)
18 from AthenaConfiguration.ComponentFactory
import CompFactory
19 EFTrackingXrtAlgorithm = CompFactory.EFTrackingXrtAlgorithm(
"EFTrackingXrtAlgorithm", **kwargs)
21 acc.addEventAlgo(EFTrackingXrtAlgorithm)
25 if __name__ ==
"__main__":
26 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
30 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
33 from argparse
import ArgumentParser
34 argumentParser = ArgumentParser()
35 argumentParser.add_argument(
"--xclbinPath")
36 argumentParser.add_argument(
"--bufferSize", type = int, default = 8192)
38 from argparse
import Action
40 def __call__(self, parser, namespace, values, option_string=None):
41 from json
import loads
42 setattr(namespace, self.dest, loads(values))
44 argumentParser.add_argument(
"--kernelDefinitions", action=JsonToDictAction)
45 argumentParser.add_argument(
"--inputCsvPathToSgKeyMap", action=JsonToDictAction)
46 argumentParser.add_argument(
"--outputCsvPathToSgKeyMap", action=JsonToDictAction)
48 arguments = argumentParser.parse_args()
50 from AthenaConfiguration.ComponentFactory
import CompFactory
51 acc.addService(CompFactory.AthXRT.DeviceMgmtSvc(XclbinPathsList = [arguments.xclbinPath]))
53 for inputCsvPath, sgKey
in arguments.inputCsvPathToSgKeyMap.items():
54 from EFTrackingDataStreamLoaderAlgorithmConfig
import EFTrackingDataStreamLoaderAlgorithmCfg
56 bufferSize = arguments.bufferSize,
57 inputCsvPath = inputCsvPath,
58 inputDataStream = sgKey))
61 bufferSize = arguments.bufferSize,
62 xclbinPath = arguments.xclbinPath,
63 kernelDefinitions = arguments.kernelDefinitions))
65 for outputCsvPath, sgKey
in arguments.outputCsvPathToSgKeyMap.items():
66 from EFTrackingDataStreamUnloaderAlgorithmConfig
import EFTrackingDataStreamUnloaderAlgorithmCfg
68 outputCsvPath = outputCsvPath,
69 outputDataStream = sgKey))