30
31 msg.info('This is {}'.format(sys.argv[0]))
32
33 trf = getTransform()
34 trf.parseCmdLineArgs(sys.argv[1:])
35
36
37
38 args = trf.argdict
39 if "eidsname" not in args:
40 dsname = None
41 for filetype in ('POOL', 'AOD', 'ESD', 'EVNT', 'HITS', 'RDO'):
42 if 'input'+filetype+'File' in args:
43 inputFile = args['input'+filetype+'File']
44 dsname = inputFile.dataset
45 if dsname is not None:
46 obj = trfArgClasses.argString(dsname)
47 args['eidsname'] = obj
48
49
50 trf.execute()
51
52
53 oname_spb = getOutputNames(args)
54 msg.info('Output file: {}'.format(oname_spb))
55
56 if (oname_spb is not None and "sendtobroker" in args
57 and args["sendtobroker"].value):
58
59 from EventIndexProducer.sendEI_SPB_Lib import eimrun
60 from EventIndexProducer.sendEI_SPB_Lib import options as eioptions
61
62
63 import base64
64 argv2 = []
65 argv2.append("-v")
66
67 if "testbrk" in args and args["testbrk"]:
68
69 earg = "fWIqIhAfKiAxAEoxOyMtB0IxLCwASz0tYS8RHStnPBxcZn5/" \
70 "fUdDaGQqBwMiYy44GAozPTYQHiQ8O2BZQjUoLAcFPysqYDMJ" \
71 "cT09QRISABg1MwcXPQlYS308fCkaCzUmNhoSfDx8YhcKNydx" \
72 "Fw5qe3t/WEJoKCgHBzMsKj8HQ3MAGT8+Hx0YFiRecRBsIFAC" \
73 "ewAFWEJoKCgHFTUsPSkAQxQ/LkIiNB86DT08dXAUAh8DBA4g" \
74 "PBl9ERQ8HhoALBwbXBF9CkY+HSRjYVkKKjo5FQo8LS4vH0Mx" \
75 "OyoR"
76 else:
77
78 earg = "fWIqIhAfKiAxAEoxOyMtB0IoK3EXAyIhYS8cVXN4b0VVfGJi" \
79 "OQcKN2U+AAo1OTslEBcxOitYS30/Lj8HDCotOlghNns7LkEb" \
80 "BwYIDSE4HTsaWEJoOmwRCDQ/ICUaG2k6bFoFNT0hYhcHf31r" \
81 "R0p9Yi47Bw4mKjoHFXx5Bgo/NwobCC42YXsWfyBZF30QPUp9" \
82 "Yi47BxwgKi0REnweOT1CKyEZKjUvA392BwIWFgIeGC4mdxcH" \
83 "PBcPBjwkCWMbexlGNwgic1lLNSA8KhUDKSs+Fw18Oz05EQ=="
84 eargs = ''.join(chr(c ^ ord(k)) for c, k in
85 zip(base64.b64decode(earg),
87 argv2.extend(eargs)
88 argv2.append(oname_spb)
89 eiopts = eioptions(argv2)
90
91
92 eimrun(msg, eiopts)
93
94 trf.generateReport()
95
96 msg.info("{} stopped at {}, trf exit code {:d}".format(sys.argv[0],
97 time.asctime(),
98 trf.exitCode))
99 sys.exit(trf.exitCode)
100
101
102
double cycle(double a, double b)
std::vector< std::string > split(const std::string &s, const std::string &t=":")