File indexing completed on 2026-10-04 08:13:06
0001
0002
0003
0004
0005
0006
0007 import os
0008 from GaudiConf import IOHelper
0009 from Gaudi.Configuration import *
0010 from Configurables import LHCbConfigurableUser, LHCbApp, CondDB, ToolSvc, EventSelector
0011 from Configurables import LoadDD4hepDet, LbDD4hepExample
0012
0013
0014
0015
0016
0017 class MyTest(LHCbConfigurableUser):
0018
0019 __slots__ = {"DDDBtag": "", "CondDBtag": "", "UseDBSnapshot": False,
0020 "PartitionName": "LHCb", "DBSnapshotDirectory": "/group/online/hlt/conditions"
0021 }
0022
0023 _propertyDocDct = {'DDDBtag': """ Tag for DDDB """, 'CondDBtag': """ Tag for CondDB """,
0024 "UseDBSnapshot":
0025 """Use a snapshot for velo position and rich pressure""",
0026 "PartitionName":
0027 """Name of the partition when running (needed to find DB: '', 'FEST', or 'LHCb'""",
0028 "DBSnapshotDirectory": """Local Directory where the snapshot is"""
0029 }
0030
0031
0032 def __apply_configuration__(self):
0033 actor = LoadDD4hepDet()
0034 actor.OutputLevel = DEBUG
0035
0036 actor.SetupPlugins = ['DDDB_DetectorDump', 'DD4hep_InteractiveUI', 'DD4hep_Rint']
0037 actor.DumpDetElements = 0
0038 actor.DumpDetVolumes = 0
0039 actor.DumpConditions = ""
0040
0041
0042
0043 actor.ScanConditions = 0
0044 pxml = None
0045 try:
0046 pxml = os.path.join(os.path.dirname(os.path.realpath(__file__)), "Parameters.xml")
0047 except Exception:
0048 pxml = os.path.join(os.getcwd(), "Parameters.xml")
0049 actor.Parameters = "file://" + pxml
0050 actor.VisAttrs = os.path.join(os.getcwd(), "Visattrs.xml")
0051
0052
0053 example_alg = LbDD4hepExample()
0054 ApplicationMgr().TopAlg = [actor, example_alg]
0055
0056
0057
0058 theApp = MyTest()
0059 ToolSvc.LogLevel = DEBUG
0060 cdb = CondDB()
0061 tag = {"DDDB": '', "LHCBCOND": 'default',
0062 "SIMCOND": '', "ONLINE": 'fake'
0063 }
0064 cdb.Tags = tag
0065 cdb.setProp('IgnoreHeartBeat', True)
0066 cdb.setProp('EnableRunChangeHandler', True)
0067
0068 cdb.Upgrade = True
0069 theApp.setOtherProps(cdb, ['UseDBSnapshot',
0070 'DBSnapshotDirectory',
0071 'PartitionName'])
0072
0073
0074
0075
0076 LHCbApp().EvtMax = 5
0077 LHCbApp().DataType = "Upgrade"
0078 LHCbApp().Simulation = True
0079 EventSelector().PrintFreq = 1
0080
0081 IOHelper('ROOT').inputFiles([
0082 'PFN:Gauss/Boole.xdigi',
0083 ])