def __init__(self, name): super(TestingTrigSteer_EF, self).__init__(name) from AthenaCommon.Logging import logging # loads logger log = logging.getLogger(name) self.HLTLevel = "EF" # get handle to HLTConfigSvc: from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.Constants import VERBOSE ServiceMgr.ScalerSvc.OutputLevel = VERBOSE ServiceMgr.HLTConfigSvc.doMergedHLT = False # log.info(ServiceMgr) # add all PESA algorithms (of the correct lvl) to this instance of TrigSteer : l2algs, efalgs = ServiceMgr.HLTConfigSvc.getAlgorithmsByLevel() log.info("will add EF algorithms to: " + name) for alg in efalgs: instance = getConfigurableByConfigName(alg) if instance == None: log.warning("can not add algorithm : " + alg + " because configurable for it does not exist") else: if instance not in self.getChildren(): self += instance log.info("added algorithm to the configuration: " + alg) try: from TrigSteerMonitor.TrigSteerMonitorLegacyConfig import TrigSteerMonitorToolList self.MonTools += TrigSteerMonitorToolList except: log.warning( "Attempt to add monitoring tools failed, will continue without them" ) try: from TrigCostMonitor.TrigCostMonitorConfig import TrigCostToolsList self.OPITools.extend(TrigCostToolsList) except: log.info( "Attempt to add trigger cost monitoring tools failed, will continue without them" ) time = TrigTimeHistToolConfig("EFSteeringTime") self.MonTools += [time]
def __init__(self, name): """name must be *_<level>""" super(TestingTrigSteer, self).__init__(name) from AthenaCommon.Logging import logging # loads logger log = logging.getLogger(name) self.HLTLevel = name[name.rfind('_') + 1:] if not self.HLTLevel in ['L2', 'EF', 'HLT']: raise RuntimeError( "Wrong steering level %s, name of steering instance must end in _L2, _EF, or _HLT" % self.HLTLevel) # get handle to HLTConfigSvc: from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.Constants import VERBOSE, DEBUG ServiceMgr.ScalerSvc.OutputLevel = VERBOSE # merging the menus in case of level=HLT ServiceMgr.HLTConfigSvc.doMergedHLT = (self.HLTLevel == 'HLT') # add all PESA algorithms (of the correct lvl) to this instance of TrigSteer : l2algs, efalgs = ServiceMgr.HLTConfigSvc.getAlgorithmsByLevel() log.info("will add %s algorithms to: %s" % (self.HLTLevel, name)) algs = {"L2": l2algs, "EF": efalgs, "HLT": l2algs + efalgs} for alg in algs[self.HLTLevel]: instance = getConfigurableByConfigName(alg) if instance == None: log.warning("can not add algorithm : " + alg + " because configurable for it does not exist") else: if instance not in self.getChildren(): self += instance log.info("added algorithm to the configuration: " + alg) # adding the steering monitoring tools try: from TrigSteerMonitor.TrigSteerMonitorLegacyConfig import TrigSteerMonitorToolList self.MonTools += TrigSteerMonitorToolList except: log.warning( "Attempt to add monitoring tools failed, will continue without them" ) # adding the cost tools try: from TrigCostMonitor.TrigCostMonitorConfig import TrigCostToolsList self.OPITools.extend(TrigCostToolsList) except: log.info( "Attempt to add trigger cost monitoring tools failed, will continue without them" ) time = TrigTimeHistToolConfig("%sSteeringTime" % self.HLTLevel) self.MonTools += [time] self.OutputLevel = DEBUG self.doOperationalInfo = DEBUG self.ExecutionOrderStrategy.OutputLevel = VERBOSE self.Navigation.OutputLevel = DEBUG