69def write_RecoTF(opts):
70
71 if "Athena" in opts.athena_project:
72
73 for item in RECO_TF_TURLS["RDO"]:
74 name = os.path.join("test", "test_directioart_athena_recotf_with_rdo_{}.sh".format(item.keys()[0].lower()))
75 print(
"\tGenerating ... {}".format(name))
76 outfile = open(name,'w')
77
78 outstring = """#!/bin/bash\n
79# art-description: DirectIOART Athena Reco_tf.py inputFile:RDO protocol={protocol}
80# art-type: grid
81# art-output: *.pool.root
82# art-include: 21.0/Athena
83# art-include: main/Athena\n
84set -e\n
85Reco_tf.py --AMI q221 --inputRDOFile {turl} --outputRDO_TRIGFile art.pool.root\n
86echo \"art-result: $? DirectIOART_Athena_RecoTF_inputRDO_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
87 outfile.write(outstring)
88 outfile.close()
89 os.system("chmod +x " + name)
90
91 if opts.mp:
92 name = os.path.join("test", "test_directioart_athenamp_recotf_with_rdo_{}.sh".format(item.keys()[0].lower()))
93 print(
"\tGenerating ... {}".format(name))
94 outfile = open(name,'w')
95
96 outstring = """#!/bin/bash\n
97# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RDO protocol={protocol}
98# art-type: grid
99# art-output: *.pool.root
100# art-include: 21.0/Athena
101# art-include: main/Athena\n
102set -e\n
103export ATHENA_CORE_NUMBER=2
104Reco_tf.py --AMI q221 --multiprocess --inputRDOFile {turl} --outputRDO_TRIGFile art.pool.root\n
105echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputRDO_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
106 outfile.write(outstring)
107 outfile.close()
108 os.system("chmod +x " + name)
109
110
111 for item in RECO_TF_TURLS["RAW"]:
112 name = os.path.join("test", "test_directioart_athena_recotf_with_raw_{}.sh".format(item.keys()[0].lower()))
113 print(
"\tGenerating ... {}".format(name))
114 outfile = open(name,'w')
115
116 outstring = """#!/bin/bash\n
117# art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol={protocol}
118# art-type: grid
119# art-output: *.pool.root
120# art-include: 21.0/Athena
121# art-include: main/Athena\n
122set -e\n
123Reco_tf.py --AMI q431 --inputBSFile {turl} --outputESDFile art.pool.root\n
124echo \"art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
125 outfile.write(outstring)
126 outfile.close()
127 os.system("chmod +x " + name)
128
129 if opts.mp:
130 name = os.path.join("test", "test_directioart_athenamp_recotf_with_raw_{}.sh".format(item.keys()[0].lower()))
131 print(
"\tGenerating ... {}".format(name))
132 outfile = open(name,'w')
133
134 outstring = """#!/bin/bash\n
135# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol={protocol}
136# art-type: grid
137# art-output: *.pool.root
138# art-include: 21.0/Athena
139# art-include: main/Athena\n
140set -e\n
141export ATHENA_CORE_NUMBER=2
142Reco_tf.py --AMI q431 --multiprocess --inputBSFile {turl} --outputESDFile art.pool.root\n
143echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0])
144 outfile.write(outstring)
145 outfile.close()
146 os.system("chmod +x " + name)
147
148
149 if "AthDerivation" in opts.athena_project:
150
151 for i
in xrange(len(TFILE_OPEN_TURLs)):
152
153 for key, value in TFILE_OPEN_TURLs[i].items():
154 name = os.path.join("test", "test_directioart_athderivation_recotf_with_aod_{}.sh".format(key.lower()))
155 print(
"\tGenerating ... {}".format(name))
156 outfile = open(name,'w')
157
158 outstring = """#!/bin/bash\n
159# art-description: DirectIOART AthDerivation Reco_tf.py inputFile:RDO protocol={protocol} reductionConf:TEST1
160# art-type: grid
161# art-output: *.pool.root
162# art-include: 21.2/AthDerivation\n
163set -e\n
164Reco_tf.py --inputAODFile {turl} --outputDAODFile art.pool.root --reductionConf TEST1 --maxEvents 100\n
165echo \"art-result: $? DirectIOART_AthDerivation_RecoTF_inputAOD_protocol_{protocol}_TEST1\"""".format(turl=value[0], protocol=key)
166 outfile.write(outstring)
167 outfile.close()
168 os.system("chmod +x " + name)
169