## _PyG4AtlasComp.__init__ ## If the random number service hasn't been set up already, do it now. from G4AtlasApps.SimFlags import simFlags simFlags.RandomSeedList.useDefaultSeeds() ## Tile2000_2003._do_jobproperties ## Import extra flags if it hasn't already been done from G4AtlasApps.SimFlags import simFlags if not simFlags.extra_flags: simFlags.load_tbtile_flags() # - switch off tasks DetFlags.pileup.all_setOff() DetFlags.simulateLVL1.all_setOff() DetFlags.digitize.all_setOff() DetFlags.overlay.all_setOff() DetFlags.readRDOPool.all_setOff() DetFlags.makeRIO.all_setOff() DetFlags.writeBS.all_setOff() DetFlags.readRDOBS.all_setOff() DetFlags.readRIOBS.all_setOff() DetFlags.readRIOPool.all_setOff() DetFlags.writeRIOPool.all_setOff() DetFlags.writeRDOPool.all_setOff() # not needed detectors DetFlags.ID_setOff() DetFlags.Muon_setOff() DetFlags.FCal_setOff() DetFlags.HEC_setOff() DetFlags.em_setOff()
def _do_jobproperties(self): """ Place to handle JobProperties . """ AtlasG4Eng.G4Eng.log.info('SimSkeleton :: _do_JobProperties starting') ## Import extra flags if it hasn't already been done from G4AtlasApps.SimFlags import simFlags if not simFlags.extra_flags: simFlags.load_tbtile_flags() # - switch off tasks DetFlags.pileup.all_setOff() DetFlags.simulateLVL1.all_setOff() DetFlags.digitize.all_setOff() DetFlags.overlay.all_setOff() DetFlags.readRDOPool.all_setOff() DetFlags.makeRIO.all_setOff() DetFlags.writeBS.all_setOff() DetFlags.readRDOBS.all_setOff() DetFlags.readRIOBS.all_setOff() DetFlags.readRIOPool.all_setOff() DetFlags.writeRIOPool.all_setOff() DetFlags.writeRDOPool.all_setOff() # not needed detectors DetFlags.ID_setOff() DetFlags.Muon_setOff() DetFlags.FCal_setOff() DetFlags.HEC_setOff() DetFlags.em_setOff() # globalflags.DataSource = "geant4" globalflags.DetGeo = "ctbh8" # mgallas this is a hack! needed for GeoModel and IOVDbSvc # TODO: Wow! Is this really still needed? import __main__ __main__.DetDescrVersion = 'CTB' __main__.globalflags = globalflags globalflags.DetDescrVersion = 'CTB' ## Translate conditions tag into IOVDbSvc global tag: must be done before job properties are locked!!! from AthenaCommon.AppMgr import ServiceMgr from IOVDbSvc.IOVDbSvcConf import IOVDbSvc ServiceMgr += IOVDbSvc() if not hasattr( globalflags, "ConditionsTag") or not globalflags.ConditionsTag.get_Value(): msg = "AtlasSimSkeleton._do_jobproperties :: conditions tag has not been set and is no longer guessed by SimAtlasKernel. " msg += "You must set the globaltags.ConditionsTag flag in your job options." AtlasG4Eng.G4Eng.log.error(msg) raise SystemExit( "AtlasSimSkeleton._do_jobproperties :: Global ConditionsTag not set" ) if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.GlobalTag: ServiceMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag.get_Value( ) if not simFlags.ISFRun: from G4AtlasApps.G4Atlas_Metadata import checkForSpecialConfigurationMetadata checkForSpecialConfigurationMetadata() ## Print flags if AtlasG4Eng.G4Eng.log.getEffectiveLevel() < 40: AtlasG4Eng.G4Eng.log.info( 'SimCtbKernel : printing detector flags DetFlags') DetFlags.Print() AtlasG4Eng.G4Eng.log.info( 'SimCtbKernel : printing simulation flags simFlags') jobproperties.print_JobProperties('tree&value') jobproperties.lock_JobProperties() AtlasG4Eng.G4Eng.log.info('SimSkeleton :: _do_JobProperties done')