12 msg.info(
'logging set in %s', sys.argv[0])
16 from PyJobTransforms.trfArgs
import addAthenaArguments, addDetectorArguments
17 from PyJobTransforms.trfDecorators
import stdTrfExceptionHandler, sigUsrStackTrace
18 from RecJobTransforms.recTransformUtils
import addCommonRecTrfArgs
21 from PyJobTransforms.trfArgs
import addExtraDPDTypes
22 from PATJobTransforms.PATTransformUtils
import addNTUPMergeSubsteps, addPhysValidationMergeFiles
23 from PATJobTransforms.PATTransformUtils
import addDAODArguments, addDAODMergerSubsteps
27 @stdTrfExceptionHandler
31 msg.info(
'This is %s', sys.argv[0])
34 trf.parseCmdLineArgs(sys.argv[1:])
38 msg.info(
"%s stopped at %s, trf exit code %d", sys.argv[0], time.asctime(), trf.exitCode)
39 sys.exit(trf.exitCode)
43 executorSet.add(POOLMergeExecutor(name =
'ESDMerge', inData = [
'ESD'], outData = [
'ESD_MRG']))
44 executorSet.add(POOLMergeExecutor(name =
'AODMerge', inData = [
'AOD'], outData = [
'AOD_MRG']))
45 executorSet.add(DQMergeExecutor(name =
'DQHistogramMerge', inData = [(
'HIST_ESD',
'HIST_AOD'),
'HIST'], outData = [
'HIST_MRG']))
46 executorSet.add(bsMergeExecutor(name =
'RAWFileMerge', exe =
'file_merging', inData =
set([
'BS']), outData =
set([
'BS_MRG'])))
47 executorSet.add(athenaExecutor(name =
'EVNTMerge', skeletonCA =
'EvgenJobTransforms.EVNTMerge_Skeleton', inData = [
'EVNT'], outData = [
'EVNT_MRG']))
65 from SimuJobTransforms.SimTransformUtils
import addHITSMergeArguments
67 trf.appendToExecutorSet(athenaExecutor(name =
'HITSMerge', substep=
'hitsmerge',
68 skeletonCA =
'SimuJobTransforms.HITSMerge_Skeleton',
69 tryDropAndReload =
False, inData = [
'HITS'], outData = [
'HITS_MRG']))
71 trf.appendToExecutorSet(athenaExecutor(name =
'RDOMerge',
72 skeletonCA =
'SimuJobTransforms.RDOMerge_Skeleton',
73 inData = [
'RDO'], outData = [
'RDO_MRG']))
75 trf.parser.defineArgGroup(
'RDOMerge_tf',
'RDO merge job specific options')
76 trf.parser.add_argument(
'--inputRDOFile', nargs=
'+',
77 type=trfArgClasses.argFactory(trfArgClasses.argRDOFile, io=
'input'),
78 help=
'Input RDO file', group=
'RDOMerge_tf')
79 trf.parser.add_argument(
'--outputRDO_MRGFile',
'--outputRDOFile',
80 type=trfArgClasses.argFactory(trfArgClasses.argRDOFile, io=
'output'),
81 help=
'Output merged RDO file', group=
'RDOMerge_tf')
82 trf.parser.add_argument(
'--PileUpPresampling',
83 type=trfArgClasses.argFactory(trfArgClasses.argBool),
84 help=
'Run digitization with pile-up presampling configuration.', group=
'RDOMerge_tf')
85 except ImportError
as e:
86 msg.warning(
'Failed to import simulation arguments ({0}). HITSMerge and RDOMerge will not be available.'.
format(e))
94 parser.defineArgGroup(
'ESDMerge_tf',
'ESD merge job specific options')
95 parser.add_argument(
'--inputESDFile', nargs=
'+',
96 type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io=
'input'),
97 help=
'Input ESD file', group=
'ESDMerge_tf')
98 parser.add_argument(
'--outputESD_MRGFile',
'--outputESDFile',
99 type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io=
'output'),
100 help=
'Output merged ESD file', group=
'ESDMerge_tf')
102 parser.defineArgGroup(
'AODMerge_tf',
'AOD merge job specific options')
103 parser.add_argument(
'--inputAODFile', nargs=
'+',
104 type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io=
'input', type=
'aod'),
105 help=
'Input AOD file', group=
'AODMerge_tf')
106 parser.add_argument(
'--inputAOD_MRGFile', nargs=
'+',
107 type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io=
'input', type=
'aod'),
108 help=
'Input (premarged) AOD file', group=
'AODMerge_tf')
109 parser.add_argument(
'--outputAOD_MRGFile',
'--outputAODFile',
110 type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io=
'output', type=
'aod'),
111 help=
'Output merged AOD file', group=
'AODMerge_tf')
113 parser.defineArgGroup(
'DQHistMerge_tf',
'DQ merge specific options')
114 parser.add_argument(
'--inputHISTFile', nargs=
'+',
115 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'input', runarg=
True, type=
'hist'),
116 help=
'Input DQ HIST file', group=
'DQHistMerge_tf')
117 parser.add_argument(
'--inputHIST_AODFile', nargs=
'+',
118 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'input', runarg=
True, type=
'hist_aod',
120 help=
'Input DQ AOD step monitoring file', group=
'DQHistMerge_tf')
121 parser.add_argument(
'--inputHIST_ESDFile', nargs=
'+',
122 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'input', runarg=
True, type=
'hist_esd',
124 help=
'Input DQ AOD step monitoring file', group=
'DQHistMerge_tf')
125 parser.add_argument(
'--outputHIST_MRGFile',
'--outputHISTFile', nargs=
'+',
126 type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io=
'output', runarg=
True, type=
'hist'),
127 help=
'Output DQ monitoring file', group=
'DQHistMerge_tf')
129 parser.defineArgGroup(
'RAWMerge_tf',
'RAWMerge specific options')
130 parser.add_argument(
'--inputBSFile', nargs=
'+',
131 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'input'),
132 help=
'Input BS file(s)', group=
'RAWMerge_tf')
133 parser.add_argument(
'--outputBS_MRGFile',
'--outputBSFile',
134 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io=
'output'),
135 help=
'Output merged BS file (best if this file ends in ._0001.data, but see allowRename option below)',
137 parser.add_argument(
'--maskEmptyInputs', type=trfArgClasses.argFactory(trfArgClasses.argBool), group=
'RAWMerge_tf',
138 help=
'If true then empty BS files are not included in the merge (default True)',
139 default=trfArgClasses.argBool(
'True'))
140 parser.add_argument(
'--allowRename', type=trfArgClasses.argFactory(trfArgClasses.argBool), group=
'RAWMerge_tf',
141 help=
'If true merged BS file will be forcibly renamed to the value of "outputBSFile" (default True)',
142 default=trfArgClasses.argBool(
'True'))
144 parser.defineArgGroup(
'EVNTMerge_tf',
'EVNT merge job specific options')
145 parser.add_argument(
'--inputEVNTFile', nargs=
'+',
146 type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io=
'input', runarg=
True, type=
'evnt'),
147 help=
'Input EVNT file', group=
'EVNTMerge_tf')
148 parser.add_argument(
'--outputEVNT_MRGFile',
'--outputEVNTFile',
149 type=trfArgClasses.argFactory(trfArgClasses.argEVNTFile, io=
'output', runarg=
True, type=
'evnt'),
150 help=
'Output merged EVNT file', group=
'EVNTMerge_tf')
151 parser.add_argument(
'--eventService', type=trfArgClasses.argFactory(trfArgClasses.argBool), metavar =
"BOOL",
152 help=
'Switch AthenaMP to the Event Service configuration', group=
'EVNTMerge_tf')
155 if __name__ ==
'__main__':