ATLAS Offline Software
Loading...
Searching...
No Matches
NTUPMerge_tf Namespace Reference

Functions

 main ()
 getTransform ()

Function Documentation

◆ getTransform()

NTUPMerge_tf.getTransform ( )

Definition at line 34 of file NTUPMerge_tf.py.

34def getTransform():
35 msg.debug("in getTransform...")
36
37 # get the default executor list
38 executorSet = set()
39 # instantiate a transform with no steps
40 trf = transform(executor = executorSet, description = 'ATLAS NTUPLE merge and post-processing transform')
41
42 # add custom merge and post-processing steering parameters for PhysVal
43 addPhysValidationMergeFiles(trf.parser)
44
45 # additional formats
46 addExtraDPDTypes(trf.parser, transform=trf, NTUPMergerArgs = True)
47
48 args = trf.parser.parse_args()
49 msg.debug("args:", args)
50
51 # executor steps
52 mergeStepSet = set()
53
54 # Check the user's optional parameters
55 # NOTE: we need to first check if the arg is present,
56 # then we get the value. When not specified, in fact,
57 # the optional args are not present in the list of
58 # args. Also, if we only check its existence,
59 # we don't get its value when set with set()
60 skipPP = args.skipPostProcessing if 'skipPostProcessing' in args else False
61
62 # add to the transform the merge and
63 # post-processing steps conditionally
64 # based on user's input
65 addNTUPMergeSubsteps(mergeStepSet, skip_post_processing = skipPP)
66
67 trf.appendToExecutorSet(list(mergeStepSet))
68
69 return trf
70
STL class.

◆ main()

NTUPMerge_tf.main ( )

Definition at line 21 of file NTUPMerge_tf.py.

21def main():
22 msg.info('This is %s', sys.argv[0])
23 if sys.argv[1:] == []:
24 msg.info("%s stopped at %s, no input parameters given", sys.argv[0], time.asctime())
25
26 trf = getTransform()
27 trf.parseCmdLineArgs(sys.argv[1:])
28 trf.execute()
29 trf.generateReport()
30
31 msg.info("%s stopped at %s, tf exit code %d", sys.argv[0], time.asctime(), trf.exitCode)
32 sys.exit(trf.exitCode)
33
int main()
Definition hello.cxx:18