11 parser = optparse.OptionParser()
12 parser.add_option(
'-s',
'--submission-dir', dest =
'submission_dir',
13 action =
'store', type =
'string', default =
'submitDir',
14 help =
'Submission directory for EventLoop' )
15 parser.add_option(
'-u',
'--unit-test', dest=
'unit_test',
16 action =
'store_true', default =
False,
17 help =
'Run the job in "unit test mode"' )
18 ( options, args ) = parser.parse_args()
29 sh = ROOT.SH.SampleHandler()
30 sh.setMetaString(
'nc_tree',
'CollectionTree' )
31 sample = ROOT.SH.SampleLocal (dataType)
32 sample.add (os.getenv (
"ASG_TEST_FILE_MC"))
38 job.sampleHandler( sh )
39 job.options().setDouble( ROOT.EL.Job.optMaxEvents, 500 )
41 from AsgAnalysisAlgorithms.AsgAnalysisAlgorithmsTest
import makePileupSequence
44 algSeq.addSelfToJob( job )
47 job.outputAdd( ROOT.EL.OutputStream(
'ANALYSIS' ) )
50 submitDir = options.submission_dir
54 submitDir = tempfile.mkdtemp( prefix =
'genTest_', dir = os.getcwd() )
59 driver = ROOT.EL.DirectDriver()
60 driver.submit( job, submitDir )