from TestTools.iobench import ScOutput from TestTools.iobench import BenchSequence from McParticleTests.tests import doMcAodTupleValidation def timeofday(): from time import time return int(time()) uuid = "%s_%s" % (os.getpid(), timeofday()) print("#" * 80) print("## testing TruthParticleContainer (read/write) persistency...") print("## Job uuid:", uuid) bench = BenchSequence("TruthParticleContainer (read/write) persistency") ###----------------------------------------------------- dataFilesDir = "/afs/cern.ch/atlas/offline/data/testfile" dataRefDir = "/afs/cern.ch/atlas/offline/test" asciiFiles = { 'w': { 'ref': os.path.join(dataRefDir, "mc.aod.etisols.rel_13.ref"), 'chk': workDir("mc.aod.txt"), }, 'r': { 'ref': os.path.join(dataRefDir, "reaccessed.mc.aod.etisols.rel_13.ref"), 'chk': workDir("reaccessed.mc.aod.txt"), },
continue sc, out = subprocess.getstatusoutput("mv %s %s" % (refFile, workDir(refFile))) if sc != 0: print ("## ERROR: could not install [%s] into [%s]" %\ ( refFile, workDir(refFile) )) print("## reason:\n", out) continue else: print(" -%s" % workDir(refFile)) return print("#" * 80) print("## testing symlinks for TruthParticleContainer...") bench = BenchSequence("Symlinks for TruthParticleContainer") print("## installing reference files...") installRefFiles([ "mc.aod.symlinks.ref", "mc.aod.pysymlinks.ref", ]) evtMax = 5 ###----------------------------------------------------- print("## Testing [writing]...") jobOptions = [ ChapPy.JobOptionsCmd("OUTPUT=\"%s\"" % workDir("mc.aod.symlinks.pool")), ChapPy.JobOptions("McParticleTests/symlinkTest_mcAod_jobOptions.py"), ]
EVTMAX = 100 NTIMES = 1 def timeofday(): from time import time return int(time()) uuid = "%s_%s" % (os.getpid(),timeofday()) genEventFile = workDir("mc.event.%s.pool"%uuid) mcAodFile = workDir("mc.aod.%s.pool"%uuid) print "#"*80 print "## testing TruthParticleContainer I/O..." print "## Job uuid:",uuid benchSequence = BenchSequence( "TruthParticleContainer I/O" ) ###----------------------------------------------------- if os.path.exists(genEventFile): print "## Re-using input data..." else: print "## Preparing input data..." jobOptions = [ ChapPy.JobOptionsCmd( "OUTPUT=\"%s\"" % genEventFile ), ChapPy.JobOptionsCmd( "DUMP=False" ), ChapPy.JobOptions( "McParticleTests/iotest_WriteGenEvent_jobOptions.py" ), ] athena = ChapPy.Athena( jobOptions = jobOptions, checkLeak = False ) athena.EvtMax = EVTMAX athena.run()
import os import sys from AthenaCommon import ChapPy ###----------------------------------------------------- ## For compatibility with ATN tests from TestTools.iobench import workDir ###----------------------------------------------------- ## Little helper to validate output of jobs from TestTools.iobench import ScOutput from TestTools.iobench import BenchSequence ## PerfMon helper from PerfMonTests.tests import testPerfMon print("#" * 80) print("## PerfMon test... [leakyalg]") print("#" * 80) bench = BenchSequence("PerfMonTest") bench += testPerfMon("PerfMonTests/test_perfMonSvc_leakyalg.py", "perfmon.leakyalg.root", evtMax=5000) print("") print("#" * 80) bench.printStatus() print("## Bye.") print("#" * 80)
import commands from AthenaCommon import ChapPy ###----------------------------------------------------- ## For compatibility with ATN tests from TestTools.iobench import workDir ###----------------------------------------------------- ## Little helper to validate output of jobs from TestTools.iobench import doValidation from TestTools.iobench import ScOutput from TestTools.iobench import BenchSequence print "#" * 80 print "## testing McEventCollection (read/back) persistency..." bench = BenchSequence("McEventCollection (read/back) persistency") ###----------------------------------------------------- dataFilesDir = "/afs/cern.ch/atlas/offline/data/testfile" dataRefDir = "/afs/cern.ch/atlas/offline/test" asciiFiles = { 'rel_1004': { 'ref': os.path.join(dataRefDir, 'mc.event.rel_1004.ref'), 'chk': workDir('mc.event.rel_1004.txt'), 'in': os.path.join( dataFilesDir, "q02initialprod.0001.H_2e2mu.q02dig_1004.etacut.0001_extract.pool.root"
from TestTools.iobench import doValidation from TestTools.iobench import ScOutput from TestTools.iobench import BenchSequence def timeofday(): from time import time return int(time()) uuid = "%s_%s" % (os.getpid(), timeofday()) print("#" * 80) print("## testing McEventCollection I/O...") print("## Job uuid:", uuid) benchSequence = BenchSequence("McEventCollection I/O") EVTMAX = 100 NTIMES = 1 ###----------------------------------------------------- print("## Testing [writing]...") jobOptions = [ ChapPy.JobOptionsCmd("OUTPUT=\"%s\"" % workDir("mc.io.event.%s.pool" % uuid)), ChapPy.JobOptionsCmd("DUMP=False"), ChapPy.JobOptions("McParticleTests/iotest_WriteGenEvent_jobOptions.py"), ] athena = ChapPy.Athena( jobOptions=jobOptions,
from AthenaCommon import ChapPy ###----------------------------------------------------- ## For compatibility with ATN tests from TestTools.iobench import workDir ###----------------------------------------------------- ## Little helper to validate output of jobs from TestTools.iobench import ScOutput from TestTools.iobench import BenchSequence from McParticleTests.tests import doTupleValidation print "#" * 80 print "## testing McEventCollection (read/write) persistency..." print "#" * 80 bench = BenchSequence("McEventCollection (read/write) ASCII persistency") ###----------------------------------------------------- outFiles = { 'gen_pythia': { 'ref': workDir("mc.event.pythia.pool"), 'chk': workDir("reaccessed.mc.event.pythia.pool"), }, 'gen_herwig': { 'ref': workDir("mc.event.herwig.pool"), 'chk': workDir("reaccessed.mc.event.herwig.pool"), }, } evtMax = 50