def setupCostExtras(config=''): log = logging.getLogger('setupCostExtras') from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr if not hasattr(svcMgr, "AthenaEventLoopMgr"): from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr svcMgr += AthenaEventLoopMgr() svcMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100 log.info('Set AthenaEventLoopMgr.EventPrintoutInterval = 100') if not hasattr(svcMgr, "AtRndmGenSvc"): from AthenaServices.AthenaServicesConf import AtRndmGenSvc svcMgr += AtRndmGenSvc() svcMgr.AtRndmGenSvc.OutputLevel = 4 log.info('Set AtRndmGenSvc.OutputLevel = 4') if not hasattr(svcMgr, "AtRanluxGenSvc"): from AthenaServices.AthenaServicesConf import AtRanluxGenSvc svcMgr += AtRanluxGenSvc() svcMgr.AtRanluxGenSvc.OutputLevel = 4 log.info('Set AtRanluxGenSvc.OutputLevel = 4') if config.count('TIME') > 0: log.info('Configure TrigTimerSvc...') from TrigTimeAlgs.TrigTimeAlgsConf import TrigTimerSvc if not hasattr(svcMgr, 'TrigTimerSvc'): svcMgr += TrigTimerSvc() svcMgr.TrigTimerSvc.IncludeName = ".+" svcMgr.TrigTimerSvc.ExcludeName = "()" svcMgr.TrigTimerSvc.OutputLevel = 4 log.info('Setup detailed timing:') print svcMgr.TrigTimerSvc
from AthenaServices.AthenaServicesConf import AtDSFMTGenSvc, AtRanluxGenSvc, AtRndmGenSvc, TestRandomSeqAlg atMars = AtDSFMTGenSvc() atMars.OutputLevel=VERBOSE atMars.EventReseeding=True atMars.Seeds = [ "MARS 1 2", "MARSOFF OFFSET 73 1 2", "MARS_INIT 3 4", "TEST 5 6"]; ServiceMgr += atMars atLux = AtRanluxGenSvc() atLux.OutputLevel=VERBOSE atLux.UseOldBrokenSeeding=False atLux.EventReseeding=True atLux.Seeds = [ "LUX 1 2", "LUXOFF OFFSET 73 1 2", "LUX_INIT LUXURY 0 3 4", "TEST 5 6"]; ServiceMgr += atLux atRnd = AtRndmGenSvc() atRnd.OutputLevel=VERBOSE atRnd.UseOldBrokenSeeding=False atRnd.EventReseeding=True atRnd.ReseedStreamNames = [ "TEST", "RNDM", "RNDMOFF" ] atRnd.Seeds = [ "RNDM 11 12", "RNDMOFF OFFSET 73 11 12", "RNDM_INIT 13 14", "TEST 15 16"]; ServiceMgr += atRnd atLuxNN = AtRanluxGenSvc("LuxOld") atLuxNN.OutputLevel=VERBOSE atLuxNN.UseOldBrokenSeeding=True atLuxNN.EventReseeding=False atLuxNN.Seeds = [ "LUX 1 2", "LUX_INIT LUXURY 0 3 4", "TEST 5 6"]; ServiceMgr += atLuxNN atRndOR = AtRndmGenSvc("RndNoReseed")
#-------------------------------------------------------------- if not 'EVTMAX' in dir(): EVTMAX = 5 pass theApp.EvtMax = EVTMAX #-------------------------------------------------------------- # Private Application Configuration options #-------------------------------------------------------------- from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaServices.AthenaServicesConf import AtRndmGenSvc svcMgr += AtRndmGenSvc(Seeds=[ "PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532", "JIMMY 390020611 821000366", "JIMMY_INIT 820021 2347532", "HERWIG 390020611 821000366", "HERWIG_INIT 820021 2347532" ] #, ReadFromFile = True ) ############################### # Create some 4-vectors ############################### from AthExThinning.AthExThinningAlgsConf import AthExThinning__CreateData topSequence += AthExThinning__CreateData("CreateData", ParticlesOutput="Particles", NbrOfParticles=10, OutputLevel=DEBUG) #--------------------------------------------------------------- # Pool Persistency
s.OutputLevel = HLTOutputLevel for algo in s.getChildren(): algo.OutputLevel = HLTOutputLevel for svc in ["Lvl2EventLoopMgr", "EFEventLoopMgr"]: if hasattr(svcMgr, svc): getattr(svcMgr, svc).OutputLevel = HLTOutputLevel if doLVL2: svcMgr.ROBDataProviderSvc.OutputLevel = ERROR if not ReadBS: topSequence.CTPSimulation.OutputLevel = INFO # Reduce verbosity of AtRndmGenSvc (used in steering scalers) from AthenaServices.AthenaServicesConf import AtRndmGenSvc svcMgr += AtRndmGenSvc(OutputLevel=WARNING) # ---------------------------------------------------------------- # Setting limits for timer histograms # ---------------------------------------------------------------- #include("TriggerRelease/jobOfragment_trigTimers.py") #for now just do top histograms if doLVL2: topSequence.TrigSteer_L2.MonTools['L2SteeringTime'].NumberOfHistBins = 200 if doEF: topSequence.TrigSteer_EF.MonTools['EFSteeringTime'].NumberOfHistBins = 200 if wideTiming: if doLVL2: topSequence.TrigSteer_L2.MonTools['L2SteeringTime'].TimerHistLimits = [ 0, 1500 ]
from AthenaCommon.AppMgr import ServiceMgr #------------------------------------------------------------------------------ # Events to execute #------------------------------------------------------------------------------ theApp.EvtMax = 100 ServiceMgr.EventSelector.RunNumber = 108524 ServiceMgr.EventSelector.FirstEvent = 1 #------------------------------------------------------------------------------ # Random seeds initialization #------------------------------------------------------------------------------ from AthenaServices.AthenaServicesConf import AtRndmGenSvc AtRndmGenSvc = AtRndmGenSvc() ServiceMgr += AtRndmGenSvc # See EvgenJobTransforms/Evgen_randomseeds.py AtRndmGenSvc.Seeds = ['PYTHIA 47898993 0', 'PYTHIA_INIT 820021 2347532'] #------------------------------------------------------------------------------ # Output level threshold: 1=VERBOSE 2=DEBUG 3=INFO 4=WARNING 5=ERROR 6=FATAL #------------------------------------------------------------------------------ ServiceMgr.MessageSvc.OutputLevel = INFO ServiceMgr.MessageSvc.defaultLimit = 9999999 # all messages #------------------------------------------------------------------------------ # HERE INCLUDE THE PRODUCTION JOB-OPTIONS FRAGMENT #------------------------------------------------------------------------------
from PartPropSvc.PartPropSvcConf import PartPropSvc ServiceMgr += PartPropSvc() ## get a handle on the top sequence of algorithms from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() #-------------------------------------------------------------- # Private Application Configuration options #-------------------------------------------------------------- # The following is needed to load the Athena Random # Number Generation Service. # Creating and configuring the service in one go from AthenaServices.AthenaServicesConf import AtRndmGenSvc ServiceMgr += AtRndmGenSvc(Seeds=["SINGLE 2040160768 443921183"]) ## adding the CosmicGenerator alg. to the list of algorithms to be run from CosmicGenerator.CosmicGeneratorConf import CosmicGenerator topSequence += CosmicGenerator() ## adding the McEventCollection dumper to the list of algs. to be run from TruthExamples.TruthExamplesConf import DumpMC topSequence += DumpMC() #-------------------------------------------------------------- # Set output level threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- ServiceMgr.MessageSvc.OutputLevel = VERBOSE #--------------------------------------------------------------