00001
00002
00003 import sys, os
00004
00005 detxml = os.getenv("XMLDETDESCROOT")
00006 if not detxml:
00007 print "Warning: no XMLDETDESCROOT variable and no cmd line arg for detector xml"
00008 sys.exit(1)
00009 else:
00010 detxml += "/DDDB/dayabay.xml"
00011
00012 try:
00013 volume = sys.argv[1]
00014 except IndexError:
00015 volume = "/dd/Geometry/DayaBay/lvDayaBay"
00016
00017 try:
00018 shots = sys.argv[2]
00019 except IndexError:
00020 shots = 1000
00021
00022 from Gaudi.Configuration import *
00023 conf = ApplicationMgr()
00024 conf.EvtSel = "NONE"
00025
00026 from XmlTools.XmlToolsConf import XmlCnvSvc, XmlParserSvc
00027 xmlcnv = XmlCnvSvc()
00028 xmlcnv.AllowGenericConversion = True
00029 xmlparse = XmlParserSvc()
00030 conf.ExtSvc += [ xmlcnv , xmlparse ]
00031
00032 detper = DetectorPersistencySvc()
00033 detper.CnvServices.append(xmlcnv)
00034
00035 detdat = DetectorDataSvc()
00036 detdat.UsePersistency = True
00037 detdat.DetDbRootName = "dd"
00038 detdat.DetStorageType = 7
00039 detdat.DetDbLocation = detxml
00040
00041 from DetDescChecks.DetDescChecksConf import DetDesc__CheckOverlap as CheckOver
00042 co = CheckOver()
00043 co.Shots = shots
00044 co.Volume = volume
00045 conf.TopAlg = [ co ]
00046
00047 from GaudiPython import AppMgr
00048 app = AppMgr()
00049 app.run(1)
00050
00051