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