From e13a14751d89de88d633289cf3bb382af22791ed Mon Sep 17 00:00:00 2001 From: Peter Onyisi <ponyisi@utexas.edu> Date: Tue, 22 Sep 2020 13:56:15 +0000 Subject: [PATCH] MagFieldElements: Fix compilation with clang 10. Need <cstdlib> for size_t. --- .../python/ComponentAccumulator.py | 66 +- .../python/BadLBFilterToolConfig.py | 2 +- Control/AthenaMonitoring/python/DQMonFlags.py | 9 +- .../python/TriggerInterface.py | 10 +- .../share/DQMonFlagsConfig_jobOptions.py | 110 +-- .../share/DataQualityInit_jobOptions.py | 2 +- .../share/DataQualitySteering_jobOptions.py | 690 +++++++++--------- .../share/TrigDecTool_jobOptions.py | 29 +- Database/IOVDbSvc/python/CondDB.py | 2 +- .../python/PixelConditionsConfig.py | 265 +++---- .../python/PixelMonitoringConfig.py | 5 +- .../SCT_Monitoring/python/SCTTracksMonAlg.py | 2 +- .../python/TrackSummaryToolWorkaround.py | 16 +- .../python/TRTMonitoringRun3RAW_Alg.py | 26 +- .../python/LArBadChannelConfig.py | 49 +- .../python/LArBadFebsConfig.py | 52 +- .../LArCalibUtils/python/LArHVScaleConfig.py | 2 +- .../LArMonitoring/python/LArFEBMonAlg.py | 21 +- .../python/MuonTrackMonitorAlgorithm.py | 2 +- .../python/JetTagMonitorAlgorithm.py | 11 +- .../python/JetMonitoringStandard.py | 12 +- .../python/METMonitorAlgorithm.py | 12 +- .../share/RecExCommon_topOptions.py | 30 +- .../python/TauMonitoringConfig.py | 6 +- .../python/TileInfoConfigurator.py | 6 +- .../share/TileConditions_jobOptions.py | 7 +- .../python/TrigCaloDataAccessConfig.py | 6 +- 27 files changed, 768 insertions(+), 682 deletions(-) diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index d5c540af430..45d34b1a104 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -829,6 +829,8 @@ def __indent( indent = ""): def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ): _log = logging.getLogger( "__setProperties".ljust(30) ) for pname, pvalue in six.iteritems( sourceConf2Instance._properties ): + if destConfigurableInstance.__class__.__name__ == 'AlgSequence' and pname == 'Members': + continue propType = sourceConf2Instance._descriptors[pname].cpp_type if "PrivateToolHandleArray" in propType: setattr( destConfigurableInstance, pname, [conf2toConfigurable( tool, __indent( indent ) ) for tool in pvalue] ) @@ -854,7 +856,7 @@ def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ): pass setattr( destConfigurableInstance, pname, pvalue ) -def conf2toConfigurable( comp, indent="" ): +def conf2toConfigurable( comp, indent="", suppressDupes=False ): """ Method converts from Conf2 ( comp argument ) to old Configurable If the Configurable of the same name exists, the properties merging process is invoked @@ -929,9 +931,11 @@ def conf2toConfigurable( comp, indent="" ): return listOrDictHelper def __areSettingsSame( existingConfigurableInstance, newConf2Instance, indent="" ): - _log.debug( "{}Checking if setting is the same {}".format( indent, existingConfigurableInstance.getFullName() ) ) + _log.debug( "{}Checking if setting is the same {} {}".format( indent, existingConfigurableInstance.getFullName(), newConf2Instance.getFullJobOptName() ) ) alreadySetProperties = dict([ (pname, pvalue) for pname,pvalue in six.iteritems(existingConfigurableInstance.getValuedProperties()) ]) + _log.debug("Existing properties: {}".format(alreadySetProperties)) + _log.debug("New properties: {}".format(newConf2Instance._properties)) for pname, pvalue in six.iteritems( newConf2Instance._properties ): # six.iteritems(comp._properties): if __isOldConfigurable( pvalue ): _log.warning( "{}New configuration object {} property {} has legacy configuration components assigned to it {}" @@ -939,10 +943,31 @@ def conf2toConfigurable( comp, indent="" ): _log.warning( "Skipping comparison, no guarantees about configuration consistency" ) continue propType = newConf2Instance._descriptors[pname].cpp_type - _log.debug("{}Comparing type: {}".format(indent, propType)) + _log.debug("{}Comparing type: {} for: {}".format(indent, propType, pname)) if "PrivateToolHandleArray" in propType: - for oldC, newC in zip( alreadySetProperties[pname], pvalue): - __areSettingsSame( oldC, newC, __indent(indent)) + toolDict = {_.getName(): _ for _ in alreadySetProperties[pname]} + _log.debug('Private tool properties? {}'.format(toolDict)) + newCdict = {_.getName() : _ for _ in pvalue} + oldCset = set(toolDict); newCset = set(newCdict) + _log.debug('Private tool property names? {} {}'.format(oldCset, newCset)) + for oldC in oldCset & newCset: + __areSettingsSame( toolDict[oldC], newCdict[oldC], __indent(indent)) + for newC in newCset-oldCset: + # clone new config to old array + alreadySetProperties[pname].append(conf2toConfigurable(newCdict[newC])) + elif "PublicToolHandleArray" in propType: + toolSet = {_.getName() for _ in alreadySetProperties[pname]} + _log.debug('Public tool handle array properties? {} {}'.format(toolSet, pvalue)) + # strings? + for newC in pvalue: + if isinstance(newC, six.string_types): + pubtoolclass, pubtoolname = newC.split('/') + if pubtoolname not in toolSet: + klass = __findConfigurableClass( pubtoolclass ) + alreadySetProperties[pname].append(klass( pubtoolname )) + else: + _log.warning('Not handling actual Configurable2s for public tool merging yet') + raise Exception() elif "PrivateToolHandle" in propType or "GaudiConfig2.Configurables" in propType or "ServiceHandle" in propType: existingVal = getattr(existingConfigurableInstance, pname) if isinstance( pvalue, str ): @@ -951,10 +976,13 @@ def conf2toConfigurable( comp, indent="" ): _log.debug( "{}Some kind of handle and, object type {} existing {}".format( indent, type(pvalue), type(existingVal) ) ) __areSettingsSame( existingVal, pvalue, indent) else: - pvalue=__listHelperToList(pvalue) + if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)): + pvalue=pvalue.data + if pname not in alreadySetProperties: - continue - if alreadySetProperties[pname] != pvalue: + _log.info("{}Adding property: {} for {}".format(indent, pname, newConf2Instance.getName() )) + setattr(existingConfigurableInstance, pname, pvalue) + elif alreadySetProperties[pname] != pvalue: _log.info("{}Merging property: {} for {}".format(indent, pname, newConf2Instance.getName() )) # create surrogate clone = newConf2Instance.getInstance("Clone") @@ -971,7 +999,7 @@ def conf2toConfigurable( comp, indent="" ): _log.debug( "{}Pre-existing configurable {} was found, checking if has the same properties".format( indent, comp.getName() ) ) __areSettingsSame( existingConfigurable, comp ) _log.debug( "{}Pre-existing configurable was found to have the same properties".format( indent, comp.name ) ) - instance = existingConfigurable + instance = existingConfigurable if not suppressDupes else None else: # create new configurable _log.debug( "{}Creating component configurable {}".format( indent, comp.getFullJobOptName() ) ) configurableClass = __findConfigurableClass( comp.getFullJobOptName().split( "/" )[0] ) @@ -1004,6 +1032,13 @@ def appendCAtoAthena(ca): from AthenaCommon.AppMgr import ServiceMgr,ToolSvc,theApp,athCondSeq,athOutSeq,athAlgSeq,topSequence + if len( ca.getPublicTools() ) != 0: + _log.info( "Merging public tools" ) + for comp in ca.getPublicTools(): + instance = conf2toConfigurable( comp, indent=" " ) + if instance not in ToolSvc: + ToolSvc += instance + if len(ca.getServices()) != 0: _log.info( "Merging services" ) for comp in ca.getServices(): @@ -1018,13 +1053,6 @@ def appendCAtoAthena(ca): if instance not in athCondSeq: athCondSeq += instance - if len( ca.getPublicTools() ) != 0: - _log.info( "Merging public tools" ) - for comp in ca.getPublicTools(): - instance = conf2toConfigurable( comp, indent=" " ) - if instance not in ToolSvc: - ToolSvc += instance - if len( ca.getAppProps() ) != 0: _log.info( "Merging ApplicationMgr properties" ) for (propName, propValue) in six.iteritems(ca.getAppProps()): @@ -1066,8 +1094,10 @@ def appendCAtoAthena(ca): if el.__class__.__name__ == "AthSequencer": __mergeSequences( sequence, el, __indent( indent ) ) elif el.getGaudiType() == "Algorithm": - sequence += conf2toConfigurable( el, indent=__indent( indent ) ) - _log.info( "{}Algorithm {} and added to the sequence {}".format( __indent( indent ), el.getFullJobOptName(), sequence.name() ) ) + toadd = conf2toConfigurable( el, indent=__indent( indent ), suppressDupes=True) + if toadd is not None: + sequence += toadd + _log.info( "{}Algorithm {} and added to the sequence {}".format( __indent( indent ), el.getFullJobOptName(), sequence.name() ) ) preconfigured = [athCondSeq,athOutSeq,athAlgSeq,topSequence] diff --git a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py index 86384e7caeb..62b3f0ac252 100644 --- a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py +++ b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py @@ -66,7 +66,7 @@ def BadLBFilterToolCfg(inputFlags,name, defects, alwaysReturnTrue=False, ignoreR sgkey = 'DQBadLBFilterAlgResult_%s' % name #Schedule required cond-algo - result.merge(BadLBFilterAlgCfg(inputFlags,name,defects,sgkey,ignoreRecoverable, origDbTag)) + result.merge(BadLBFilterAlgCfg(inputFlags,name+'_Alg',defects,sgkey,ignoreRecoverable, origDbTag)) monFilterTool=CompFactory.DQBadLBFilterTool(name,alwaysReturnTrue=alwaysReturnTrue, ReadKey= sgkey) diff --git a/Control/AthenaMonitoring/python/DQMonFlags.py b/Control/AthenaMonitoring/python/DQMonFlags.py index e624702ee23..8b733d2b926 100644 --- a/Control/AthenaMonitoring/python/DQMonFlags.py +++ b/Control/AthenaMonitoring/python/DQMonFlags.py @@ -227,7 +227,7 @@ class doAFPMon(JobProperty): """Switch for AFP monitoring""" statusOn=True allowedTypes=['bool'] - StoredValue=False + StoredValue=True list+=[doAFPMon] class doHIMon(JobProperty): @@ -414,6 +414,13 @@ class specialCleaningConfiguration(JobProperty): StoredValue={} list+=[specialCleaningConfiguration] +class doNewMonitoring(JobProperty): + """ Global switch for monitoring """ + statusOn=True + allowedTypes=['bool'] + StoredValue=False +list+=[doNewMonitoring] + ##----------------------------------------------------------------------------- ## 2nd step ## Definition of the DQMon flag container diff --git a/Control/AthenaMonitoring/python/TriggerInterface.py b/Control/AthenaMonitoring/python/TriggerInterface.py index 83848acfbb5..fd3f07f7602 100644 --- a/Control/AthenaMonitoring/python/TriggerInterface.py +++ b/Control/AthenaMonitoring/python/TriggerInterface.py @@ -18,8 +18,7 @@ def getTrigDecisionTool(flags): rv = ComponentAccumulator() if flags.DQ.isReallyOldStyle: - from AthenaCommon.AppMgr import ToolSvc - rv.addPublicTool(ToolSvc.TrigDecisionTool) + rv.addPublicTool(CompFactory.Trig.TrigDecisionTool('TrigDecisionTool')) getTrigDecisionTool.rv = rv return getTrigDecisionTool.rv @@ -29,7 +28,12 @@ def getTrigDecisionTool(flags): tdt = CompFactory.Trig.TrigDecisionTool('TrigDecisionTool') tdt.TrigConfigSvc = cfgsvc - tdt.NavigationFormat = "TrigComposite" if 'HLTNav_Summary' in flags.Input.Collections else "TriggerElement" + if not flags.Input.isMC and flags.Input.Format == 'BS' and min(flags.Input.RunNumber) <= 380000: + # need to work through exact details here + # tdt.UseOldEventInfoDecisionFormat = True + tdt.NavigationFormat = "TrigComposite" + else: + tdt.NavigationFormat = "TrigComposite" if 'HLTNav_Summary' in flags.Input.Collections else "TriggerElement" rv.addPublicTool(tdt) # Other valid option of NavigationFormat is "TriggerElement" for Run 2 navigation. # This option to be removed and "TrigComposite" the only valid choice once a R2->R3 converter is put in place. diff --git a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py index 38ef6113f10..dfb1421e916 100644 --- a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py +++ b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py @@ -17,12 +17,6 @@ if not 'rec' in dir(): from RecExConfig.RecAlgsFlags import recAlgs -if rec.doTrigger() == False: - DQMonFlags.useTrigger=False # steers trigger-awareness - DQMonFlags.doLVL1CaloMon=False - DQMonFlags.doCTPMon=False - DQMonFlags.doHLTMon=False - # Set the data type based on beamType/HI flag if globalflags.DataSource.get_Value() == 'geant4': DQMonFlags.monManDataType = 'monteCarlo' @@ -71,6 +65,13 @@ elif DQMonFlags.monType=='BSall': else: local_logger.warning("invalid DQMonFlags.monType: %s, using default monManEnvironment", DQMonFlags.monType()) +# the meaning of this flag has changed in MT +if rec.doTrigger() == False and not (TriggerFlags.doMT() and DQMonFlags.monManEnvironment=='tier0ESD'): + DQMonFlags.useTrigger=False # steers trigger-awareness + DQMonFlags.doLVL1CaloMon=False + DQMonFlags.doCTPMon=False + DQMonFlags.doHLTMon=False + if not DQMonFlags.doMonitoring(): local_logger.info("monitoring globally switched off") DQMonFlags.doGlobalMon=False @@ -104,53 +105,54 @@ if not DQMonFlags.doMonitoring(): else: local_logger.info("monitoring environment set to %s", DQMonFlags.monManEnvironment()) - # AOD monitoring - if DQMonFlags.monManEnvironment == 'AOD': - DQMonFlags.histogramFile='MonitorAOD.root' - DQMonFlags.doCaloMon=False - DQMonFlags.doLArMon=False - DQMonFlags.doTileMon=False -# DQMonFlags.doJetMon=False - # ?? - DQMonFlags.doCTPMon=False - DQMonFlags.doPixelMon=False - DQMonFlags.doSCTMon=False - DQMonFlags.doTRTMon=False - DQMonFlags.doTRTElectronMon=False - DQMonFlags.doInDetGlobalMon=False - DQMonFlags.doInDetAlignMon=False + # new-style monitoring drives this internally so skip this section + if not DQMonFlags.doNewMonitoring: - DQMonFlags.doGlobalMon=False - DQMonFlags.doLVL1CaloMon=False - DQMonFlags.doHLTMon=False - DQMonFlags.doEgammaMon=False - DQMonFlags.doMuonRawMon=False - DQMonFlags.doLucidMon=False + # AOD monitoring + if DQMonFlags.monManEnvironment == 'AOD': + DQMonFlags.histogramFile='MonitorAOD.root' + DQMonFlags.doCaloMon=False + DQMonFlags.doLArMon=False + DQMonFlags.doTileMon=False + DQMonFlags.doCTPMon=False + DQMonFlags.doPixelMon=False + DQMonFlags.doSCTMon=False + DQMonFlags.doTRTMon=False + DQMonFlags.doTRTElectronMon=False + DQMonFlags.doInDetGlobalMon=False + DQMonFlags.doInDetAlignMon=False - # ESD monitoring: switch off DQ monitoring packages which are not yet migrated: - elif DQMonFlags.monManEnvironment == 'tier0ESD': - DQMonFlags.histogramFile='MonitorESD.root' - DQMonFlags.doCTPMon=False - DQMonFlags.doPixelMon=False - DQMonFlags.doSCTMon=False - DQMonFlags.doTRTMon=False - DQMonFlags.doTRTElectronMon=False - DQMonFlags.doInDetGlobalMon=False - DQMonFlags.doInDetAlignMon=False - # ESD monitoring: packages which use only ESD: disable when running over BS - elif DQMonFlags.monManEnvironment == 'tier0Raw': - DQMonFlags.doInDetPerfMon=False - DQMonFlags.doMissingEtMon=False - DQMonFlags.doTauMon=False - DQMonFlags.doMuonTrackMon=False - DQMonFlags.doMuonAlignMon=False - DQMonFlags.doMuonPhysicsMon=False - DQMonFlags.doMuonSegmentMon=False - DQMonFlags.doMuonTrkPhysMon=False - DQMonFlags.doMuonCombinedMon=False - DQMonFlags.doLucidMon=False - DQMonFlags.doJetTagMon=False - DQMonFlags.doJetMon=False + DQMonFlags.doGlobalMon=False + DQMonFlags.doLVL1CaloMon=False + DQMonFlags.doHLTMon=False + DQMonFlags.doEgammaMon=False + DQMonFlags.doMuonRawMon=False + DQMonFlags.doLucidMon=False + + # ESD monitoring: switch off DQ monitoring packages which are not yet migrated: + elif DQMonFlags.monManEnvironment == 'tier0ESD': + DQMonFlags.histogramFile='MonitorESD.root' + DQMonFlags.doCTPMon=False + DQMonFlags.doPixelMon=False + DQMonFlags.doSCTMon=False + DQMonFlags.doTRTMon=False + DQMonFlags.doTRTElectronMon=False + DQMonFlags.doInDetGlobalMon=False + DQMonFlags.doInDetAlignMon=False + # ESD monitoring: packages which use only ESD: disable when running over BS + elif DQMonFlags.monManEnvironment == 'tier0Raw': + DQMonFlags.doInDetPerfMon=False + DQMonFlags.doMissingEtMon=False + DQMonFlags.doTauMon=False + DQMonFlags.doMuonTrackMon=False + DQMonFlags.doMuonAlignMon=False + DQMonFlags.doMuonPhysicsMon=False + DQMonFlags.doMuonSegmentMon=False + DQMonFlags.doMuonTrkPhysMon=False + DQMonFlags.doMuonCombinedMon=False + DQMonFlags.doLucidMon=False + DQMonFlags.doJetTagMon=False + DQMonFlags.doJetMon=False # switch off monitoring if reco is off during BS reading if rec.readRDO() and not 'DetFlags' in dir(): @@ -246,9 +248,9 @@ if (not rec.doJetMissingETTag() or (rec.readRDO() and not jobproperties.JetRecFl if (not rec.doTau()): DQMonFlags.doTauMon=False -# covered now by doJetMissingETTag -# if (not recAlgs.doMissingET()): -# DQMonFlags.doMissingEtMon=False +if not rec.doAFP() or DQMonFlags.monManDataType == 'monteCarlo': + DQMonFlags.doAFPMon=False + # # Stream Aware Monitoring diff --git a/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py b/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py index 2ba251977e0..83bcd2cbffa 100644 --- a/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py +++ b/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py @@ -11,7 +11,7 @@ try: except Exception: treatException("Could not load AthenaMonitoring/DQMonFlagsConfig_jobOptions.py") -if DQMonFlags.doMonitoring(): +if DQMonFlags.doMonitoring() and not DQMonFlags.doNewMonitoring(): if DQMonFlags.useTrigger(): # trigger decision tool try: diff --git a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py index e26b8959944..fababdb80e0 100644 --- a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py +++ b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py @@ -13,331 +13,371 @@ TRTELEMON=False local_logger = logging.getLogger('DataQualitySteering_jobOptions') if DQMonFlags.doMonitoring(): - if DQMonFlags.useTrigger(): - if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()): - local_logger.debug("trigger decision tool not found, including it now") - include("AthenaMonitoring/TrigDecTool_jobOptions.py") - - - # don't set up lumi access if in MC or enableLumiAccess == False - if globalflags.DataSource.get_Value() != 'geant4' and DQMonFlags.enableLumiAccess(): - if athenaCommonFlags.isOnline: - local_logger.debug("luminosity tool not found, importing online version") - from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault - LuminosityCondAlgOnlineDefault() - else: - local_logger.debug("luminosity tool not found, importing offline version") - from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault - LuminosityCondAlgDefault() - - from LumiBlockComps.LBDurationCondAlgDefault import LBDurationCondAlgDefault - LBDurationCondAlgDefault() - - from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault - TrigLiveFractionCondAlgDefault() - - from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool - from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool - - #---------------------------# - # Inner detector monitoring # - #---------------------------# - if DQMonFlags.doPixelMon() or DQMonFlags.doSCTMon() or DQMonFlags.doTRTMon() or \ - DQMonFlags.doInDetGlobalMon() or DQMonFlags.doInDetAlignMon(): - try: - include("InDetRecExample/InDetMonitoring.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up inner detector monitoring") - - #----------------------------# - # Global combined monitoring # - #----------------------------# - if DQMonFlags.doGlobalMon(): - try: - include("DataQualityTools/DataQualityMon_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up global monitoring") - - #--------------------# - # Trigger monitoring # - #--------------------# - if DQMonFlags.doLVL1CaloMon(): - try: - include("TrigT1CaloMonitoring/TrigT1CaloMonitoring_forRecExCommission.py") - include("TrigT1Monitoring/TrigT1Monitoring_forRecExCommission.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up L1 Calo monitoring") - - if DQMonFlags.doCTPMon(): - try: - include("TrigT1CTMonitoring/TrigT1CTMonitoringJobOptions_forRecExCommission.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up central trigger monitoring") - - if DQMonFlags.doHLTMon(): - try: - include("TrigHLTMonitoring/HLTMonitoring_topOptions.py") - HLTMonMan = topSequence.HLTMonManager - HLTMonMan.FileKey = DQMonFlags.monManFileKey() - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up HLT monitoring") - - #--------------# - # TRT electron # - #--------------# - if DQMonFlags.doTRTElectronMon() and TRTELEMON: - try: - include("InDetPerformanceMonitoring/TRT_Monitoring_RecExCommonAddOn_jobOptions.py") - TRTElMonMan = topSequence.TRTElectronMonManager - TRTElMonMan.FileKey = DQMonFlags.monManFileKey() - TRTElMonMan.Environment = DQMonFlags.monManEnvironment() - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up TRT electron monitoring") - - #----------------# - # ID performance # - #----------------# - if DQMonFlags.doInDetPerfMon(): - try: - include("InDetPerformanceMonitoring/IDPerfMon_jobOptions.py") - IDPerfMonManager = topSequence.IDPerfMonManager - IDPerfMonManager.FileKey = DQMonFlags.monManFileKey() - IDPerfMonManager.Environment = DQMonFlags.monManEnvironment() - include("InDetDiMuonMonitoring/InDetDiMuMon_jobOptions.py") - InDetDiMuMonManager = topSequence.InDetDiMuMonManager - InDetDiMuMonManager.FileKey = DQMonFlags.monManFileKey() - InDetDiMuMonManager.Environment = DQMonFlags.monManEnvironment() - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up InDetPerformance/InDetDiMuon monitoring") - - #--------------------# - # TileCal monitoring # - #--------------------# - if DQMonFlags.doTileMon(): - try: - include("TileMonitoring/TileMon_jobOptions.py") + if not DQMonFlags.doNewMonitoring(): + if DQMonFlags.useTrigger(): + if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()): + local_logger.debug("trigger decision tool not found, including it now") + include("AthenaMonitoring/TrigDecTool_jobOptions.py") + + + # don't set up lumi access if in MC or enableLumiAccess == False + if globalflags.DataSource.get_Value() != 'geant4' and DQMonFlags.enableLumiAccess(): + if athenaCommonFlags.isOnline: + local_logger.debug("luminosity tool not found, importing online version") + from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault + LuminosityCondAlgOnlineDefault() + else: + local_logger.debug("luminosity tool not found, importing offline version") + from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault + LuminosityCondAlgDefault() + + from LumiBlockComps.LBDurationCondAlgDefault import LBDurationCondAlgDefault + LBDurationCondAlgDefault() + + from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault + TrigLiveFractionCondAlgDefault() + + from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool + from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool + + #---------------------------# + # Inner detector monitoring # + #---------------------------# + if DQMonFlags.doPixelMon() or DQMonFlags.doSCTMon() or DQMonFlags.doTRTMon() or \ + DQMonFlags.doInDetGlobalMon() or DQMonFlags.doInDetAlignMon(): + try: + include("InDetRecExample/InDetMonitoring.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up inner detector monitoring") + + #----------------------------# + # Global combined monitoring # + #----------------------------# + if DQMonFlags.doGlobalMon(): + try: + include("DataQualityTools/DataQualityMon_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up global monitoring") + + #--------------------# + # Trigger monitoring # + #--------------------# + if DQMonFlags.doLVL1CaloMon(): + try: + include("TrigT1CaloMonitoring/TrigT1CaloMonitoring_forRecExCommission.py") + include("TrigT1Monitoring/TrigT1Monitoring_forRecExCommission.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up L1 Calo monitoring") + + if DQMonFlags.doCTPMon(): + try: + include("TrigT1CTMonitoring/TrigT1CTMonitoringJobOptions_forRecExCommission.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up central trigger monitoring") + + if DQMonFlags.doHLTMon(): + try: + include("TrigHLTMonitoring/HLTMonitoring_topOptions.py") + HLTMonMan = topSequence.HLTMonManager + HLTMonMan.FileKey = DQMonFlags.monManFileKey() + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up HLT monitoring") + + #--------------# + # TRT electron # + #--------------# + if DQMonFlags.doTRTElectronMon() and TRTELEMON: + try: + include("InDetPerformanceMonitoring/TRT_Monitoring_RecExCommonAddOn_jobOptions.py") + TRTElMonMan = topSequence.TRTElectronMonManager + TRTElMonMan.FileKey = DQMonFlags.monManFileKey() + TRTElMonMan.Environment = DQMonFlags.monManEnvironment() + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up TRT electron monitoring") + + #----------------# + # ID performance # + #----------------# + if DQMonFlags.doInDetPerfMon(): + try: + include("InDetPerformanceMonitoring/IDPerfMon_jobOptions.py") + IDPerfMonManager = topSequence.IDPerfMonManager + IDPerfMonManager.FileKey = DQMonFlags.monManFileKey() + IDPerfMonManager.Environment = DQMonFlags.monManEnvironment() + include("InDetDiMuonMonitoring/InDetDiMuMon_jobOptions.py") + InDetDiMuMonManager = topSequence.InDetDiMuMonManager + InDetDiMuMonManager.FileKey = DQMonFlags.monManFileKey() + InDetDiMuMonManager.Environment = DQMonFlags.monManEnvironment() + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up InDetPerformance/InDetDiMuon monitoring") + + #--------------------# + # TileCal monitoring # + #--------------------# + if DQMonFlags.doTileMon(): + try: + include("TileMonitoring/TileMon_jobOptions.py") + + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Tile monitoring") + + #------------------# + # LAr monitoring # + #------------------# + if DQMonFlags.doLArMon(): + try: + LArMon = AthenaMonManager(name="LArMonManager", + FileKey = DQMonFlags.monManFileKey(), + Environment = DQMonFlags.monManEnvironment(), + ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(), + DataType = DQMonFlags.monManDataType()) + topSequence += LArMon + include("LArMonTools/LArAllMonitoring_jobOptions.py") + include("LArMonitoring/LArMonitoring_jobOption.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up LAr monitoring") + + #-------------------------------------------------------------------------# + # Calo monitoring - cells and clusters independent of LAr or Tile origin # + #-------------------------------------------------------------------------# + if DQMonFlags.doCaloMon(): + try: + include("CaloMonitoring/CaloAllMonitoring_jobOptions.py") + include("CaloMonitoring/CaloNewMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Calo monitoring") + + #-------------------# + # Egamma monitoring # + #-------------------# + if DQMonFlags.doEgammaMon(): + try: + include("egammaPerformance/egammaMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Egamma monitoring") + + #----------------# + # MET monitoring # + #----------------# + if DQMonFlags.doMissingEtMon(): + try: + include("MissingETMonitoring/MissingET_Monitoring.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up ETmiss monitoring") + + #----------------# + # Jet monitoring # + #----------------# + if DQMonFlags.doJetMon(): + try: + include("JetMonitoring/JetMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Jet monitoring") + + #----------------# + # Tau monitoring # + #----------------# + if DQMonFlags.doTauMon(): + try: + include("tauMonitoring/tauMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Tau monitoring") + + #--------------------# + # Jet tag monitoring # + #--------------------# + if DQMonFlags.doJetTagMon(): + try: + include("JetTagMonitoring/JetTagMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up jet-tag monitoring") + + #-----------------------------# + # MuonSpectrometer monitoring # + #-----------------------------# + if (DQMonFlags.doMuonRawMon() or DQMonFlags.doMuonSegmentMon() + or DQMonFlags.doMuonTrackMon() or DQMonFlags.doMuonAlignMon() + or DQMonFlags.doMuonTrkPhysMon() or DQMonFlags.doMuonPhysicsMon()): + try: + include("MuonDQAMonitoring/MuonDetMonitoring.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up Muon detector monitoring") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Tile monitoring") - - #------------------# - # LAr monitoring # - #------------------# - if DQMonFlags.doLArMon(): - try: - LArMon = AthenaMonManager(name="LArMonManager", - FileKey = DQMonFlags.monManFileKey(), - Environment = DQMonFlags.monManEnvironment(), - ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(), - DataType = DQMonFlags.monManDataType()) - topSequence += LArMon - include("LArMonTools/LArAllMonitoring_jobOptions.py") - include("LArMonitoring/LArMonitoring_jobOption.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up LAr monitoring") - - #-------------------------------------------------------------------------# - # Calo monitoring - cells and clusters independent of LAr or Tile origin # - #-------------------------------------------------------------------------# - if DQMonFlags.doCaloMon(): - try: - include("CaloMonitoring/CaloAllMonitoring_jobOptions.py") - include("CaloMonitoring/CaloNewMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Calo monitoring") - - #-------------------# - # Egamma monitoring # - #-------------------# - if DQMonFlags.doEgammaMon(): - try: - include("egammaPerformance/egammaMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Egamma monitoring") - - #----------------# - # MET monitoring # - #----------------# - if DQMonFlags.doMissingEtMon(): - try: - include("MissingETMonitoring/MissingET_Monitoring.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up ETmiss monitoring") - - #----------------# - # Jet monitoring # - #----------------# - if DQMonFlags.doJetMon(): - try: - include("JetMonitoring/JetMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Jet monitoring") - - #----------------# - # Tau monitoring # - #----------------# - if DQMonFlags.doTauMon(): - try: - include("tauMonitoring/tauMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Tau monitoring") - - #--------------------# - # Jet tag monitoring # - #--------------------# - if DQMonFlags.doJetTagMon(): - try: - include("JetTagMonitoring/JetTagMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up jet-tag monitoring") - - #-----------------------------# - # MuonSpectrometer monitoring # - #-----------------------------# - if (DQMonFlags.doMuonRawMon() or DQMonFlags.doMuonSegmentMon() - or DQMonFlags.doMuonTrackMon() or DQMonFlags.doMuonAlignMon() - or DQMonFlags.doMuonTrkPhysMon() or DQMonFlags.doMuonPhysicsMon()): - try: - include("MuonDQAMonitoring/MuonDetMonitoring.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up Muon detector monitoring") - - #------------------# - # LUCID monitoring # - #------------------# - if DQMonFlags.doLucidMon(): - try: - include("LUCID_Monitoring/LUCIDMon_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up LUCID monitoring") - - #------------------# - # AFP monitoring # - #------------------# - if DQMonFlags.doAFPMon(): - try: - include("AFP_Monitoring/AFPMonitoring_jobOptions.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up AFP monitoring") - - - #---------------------# - # HeavyIon monitoring # - #---------------------# - if DQMonFlags.doHIMon(): - try: - include("HIMonitoring/HIMonitoringSteering_jo.py") - except Exception: - treatException("DataQualitySteering_jobOptions.py: exception when setting up HI monitoring") - - #------------------------# - # Trigger chain steering # - #------------------------# - trigMap = DQMonFlags.triggerChainMap.get_Value() - for toolName, trigChain in six.iteritems(trigMap): - local_logger.debug("Applying trigger %s to %s", trigChain, toolName) - if hasattr(ToolSvc,toolName): - tool = getattr(ToolSvc,toolName) - tool.TriggerChain = trigChain - else: - local_logger.debug("%s is not found in ToolSvc. Cannot set trigger chain!", toolName) - - #--------------------------# - # Post-setup configuration # - #--------------------------# - # force conditions update because the converter can't do it - if DQMonFlags.monManEnvironment in ('tier0ESD', 'AOD'): - from AthenaCommon.AlgSequence import AthSequencer - from AthenaMonitoring.AthenaMonitoringConf import ForceIDConditionsAlg - asq = AthSequencer("AthBeginSeq") - asq += [ForceIDConditionsAlg()] - - if rec.triggerStream()=='express': - include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py") - local_logger.debug('DQ Post-Setup Configuration') - import re - from AthenaMonitoring.EventFlagFilterTool import GetEventFlagFilterTool - - # now the DQ tools are private, extract them from the set of monitoring algorithms - toolset = set() - from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager - for _ in topSequence: - if isinstance(_, AthenaMonManager): - toolset.update(_.AthenaMonTools) - - # in MT the initialization can be in random order ... force all managers to have common setup - _.FileKey = DQMonFlags.monManFileKey() - _.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup() - _.DataType = DQMonFlags.monManDataType() - _.Environment = DQMonFlags.monManEnvironment() - _.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval() - _.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval() - _.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval() - _.ManualRunLBSetup = DQMonFlags.monManManualRunLBSetup() - _.Run = DQMonFlags.monManRun() - _.LumiBlock = DQMonFlags.monManLumiBlock() - - for tool in toolset: - # stop lumi access if we're in MC or enableLumiAccess == False - if 'EnableLumi' in dir(tool): - if globalflags.DataSource.get_Value() == 'geant4' or not DQMonFlags.enableLumiAccess(): - tool.EnableLumi = False + #------------------# + # LUCID monitoring # + #------------------# + if DQMonFlags.doLucidMon(): + try: + include("LUCID_Monitoring/LUCIDMon_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up LUCID monitoring") + + #------------------# + # AFP monitoring # + #------------------# + if DQMonFlags.doAFPMon(): + try: + include("AFP_Monitoring/AFPMonitoring_jobOptions.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up AFP monitoring") + + + #---------------------# + # HeavyIon monitoring # + #---------------------# + if DQMonFlags.doHIMon(): + try: + include("HIMonitoring/HIMonitoringSteering_jo.py") + except Exception: + treatException("DataQualitySteering_jobOptions.py: exception when setting up HI monitoring") + + #------------------------# + # Trigger chain steering # + #------------------------# + trigMap = DQMonFlags.triggerChainMap.get_Value() + for toolName, trigChain in six.iteritems(trigMap): + local_logger.debug("Applying trigger %s to %s", trigChain, toolName) + if hasattr(ToolSvc,toolName): + tool = getattr(ToolSvc,toolName) + tool.TriggerChain = trigChain else: - tool.EnableLumi = True - # if we have the FilterTools attribute, assume this is in fact a - # monitoring tool - if hasattr(tool, 'FilterTools'): - # if express: use ATLAS Ready filter - local_logger.debug('Setting up filters for tool %s', tool) - if rec.triggerStream()=='express': - local_logger.info('Stream is express and we will add ready tool for %s', tool) - tool.FilterTools += [GetAtlasReadyFilterTool()] - # if requested: configure a generic event cleaning tool - if not athenaCommonFlags.isOnline() and any(re.match(_, tool.name()) for _ in DQMonFlags.includeInCleaning()): - if tool.name() in DQMonFlags.specialCleaningConfiguration(): - config_ = DQMonFlags.specialCleaningConfiguration()[tool.name()].copy() - for _ in config_: - try: - config_[_] = bool(config_[_]) - except: - local_logger.error('Unable to enact special event cleaning configuration for tool %s; cannot cast %s=%s to bool', tool.name(), _, config_[_]) - config_['name'] = 'DQEventFlagFilterTool_%s' % tool.name() - tool.FilterTools += [GetEventFlagFilterTool(**config_)] - del config_ - local_logger.info('Configurating special event cleaning for tool %s', tool) + local_logger.debug("%s is not found in ToolSvc. Cannot set trigger chain!", toolName) + + #--------------------------# + # Post-setup configuration # + #--------------------------# + # force conditions update because the converter can't do it + if DQMonFlags.monManEnvironment in ('tier0ESD', 'AOD'): + from AthenaCommon.AlgSequence import AthSequencer + from AthenaMonitoring.AthenaMonitoringConf import ForceIDConditionsAlg + asq = AthSequencer("AthBeginSeq") + asq += [ForceIDConditionsAlg()] + + if rec.triggerStream()=='express': + include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py") + local_logger.debug('DQ Post-Setup Configuration') + import re + from AthenaMonitoring.EventFlagFilterTool import GetEventFlagFilterTool + + # now the DQ tools are private, extract them from the set of monitoring algorithms + toolset = set() + from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager + for _ in topSequence: + if isinstance(_, AthenaMonManager): + toolset.update(_.AthenaMonTools) + + # in MT the initialization can be in random order ... force all managers to have common setup + _.FileKey = DQMonFlags.monManFileKey() + _.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup() + _.DataType = DQMonFlags.monManDataType() + _.Environment = DQMonFlags.monManEnvironment() + _.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval() + _.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval() + _.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval() + _.ManualRunLBSetup = DQMonFlags.monManManualRunLBSetup() + _.Run = DQMonFlags.monManRun() + _.LumiBlock = DQMonFlags.monManLumiBlock() + + for tool in toolset: + # stop lumi access if we're in MC or enableLumiAccess == False + if 'EnableLumi' in dir(tool): + if globalflags.DataSource.get_Value() == 'geant4' or not DQMonFlags.enableLumiAccess(): + tool.EnableLumi = False else: - local_logger.info('Configuring generic event cleaning for tool %s', tool) - tool.FilterTools += [GetEventFlagFilterTool('DQEventFlagFilterTool')] - else: - local_logger.info('NOT configuring event cleaning for tool %s', tool) - - # give all the tools the trigger translator - if DQMonFlags.useTrigger(): - tool.TrigDecisionTool = monTrigDecTool - tool.TriggerTranslatorTool = monTrigTransTool - - if DQMonFlags.monToolPostExec(): - postprocfunc = eval(DQMonFlags.monToolPostExec()) - local_logger.debug('Applying postexec transform to ===> %s', tool) - postprocfunc(tool) - del postprocfunc - - # # set up new-style monitoring with new-style configuration - # # only enable this when we understand details better... - # local_logger.info('Setting up new-style DQ monitoring') - # from AthenaMonitoring.AthenaMonitoringCfg import AthenaMonitoringCfg - # from AthenaCommon.Configurable import Configurable - - # _ = Configurable.configurableRun3Behavior - # Configurable.configurableRun3Behavior = 1 - # from AthenaConfiguration.AllConfigFlags import ConfigFlags - # ConfigFlags.Input.Files = jobproperties.AthenaCommonFlags.FilesInput() - # ConfigFlags.Output.HISTFileName = DQMonFlags.histogramFile() - # ConfigFlags.DQ.isReallyOldStyle = True - # _2 = AthenaMonitoringCfg(ConfigFlags) - # Configurable.configurableRun3Behavior = _ - # _2.printConfig() - # _2.appendToGlobals() - # del _, _2 - -del local_logger + tool.EnableLumi = True + # if we have the FilterTools attribute, assume this is in fact a + # monitoring tool + if hasattr(tool, 'FilterTools'): + # if express: use ATLAS Ready filter + local_logger.debug('Setting up filters for tool %s', tool) + if rec.triggerStream()=='express': + local_logger.info('Stream is express and we will add ready tool for %s', tool) + tool.FilterTools += [GetAtlasReadyFilterTool()] + # if requested: configure a generic event cleaning tool + if not athenaCommonFlags.isOnline() and any(re.match(_, tool.name()) for _ in DQMonFlags.includeInCleaning()): + if tool.name() in DQMonFlags.specialCleaningConfiguration(): + config_ = DQMonFlags.specialCleaningConfiguration()[tool.name()].copy() + for _ in config_: + try: + config_[_] = bool(config_[_]) + except: + local_logger.error('Unable to enact special event cleaning configuration for tool %s; cannot cast %s=%s to bool', tool.name(), _, config_[_]) + config_['name'] = 'DQEventFlagFilterTool_%s' % tool.name() + tool.FilterTools += [GetEventFlagFilterTool(**config_)] + del config_ + local_logger.info('Configurating special event cleaning for tool %s', tool) + else: + local_logger.info('Configuring generic event cleaning for tool %s', tool) + tool.FilterTools += [GetEventFlagFilterTool('DQEventFlagFilterTool')] + else: + local_logger.info('NOT configuring event cleaning for tool %s', tool) + + # give all the tools the trigger translator + if DQMonFlags.useTrigger(): + tool.TrigDecisionTool = monTrigDecTool + tool.TriggerTranslatorTool = monTrigTransTool + + if DQMonFlags.monToolPostExec(): + postprocfunc = eval(DQMonFlags.monToolPostExec()) + local_logger.debug('Applying postexec transform to ===> %s', tool) + postprocfunc(tool) + del postprocfunc + + else: + local_logger.info("DQ: setting up ConfigFlags") + from AthenaConfiguration.AllConfigFlags import ConfigFlags + if globalflags.InputFormat() == 'bytestream': + ConfigFlags.Input.Files=athenaCommonFlags.BSRDOInput() + elif globalflags.InputFormat() == 'pool': + ConfigFlags.Input.Files=svcMgr.EventSelector.InputCollections + + ConfigFlags.GeoModel.Align.Dynamic=InDetFlags.useDynamicAlignFolders() + ConfigFlags.Detector.GeometryPixel=DetFlags.pixel_on() + ConfigFlags.Detector.GeometrySCT=DetFlags.SCT_on() + ConfigFlags.Detector.GeometryTRT=DetFlags.TRT_on() + ConfigFlags.InDet.usePixelDCS=InDetFlags.usePixelDCS() + + ConfigFlags.Output.HISTFileName=DQMonFlags.histogramFile() + ConfigFlags.DQ.FileKey=DQMonFlags.monManFileKey() + ConfigFlags.DQ.Environment=DQMonFlags.monManEnvironment() + ConfigFlags.DQ.useTrigger=DQMonFlags.useTrigger() + ConfigFlags.IOVDb.GlobalTag=globalflags.ConditionsTag() + ConfigFlags.DQ.isReallyOldStyle=False + + from AthenaConfiguration import ComponentAccumulator + from AthenaMonitoring.AthenaMonitoringCfg import AthenaMonitoringCfg + from AthenaMonitoring.DQConfigFlags import allSteeringFlagsOff + from AthenaMonitoring import AthenaMonitoringConf + + Steering = ConfigFlags.DQ.Steering + Steering.doGlobalMon=DQMonFlags.doGlobalMon() + Steering.doLVL1CaloMon=DQMonFlags.doLVL1CaloMon() + Steering.doCTPMon=DQMonFlags.doCTPMon() + Steering.doHLTMon=DQMonFlags.doHLTMon() + Steering.doPixelMon=DQMonFlags.doPixelMon() + Steering.doSCTMon=DQMonFlags.doSCTMon() + Steering.doTRTMon=DQMonFlags.doTRTMon() + Steering.doLArMon=DQMonFlags.doLArMon() + Steering.doTileMon=DQMonFlags.doTileMon() + Steering.doCaloGlobalMon=DQMonFlags.doCaloMon() + Steering.Muon.doRawMon=DQMonFlags.doMuonRawMon() + Steering.Muon.doTrackMon=DQMonFlags.doMuonTrackMon() + Steering.doMuonMon=(Steering.Muon.doRawMon or Steering.Muon.doTrackMon) + Steering.doLucidMon=DQMonFlags.doLucidMon() + Steering.doAFPMon=DQMonFlags.doAFPMon() + Steering.doHIMon=DQMonFlags.doHIMon() + Steering.doEgammaMon=DQMonFlags.doEgammaMon() + Steering.doJetMon=DQMonFlags.doJetMon() + Steering.doMissingEtMon=DQMonFlags.doMissingEtMon() + Steering.doTauMon=DQMonFlags.doTauMon() + Steering.doJetTagMon=DQMonFlags.doJetTagMon() + + ConfigFlags.dump() + ComponentAccumulator.CAtoGlobalWrapper(AthenaMonitoringCfg, ConfigFlags) + + if len([_ for _ in AthSequencer("AthCondSeq") if _.getName()=="PixelDetectorElementCondAlg"]) > 0: + local_logger.info("DQ: force ID conditions loading") + asq = AthSequencer("AthBeginSeq") + asq += AthenaMonitoringConf.ForceIDConditionsAlg("ForceIDConditionsAlg") + +del local_logger \ No newline at end of file diff --git a/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py b/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py index 5d8e8bf5e25..e52c842f309 100644 --- a/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py +++ b/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py @@ -21,22 +21,19 @@ if DQMonFlags.useTrigger(): cfg = TriggerConfigGetter() if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool().split('/')[-1]): - tdt_local_logger.error('DQ Monitoring is being asked to set up the TrigDecisionTool for some reason. THIS IS A TERRIBLE IDEA AND SHOULD BE CONSIDERED A BUG!') - from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool - monTrigDecTool = Trig__TrigDecisionTool(name=DQMonFlags.nameTrigDecTool(), - OutputLevel=ERROR, - PublicChainGroups = {"EFTau": "EF_[0-9]?tau.*", - "EFPhoton": "EF_[0-9]?g*", - "EFJets":"EF_J.*", - } - ) - ToolSvc += monTrigDecTool - # The following should be provided automatically when setting up the tool, but is not - # Still needs to be provided by the trigger - # When trigger has a standard procedure for this, switch - ToolSvc.TrigDecisionTool.TrigConfigSvc = "Trig::TrigConfigSvc/TrigConfigSvc" - from TrigEDMConfig.TriggerEDM import EDMLibraries - ToolSvc.TrigDecisionTool.Navigation.Dlls = [e for e in EDMLibraries if 'TPCnv' not in e] + if rec.doTrigger(): + tdt_local_logger.error('DQ Monitoring is being asked to set up the TrigDecisionTool for some reason. THIS IS A TERRIBLE IDEA AND SHOULD BE CONSIDERED A BUG!') + from AthenaMonitoring.TriggerInterface import getTrigDecisionTool + from AthenaConfiguration.AllConfigFlags import ConfigFlags + if globalflags.InputFormat() == 'bytestream': + ConfigFlags.Input.Files=athenaCommonFlags.BSRDOInput() + elif globalflags.InputFormat() == 'pool': + ConfigFlags.Input.Files=svcMgr.EventSelector.InputCollections + + from AthenaConfiguration import ComponentAccumulator + ComponentAccumulator.CAtoGlobalWrapper(getTrigDecisionTool, ConfigFlags) + + monTrigDecTool = getattr(ToolSvc, 'TrigDecisionTool') else: monTrigDecTool = getattr(ToolSvc, DQMonFlags.nameTrigDecTool().split('/')[-1]) tdt_local_logger.info('Scheduled monitoring TDT %s', monTrigDecTool) diff --git a/Database/IOVDbSvc/python/CondDB.py b/Database/IOVDbSvc/python/CondDB.py index 61aea2f0846..fc854f8f1c8 100644 --- a/Database/IOVDbSvc/python/CondDB.py +++ b/Database/IOVDbSvc/python/CondDB.py @@ -231,7 +231,7 @@ This allows the possibility of later adding a new IOV using IOVSvc::setRange.""" self.iovdbsvc.Folders+=[folderadd] if className: - key = (className, self.extractFolder(folder)) + key = [className, self.extractFolder(folder)] if key not in condInputLoader.Load: condInputLoader.Load += [ key ] diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py index 6d2cddef950..45a1de73d1b 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py @@ -20,8 +20,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): CondArgs.update( UseCalibConditions=True, UseDeadmapConditions=True, - UseDCSStateConditions=False, - UseDCSStatusConditions=False, + UseDCSStateConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS), + UseDCSStatusConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS), UseDCSHVConditions=True, UseDCSTemperatureConditions=True, UseTDAQConditions=False, @@ -52,137 +52,138 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): EndcapTimeOffset=[5.0,5.0,5.0], DBMTimeOffset=[5.0,5.0,5.0] ) - # Digitization parameters - CondArgs.update( - BunchSpace=25.0, - FEI4BarrelHitDiscConfig=[2] - ) - #==================================================================================== - # Run-dependent SIMULATION(digitization) parameters: - #==================================================================================== - # RUN2 2015/2016 - CondArgs.update( - BarrelToTThreshold2016 = [ -1, 5, 5, 5], - FEI3BarrelLatency2016 = [ 0, 151, 256, 256], - FEI3BarrelHitDuplication2016 = [False,False,False,False], - FEI3BarrelSmallHitToT2016 = [ -1, -1, -1, -1], - FEI3BarrelTimingSimTune2016 = [ -1, 2015, 2015, 2015], - BarrelCrossTalk2016 = [ 0.30, 0.06, 0.06, 0.06], - BarrelNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8, 5e-8], - BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3], - EndcapToTThreshold2016 = [ 5, 5, 5], - FEI3EndcapLatency2016 = [ 256, 256, 256], - FEI3EndcapHitDuplication2016 = [False,False,False], - FEI3EndcapSmallHitToT2016 = [ -1, -1, -1], - FEI3EndcapTimingSimTune2016 = [ 2015, 2015, 2015], - EndcapCrossTalk2016 = [ 0.06, 0.06, 0.06], - EndcapNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8], - EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3], - DBMToTThreshold2016 = [ -1, -1, -1], - DBMCrossTalk2016 = [ 0.06, 0.06, 0.06], - DBMNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8], - DBMDisableProbability2016 = [ 9e-3, 9e-3, 9e-3], - IBLNoiseShape2016 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], - BLayerNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], - PixelNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], - # Layer-2 noise shape [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2129, 0.4016, 0.5477, 0.6599, 0.7435, 0.8160, 0.8779, 0.9340, 0.9798, 1.0] - # So far, Gaudi::Property does not support 2D vector. - #EndcapNoiseShape=[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1748, 0.3409, 0.4760, 0.5850, 0.6754, 0.7538, 0.8264, 0.8962, 0.9655, 1.0], - # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1852, 0.3528, 0.4881, 0.5961, 0.6855, 0.7640, 0.8374, 0.9068, 0.9749, 1.0], - # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1735, 0.3380, 0.4733, 0.5829, 0.6730, 0.7516, 0.8234, 0.8916, 0.9595, 1.0]] - ) - #==================================================================================== - # RUN2 2017 - CondArgs.update( - BarrelToTThreshold2017 = [ -1, 5, 5, 5], - FEI3BarrelLatency2017 = [ 0, 151, 256, 256], - FEI3BarrelHitDuplication2017 = [False,False,False,False], - FEI3BarrelSmallHitToT2017 = [ -1, -1, -1, -1], - FEI3BarrelTimingSimTune2017 = [ -1, 2018, 2018, 2018], - BarrelCrossTalk2017 = [ 0.30, 0.06, 0.06, 0.06], - BarrelNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8, 5e-8], - BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3], - EndcapToTThreshold2017 = [ 5, 5, 5], - FEI3EndcapLatency2017 = [ 256, 256, 256], - FEI3EndcapHitDuplication2017 = [False,False,False], - FEI3EndcapSmallHitToT2017 = [ -1, -1, -1], - FEI3EndcapTimingSimTune2017 = [ 2018, 2018, 2018], - EndcapCrossTalk2017 = [ 0.06, 0.06, 0.06], - EndcapNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8], - EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3], - DBMToTThreshold2017 = [ -1, -1, -1], - DBMCrossTalk2017 = [ 0.06, 0.06, 0.06], - DBMNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8], - DBMDisableProbability2017 = [ 9e-3, 9e-3, 9e-3], - IBLNoiseShape2017 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], - BLayerNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], - PixelNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], - ) - #==================================================================================== - # RUN2 2018 - CondArgs.update( - BarrelToTThreshold2018 = [ -1, 3, 5, 5], - FEI3BarrelLatency2018 = [ 0, 151, 256, 256], - FEI3BarrelHitDuplication2018 = [False,False,False,False], - FEI3BarrelSmallHitToT2018 = [ -1, -1, -1, -1], - FEI3BarrelTimingSimTune2018 = [ -1, 2018, 2018, 2018], - BarrelCrossTalk2018 = [ 0.30, 0.06, 0.06, 0.06], - BarrelNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8, 5e-8], - BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3], - EndcapToTThreshold2018 = [ 5, 5, 5], - FEI3EndcapLatency2018 = [ 256, 256, 256], - FEI3EndcapHitDuplication2018 = [False,False,False], - FEI3EndcapSmallHitToT2018 = [ -1, -1, -1], - FEI3EndcapTimingSimTune2018 = [ 2018, 2018, 2018], - EndcapCrossTalk2018 = [ 0.06, 0.06, 0.06], - EndcapNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8], - EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3], - DBMToTThreshold2018 = [ -1, -1, -1], - DBMCrossTalk2018 = [ 0.06, 0.06, 0.06], - DBMNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8], - DBMDisableProbability2018 = [ 9e-3, 9e-3, 9e-3], - IBLNoiseShape2018 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], - BLayerNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], - PixelNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], - ) - #==================================================================================== - # RUN1 - CondArgs.update( - BarrelToTThresholdRUN1 = [ 3, 3, 3], - FEI3BarrelLatencyRUN1 = [ 256, 256, 256], - FEI3BarrelHitDuplicationRUN1 = [ True, True, True], - FEI3BarrelSmallHitToTRUN1 = [ 7, 7, 7], - FEI3BarrelTimingSimTuneRUN1 = [ 2009, 2009, 2009], - BarrelCrossTalkRUN1 = [ 0.06, 0.06, 0.06], - BarrelNoiseOccupancyRUN1 = [ 5e-8, 5e-8, 5e-8], - BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3], - EndcapToTThresholdRUN1 = [ 3, 3, 3], - FEI3EndcapLatencyRUN1 = [ 256, 256, 256], - FEI3EndcapHitDuplicationRUN1 = [ True, True, True], - FEI3EndcapSmallHitToTRUN1 = [ 7, 7, 7], - FEI3EndcapTimingSimTuneRUN1 = [ 2009, 2009, 2009], - EndcapCrossTalkRUN1 = [ 0.06, 0.06, 0.06], - EndcapNoiseOccupancyRUN1 = [ 5e-8, 5e-8, 5e-8], - EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3], - BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], - PixelNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], - ) - #==================================================================================== - # ITK - CondArgs.update( - BarrelToTThresholdITK = [ 3, 3, 3, 3, 3], - BarrelCrossTalkITK = [ 0.06, 0.06, 0.06, 0.06, 0.06], - BarrelNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8], - BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3], - EndcapToTThresholdITK = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], - EndcapCrossTalkITK = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06], - EndcapNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8], - EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3], - InnermostNoiseShapeITK = [0.0, 1.0], - NextInnermostNoiseShapeITK = [0.0, 1.0], - PixelNoiseShapeITK = [0.0, 1.0] - ) + if flags.Input.isMC: + # Digitization parameters + CondArgs.update( + BunchSpace=25.0, + FEI4BarrelHitDiscConfig=[2] + ) + #==================================================================================== + # Run-dependent SIMULATION(digitization) parameters: + #==================================================================================== + # RUN2 2015/2016 + CondArgs.update( + BarrelToTThreshold2016 = [ -1, 5, 5, 5], + FEI3BarrelLatency2016 = [ 0, 151, 256, 256], + FEI3BarrelHitDuplication2016 = [False,False,False,False], + FEI3BarrelSmallHitToT2016 = [ -1, -1, -1, -1], + FEI3BarrelTimingSimTune2016 = [ -1, 2015, 2015, 2015], + BarrelCrossTalk2016 = [ 0.30, 0.06, 0.06, 0.06], + BarrelNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8, 5e-8], + BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3], + EndcapToTThreshold2016 = [ 5, 5, 5], + FEI3EndcapLatency2016 = [ 256, 256, 256], + FEI3EndcapHitDuplication2016 = [False,False,False], + FEI3EndcapSmallHitToT2016 = [ -1, -1, -1], + FEI3EndcapTimingSimTune2016 = [ 2015, 2015, 2015], + EndcapCrossTalk2016 = [ 0.06, 0.06, 0.06], + EndcapNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8], + EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3], + DBMToTThreshold2016 = [ -1, -1, -1], + DBMCrossTalk2016 = [ 0.06, 0.06, 0.06], + DBMNoiseOccupancy2016 = [ 5e-8, 5e-8, 5e-8], + DBMDisableProbability2016 = [ 9e-3, 9e-3, 9e-3], + IBLNoiseShape2016 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], + BLayerNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], + PixelNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], + # Layer-2 noise shape [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2129, 0.4016, 0.5477, 0.6599, 0.7435, 0.8160, 0.8779, 0.9340, 0.9798, 1.0] + # So far, Gaudi::Property does not support 2D vector. + #EndcapNoiseShape=[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1748, 0.3409, 0.4760, 0.5850, 0.6754, 0.7538, 0.8264, 0.8962, 0.9655, 1.0], + # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1852, 0.3528, 0.4881, 0.5961, 0.6855, 0.7640, 0.8374, 0.9068, 0.9749, 1.0], + # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1735, 0.3380, 0.4733, 0.5829, 0.6730, 0.7516, 0.8234, 0.8916, 0.9595, 1.0]] + ) + #==================================================================================== + # RUN2 2017 + CondArgs.update( + BarrelToTThreshold2017 = [ -1, 5, 5, 5], + FEI3BarrelLatency2017 = [ 0, 151, 256, 256], + FEI3BarrelHitDuplication2017 = [False,False,False,False], + FEI3BarrelSmallHitToT2017 = [ -1, -1, -1, -1], + FEI3BarrelTimingSimTune2017 = [ -1, 2018, 2018, 2018], + BarrelCrossTalk2017 = [ 0.30, 0.06, 0.06, 0.06], + BarrelNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8, 5e-8], + BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3], + EndcapToTThreshold2017 = [ 5, 5, 5], + FEI3EndcapLatency2017 = [ 256, 256, 256], + FEI3EndcapHitDuplication2017 = [False,False,False], + FEI3EndcapSmallHitToT2017 = [ -1, -1, -1], + FEI3EndcapTimingSimTune2017 = [ 2018, 2018, 2018], + EndcapCrossTalk2017 = [ 0.06, 0.06, 0.06], + EndcapNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8], + EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3], + DBMToTThreshold2017 = [ -1, -1, -1], + DBMCrossTalk2017 = [ 0.06, 0.06, 0.06], + DBMNoiseOccupancy2017 = [ 5e-8, 5e-8, 5e-8], + DBMDisableProbability2017 = [ 9e-3, 9e-3, 9e-3], + IBLNoiseShape2017 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], + BLayerNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], + PixelNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], + ) + #==================================================================================== + # RUN2 2018 + CondArgs.update( + BarrelToTThreshold2018 = [ -1, 3, 5, 5], + FEI3BarrelLatency2018 = [ 0, 151, 256, 256], + FEI3BarrelHitDuplication2018 = [False,False,False,False], + FEI3BarrelSmallHitToT2018 = [ -1, -1, -1, -1], + FEI3BarrelTimingSimTune2018 = [ -1, 2018, 2018, 2018], + BarrelCrossTalk2018 = [ 0.30, 0.06, 0.06, 0.06], + BarrelNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8, 5e-8], + BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3], + EndcapToTThreshold2018 = [ 5, 5, 5], + FEI3EndcapLatency2018 = [ 256, 256, 256], + FEI3EndcapHitDuplication2018 = [False,False,False], + FEI3EndcapSmallHitToT2018 = [ -1, -1, -1], + FEI3EndcapTimingSimTune2018 = [ 2018, 2018, 2018], + EndcapCrossTalk2018 = [ 0.06, 0.06, 0.06], + EndcapNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8], + EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3], + DBMToTThreshold2018 = [ -1, -1, -1], + DBMCrossTalk2018 = [ 0.06, 0.06, 0.06], + DBMNoiseOccupancy2018 = [ 5e-8, 5e-8, 5e-8], + DBMDisableProbability2018 = [ 9e-3, 9e-3, 9e-3], + IBLNoiseShape2018 = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], + BLayerNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], + PixelNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], + ) + #==================================================================================== + # RUN1 + CondArgs.update( + BarrelToTThresholdRUN1 = [ 3, 3, 3], + FEI3BarrelLatencyRUN1 = [ 256, 256, 256], + FEI3BarrelHitDuplicationRUN1 = [ True, True, True], + FEI3BarrelSmallHitToTRUN1 = [ 7, 7, 7], + FEI3BarrelTimingSimTuneRUN1 = [ 2009, 2009, 2009], + BarrelCrossTalkRUN1 = [ 0.06, 0.06, 0.06], + BarrelNoiseOccupancyRUN1 = [ 5e-8, 5e-8, 5e-8], + BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3], + EndcapToTThresholdRUN1 = [ 3, 3, 3], + FEI3EndcapLatencyRUN1 = [ 256, 256, 256], + FEI3EndcapHitDuplicationRUN1 = [ True, True, True], + FEI3EndcapSmallHitToTRUN1 = [ 7, 7, 7], + FEI3EndcapTimingSimTuneRUN1 = [ 2009, 2009, 2009], + EndcapCrossTalkRUN1 = [ 0.06, 0.06, 0.06], + EndcapNoiseOccupancyRUN1 = [ 5e-8, 5e-8, 5e-8], + EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3], + BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0], + PixelNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0], + ) + #==================================================================================== + # ITK + CondArgs.update( + BarrelToTThresholdITK = [ 3, 3, 3, 3, 3], + BarrelCrossTalkITK = [ 0.06, 0.06, 0.06, 0.06, 0.06], + BarrelNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8], + BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3], + EndcapToTThresholdITK = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + EndcapCrossTalkITK = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06], + EndcapNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8], + EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3], + InnermostNoiseShapeITK = [0.0, 1.0], + NextInnermostNoiseShapeITK = [0.0, 1.0], + PixelNoiseShapeITK = [0.0, 1.0] + ) # Charge calibration parameters CondArgs.update( diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py index 77bdacc15a1..64331dad8ef 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py @@ -70,13 +70,10 @@ def PixelMonitoringConfig(flags): PixelAthClusterMonAlgCfg(helper, pixelAthClusterMonAlg, **kwargsClusMonAlg) - from PixelMonitoring.PixelMonitoringConf import PixelAthErrorMonAlg from PixelMonitoring.PixelAthErrorMonAlgCfg import PixelAthErrorMonAlgCfg - pixelAthMonAlgErrorMonAlg = helper.addAlgorithm(PixelAthErrorMonAlg, 'PixelAthErrorMonAlg') + pixelAthMonAlgErrorMonAlg = helper.addAlgorithm(CompFactory.PixelAthErrorMonAlg, 'PixelAthErrorMonAlg') for k, v in kwargsErrMonAlg.items(): setattr(pixelAthMonAlgErrorMonAlg, k, v) - from PixelConditionsTools.PixelConditionsToolsConf import PixelByteStreamErrorsTool - pixelAthMonAlgErrorMonAlg.PixelByteStreamErrorsTool = PixelByteStreamErrorsTool(ReadingESD = (flags.DQ.Environment == 'tier0ESD')) PixelAthErrorMonAlgCfg(helper, pixelAthMonAlgErrorMonAlg, **kwargsErrMonAlg) acc.merge(helper.result()) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py index e0d34db1d10..7fb4538d006 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py @@ -35,7 +35,7 @@ def SCTTracksMonAlgConfig(inputFlags): myMonAlg.FilterTools += [GetFilledBunchFilterTool()] doTrigger = False - if not inputFlags.isMC: + if not inputFlags.Input.isMC: if inputFlags.Trigger.doHLT: doTrigger = True myMonAlg.doTrigger = doTrigger diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py index c589bb357c6..a66b8c0877b 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py @@ -20,8 +20,8 @@ def TrackSummaryToolWorkaround(flags): result.merge(PixelConfigCondAlgCfg(flags, UseCalibConditions=True, UseDeadmapConditions=True, - UseDCSStateConditions=False, - UseDCSStatusConditions=False, + UseDCSStateConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS), + UseDCSStatusConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS), UseDCSHVConditions=True, UseDCSTemperatureConditions=True, UseTDAQConditions=False)) @@ -87,15 +87,15 @@ def TrackSummaryToolWorkaround(flags): CountDeadModulesAfterLastHit = True, BoundaryCheckTool=InDetBoundaryCheckTool) result.addPublicTool(InDetHoleSearchTool) - InDetPrdAssociationTool = CompFactory.InDet.InDetPRD_AssociationToolGangedPixels(name = "InDetPrdAssociationTool", + InDetPrdAssociationTool = CompFactory.InDet.InDetPRD_AssociationToolGangedPixels(name = "InDetPrdAssociationTool_setup", PixelClusterAmbiguitiesMapName = "PixelClusterAmbiguitiesMap", SetupCorrect = True, addTRToutliers = True) result.addPublicTool(InDetPrdAssociationTool) InDetTrackSummaryHelperTool = CompFactory.InDet.InDetTrackSummaryHelperTool(name = "InDetSummaryHelper", AssoTool = InDetPrdAssociationTool, - PixelToTPIDTool = None, - TestBLayerTool = None, + PixelToTPIDTool = '', + TestBLayerTool = '', RunningTIDE_Ambi = True, DoSharedHits = False, HoleSearch = InDetHoleSearchTool, @@ -106,9 +106,9 @@ def TrackSummaryToolWorkaround(flags): InDetSummaryHelperTool = InDetTrackSummaryHelperTool, doSharedHits = False, doHolesInDet = True, - TRT_ElectronPidTool = None, - TRT_ToT_dEdxTool = None, - PixelToTPIDTool = None) + TRT_ElectronPidTool = '', + TRT_ToT_dEdxTool = '', + PixelToTPIDTool = '') result.setPrivateTools(InDetTrackSummaryTool) ############################## WORKAROUND (END) ############################ diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py index ceae33541b1..4ff8ded4e02 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py @@ -2,16 +2,28 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # def TRTMonitoringRun3RAW_AlgConfig(inputFlags): - from AthenaMonitoring import AthMonitorCfgHelperOld as AthMonitorCfgHelper + from AthenaConfiguration.ComponentFactory import isRun3Cfg + if isRun3Cfg(): + from AthenaMonitoring import AthMonitorCfgHelper + isOnline = inputFlags.Common.isOnline + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + rv = ComponentAccumulator() + else: + from AthenaMonitoring import AthMonitorCfgHelperOld as AthMonitorCfgHelper + from AthenaCommon.AthenaCommonFlags import athenaCommonFlags + isOnline = athenaCommonFlags.isOnline helper = AthMonitorCfgHelper(inputFlags, 'TRTMonitoringCfg') from AthenaConfiguration.ComponentFactory import CompFactory algTRTMonitoringRun3RAW = helper.addAlgorithm(CompFactory.TRTMonitoringRun3RAW_Alg, 'AlgTRTMonitoringRun3RAW', - ByteStreamErrors= "" if inputFlags.isMC else "TRT_ByteStreamErrs" + ByteStreamErrors= "" if inputFlags.Input.isMC else "TRT_ByteStreamErrs", + TrackSummaryTool= "InDetTrackSummaryTool" ) - from AthenaCommon.AthenaCommonFlags import athenaCommonFlags + if isRun3Cfg(): + from SCT_Monitoring.TrackSummaryToolWorkaround import TrackSummaryToolWorkaround + algTRTMonitoringRun3RAW.TrackSummaryTool = rv.popToolsAndMerge(TrackSummaryToolWorkaround(inputFlags)) maxLumiBlock = 200 numberOfBarrelStacks = 32 @@ -108,7 +120,7 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): rdoEndcapGroup.defineHistogram('HitWMap_Ar_passed,HitWMap_Ar;hHitWMap_Ar_{0}'.format(side[iside]),type='TEfficiency',title='Leading Edge in Time Window: Argon Straws (E{0});Straw Number in Stack;Probability'.format(side[iside]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe]) for iside in range(2): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' - regionMarker = (beId[ibe] + sideId[iside]) if athenaCommonFlags.isOnline is True else (sideId[iside]) + regionMarker = (beId[ibe] + sideId[iside]) if isOnline is True else (sideId[iside]) rdoLLHLOccGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOLLHLOccHistograms{0}{1}'.format(ibe,iside)) rdoLLHLOccGroup.defineHistogram('AvgHLOcc_side_x,AvgHLOcc_side_y;hAvgHLOcc_{0}'.format(regionMarker),type='TProfile',title='Avg. HL Occupancy{0};{1};Occupancy'.format(regionTag,stackOrSector[ibe]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=1,xmax=33) rdoLLHLOccGroup.defineHistogram('AvgLLOcc_side_x,AvgLLOcc_side_y;hAvgLLOcc_{0}'.format(regionMarker),type='TProfile',title='Avg. LL Occupancy{0};{1};Occupancy'.format(regionTag,stackOrSector[ibe]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=1,xmax=33) @@ -209,4 +221,8 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags): shiftTrackEndcapGroup.defineHistogram('StrawEffDetPhi_E_passed,StrawEffDetPhi_E;hStrawEffDetPhi_{0}'.format(sideId[iside]),type='TEfficiency',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32) ### Finished Booking TRT Hits Histograms ### - return helper.result() + if isRun3Cfg(): + rv.merge(helper.result()) + return rv + else: + return helper.result() diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py index 1e3fae2056c..44ff1145650 100644 --- a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py +++ b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py @@ -4,46 +4,37 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory LArBadChannelCondAlg, LArBadFebCondAlg, LArBadChannelMasker=CompFactory.getComps("LArBadChannelCondAlg","LArBadFebCondAlg","LArBadChannelMasker",) from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg -from IOVDbSvc.IOVDbSvcConfig import addFolders +from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline -def LArBadChannelCfg(configFlags, tag=""): +def LArBadChannelCfg(configFlags, tag=None): result=LArOnOffIdMappingCfg(configFlags) - - if configFlags.Common.isOnline or configFlags.Input.isMC: - foldername="/LAR/BadChannels/BadChannels" - else: - foldername="/LAR/BadChannelsOfl/BadChannels" - pass - - if configFlags.Common.isOnline: - dbname="LAR" - else: - dbname="LAR_OFL" + rekey="/LAR/BadChannels/BadChannels" - result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="CondAttrListCollection")) - - theLArBadChannelCondAlgo=LArBadChannelCondAlg(ReadKey=foldername) + if configFlags.Input.isMC: + result.merge(addFolders(configFlags,"/LAR/BadChannels/BadChannels","LAR_OFL",tag=tag, + className="CondAttrListCollection")) + else: + result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/BadChannels", + f"/LAR/BadChannelsOfl/BadChannels<key>{rekey}</key>",tag=tag, + className="CondAttrListCollection")) + theLArBadChannelCondAlgo=LArBadChannelCondAlg(ReadKey=rekey) result.addCondAlgo(theLArBadChannelCondAlgo) return result -def LArBadFebCfg(configFlags, tag=""): +def LArBadFebCfg(configFlags, tag=None): result=ComponentAccumulator() + rekey="/LAR/BadChannels/MissingFEBs" - if configFlags.Common.isOnline or configFlags.Input.isMC: - foldername="/LAR/BadChannels/MissingFEBs" - else: - foldername="/LAR/BadChannelsOfl/MissingFEBs" - pass - - if configFlags.Common.isOnline: - dbname="LAR" + if configFlags.Input.isMC: + result.merge(addFolders(configFlags,"/LAR/BadChannels/MissingFEBs","LAR_OFL",tag=tag, + className="AthenaAttributeList")) else: - dbname="LAR_OFL" - - result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList")) - result.addCondAlgo(LArBadFebCondAlg(ReadKey=foldername)) + result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/MissingFEBs", + f"/LAR/BadChannelsOfl/MissingFEBs<key>{rekey}</key>",tag=tag, + className="AthenaAttributeList")) + result.addCondAlgo(LArBadFebCondAlg(ReadKey=rekey)) return result diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py index ce39d215f7a..f8584140921 100644 --- a/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py +++ b/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py @@ -3,52 +3,34 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory LArBadFebCondAlg=CompFactory.LArBadFebCondAlg -from IOVDbSvc.IOVDbSvcConfig import addFolders +from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline -def LArKnownBadFebCfg(configFlags, tag=""): +def LArKnownBadFebCfg(configFlags, tag=None): result=ComponentAccumulator() if configFlags.GeoModel.Run == "RUN1": - foldername="" + rekey="" else: - if configFlags.Common.isOnline or configFlags.Input.isMC: - foldername="/LAR/BadChannels/KnownBADFEBs" - else: - foldername="/LAR/BadChannelsOfl/KnownBADFEBs" - pass - - if configFlags.Common.isOnline: - dbname="LAR" - else: - dbname="LAR_OFL" - pass - pass + rekey="/LAR/BadChannels/KnownBADFEBs" + result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/KnownBADFEBs", + f"/LAR/BadChannelsOfl/KnownBADFEBs<key>{rekey}</key>",tag=tag, + className="AthenaAttributeList")) - result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList")) - result.addCondAlgo(LArBadFebCondAlg("LArKonwnBadFebCondAlg",ReadKey=foldername,WriteKey="LArKnownBadFEBs")) + result.addCondAlgo(LArBadFebCondAlg("LArKnownBadFebAlg",ReadKey=rekey,WriteKey="LArKnownBadFEBs")) return result -def LArKnownMNBFebCfg(configFlags, tag=""): +def LArKnownMNBFebCfg(configFlags, tag=None): result=ComponentAccumulator() if configFlags.GeoModel.Run == "RUN1": - foldername="" - else: - if configFlags.Common.isOnline or configFlags.Input.isMC: - foldername="/LAR/BadChannels/KnownMNBFEBs" - else: - foldername="/LAR/BadChannelsOfl/KnownMNBFEBs" - pass - - if configFlags.Common.isOnline: - dbname="LAR" - else: - dbname="LAR_OFL" - pass - pass - - result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList")) - result.addCondAlgo(LArBadFebCondAlg("LArKonwnMNBFebCondAlg",ReadKey=foldername,WriteKey="LArKnownMNBFEBs")) + rekey="" + else: + rekey="/LAR/BadChannels/KnownMNBFEBs" + result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/KnownMNBFEBs", + f"/LAR/BadChannelsOfl/KnownMNBFEBs<key>{rekey}</key>",tag=tag, + className="AthenaAttributeList")) + + result.addCondAlgo(LArBadFebCondAlg("LArKnownMNBFebAlg",ReadKey=rekey,WriteKey="LArKnownMNBFEBs")) return result diff --git a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py index 772629cab37..1f3db3321df 100644 --- a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py +++ b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py @@ -39,7 +39,7 @@ def LArHVScaleCfg(configFlags): result.addCondAlgo(hvpath) LArHVCondAlg=CompFactory.LArHVCondAlg - hvcond = LArHVCondAlg("LArHVPathologyAlg",HVPathologies="LArHVPathology",OutputHVData="LArHVData") + hvcond = LArHVCondAlg(HVPathologies="LArHVPathology",OutputHVData="LArHVData") result.addCondAlgo(hvcond) from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg diff --git a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py index 513447a42d1..ac701c90637 100644 --- a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py @@ -12,14 +12,22 @@ def LArFEBMonConfigOld(inputFlags, cellDebug=False, dspDebug=False): def LArFEBMonConfig(inputFlags, cellDebug=False, dspDebug=False): - + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaMonitoring import AthMonitorCfgHelper helper = AthMonitorCfgHelper(inputFlags,'LArFEBMonAlgCfg') from AthenaConfiguration.ComponentFactory import CompFactory LArFEBMonConfigCore(helper, CompFactory.LArFEBMonAlg,inputFlags,cellDebug, dspDebug) - return helper.result() + rv = ComponentAccumulator() + + # adding LArFebErrorSummary algo + from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg + rv.merge(LArFebErrorSummaryMakerCfg(inputFlags)) + + rv.merge(helper.result()) + + return rv def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebug=False): @@ -74,14 +82,7 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu conddb.addFolder (db, fld, className=obj) larFEBMonAlg.Run1DSPThresholdsKey = 'LArDSPThresholds' - # adding LArFebErrorSummary algo - if isRun3Cfg() : - from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg - acc = LArFebErrorSummaryMakerCfg(inputFlags) - helper.resobj.merge(acc) - else : - #put here what to do else - pass + Group = helper.addGroup( larFEBMonAlg, GroupName, diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py index 17a556f5338..7c7a3050f65 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py @@ -16,7 +16,7 @@ def MuonTrackConfig(inputFlags, isOld=False): helper = AthMonitorCfgHelper(inputFlags, "MuonTrackMonitoringConfig") - muonTrackAlg = helper.addAlgorithm(MuonTrackMonitorAlgorithm, "MuonTrackMonitorAlgorithm") + muonTrackAlg = helper.addAlgorithm(MuonTrackMonitorAlgorithm, "MuonTrackMonitorAlg") myGroup = helper.addGroup(muonTrackAlg, "MuonTrackMonitorAlgorithm", "MuonPhysics/") diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py b/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py index 3b53019c7f0..bfcb72281de 100644 --- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py +++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py @@ -16,8 +16,12 @@ def JetTagMonitorConfig(inputFlags): ### STEP 1 ### # Define one top-level monitoring algorithm. The new configuration # framework uses a component accumulator. - #from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - #result = ComponentAccumulator() + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + result = ComponentAccumulator() + + # do not run monitoring in RAWtoESD + if inputFlags.DQ.Environment == 'tier0Raw': + return result # The following class will make a sequence, configure algorithms, and link # them to GenericMonitoringTools @@ -307,7 +311,8 @@ def JetTagMonitorConfig(inputFlags): # and the sequence containing the created algorithms. If we haven't called # any configuration other than the AthMonitorCfgHelper here, then we can # just return directly (and not create "result" above) - return helper.result() + result.merge(helper.result()) + return result # # Otherwise, merge with result object and return # acc, seq = helper.result() diff --git a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py index c04cef28d22..6378161ce16 100644 --- a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py +++ b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py @@ -9,7 +9,7 @@ ''' from __future__ import print_function -from JetMonitoring.JetMonitoringConfig import JetMonAlgSpec, HistoSpec, SelectSpec, ToolSpec +from JetMonitoring.JetMonitoringConfig import JetMonAlgSpec, HistoSpec, SelectSpec # ********************************************* @@ -145,6 +145,13 @@ def standardJetMonitoring(inputFlags): Details of what goes into jet monitoring is implemented by dedicated functions such as jetMonAlgConfig(). """ + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + rv = ComponentAccumulator() + + # do not run monitoring in RAWtoESD + if inputFlags.DQ.Environment == 'tier0Raw': + return rv + from AthenaMonitoring import AthMonitorCfgHelper helper = AthMonitorCfgHelper(inputFlags,'JetMonitoring') @@ -161,4 +168,5 @@ def standardJetMonitoring(inputFlags): for conf in jetAlgConfs: conf.toAlg(helper) # adds the conf as a JetMonitoringAlg to the helper - return helper.result() # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system. + rv.merge(helper.result()) # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system. + return rv diff --git a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py index 934393e2f38..a01eac97787 100644 --- a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py +++ b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py @@ -49,8 +49,12 @@ def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""): def METMonitoringConfig(inputFlags): # '''Function to configures some algorithms in the monitoring system.''' -# from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -# result = ComponentAccumulator() + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + result = ComponentAccumulator() + + # do not run monitoring in RAWtoESD + if inputFlags.DQ.Environment == 'tier0Raw': + return result from AthenaMonitoring import AthMonitorCfgHelper # helper = AthMonitorCfgHelper(inputFlags,'AthMonitorCfg') @@ -289,4 +293,6 @@ def METMonitoringConfig(inputFlags): BadJetsGroup = helper.addGroup(BadJets_EMTopoMETMonAlg,"METMonitor","MissingEt/AllTriggers/BadJets/MET_Calo/EMTopo") for mets in emtopomet_types: defineHistograms(BadJets_EMTopoMETMonAlg, BadJetsGroup,helper,mets) - return helper.result() + + result.merge(helper.result()) + return result diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 98d249a7337..2fd95abd9dc 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -676,20 +676,6 @@ if rec.doESD() and not rec.readESD() and rec.doBeamBackgroundFiller(): if recAlgs.doMonteCarloReact(): protectedInclude ("MonteCarloReactTools/MonteCarloReact_for_RecExCommon.py") -# run monitoring -# ---------------------------------------------------------------------------- -# Monitoring Algorithms and Tools -# ---------------------------------------------------------------------------- - -pdr.flag_domain('monitoring') -if rec.doMonitoring(): - protectedInclude ("AthenaMonitoring/DataQualitySteering_jobOptions.py") - - - -# run"Fast Phsyics Monitoring" -if rec.doFastPhysMonitoring(): - protectedInclude("FastPhysMonExample/FastPhysicsMonitoring_jobOptions.py") # ---------------------------------------------------------------------------- @@ -981,6 +967,7 @@ if rec.doFileMetaData(): pass + ##-------------------------------------------------------- ###=== Only run reco on events that pass selected triggers ##-------------------------------------------------------- @@ -1611,6 +1598,21 @@ if rec.readAOD(): ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100 logRecExCommon_topOptions.info("AOD reading case: Set EventPrintoutInterval=100") +# run monitoring +# ---------------------------------------------------------------------------- +# Monitoring Algorithms and Tools +# ---------------------------------------------------------------------------- + +pdr.flag_domain('monitoring') +if rec.doMonitoring(): + protectedInclude ("AthenaMonitoring/DataQualitySteering_jobOptions.py") + + + +# run"Fast Phsyics Monitoring" +if rec.doFastPhysMonitoring(): + protectedInclude("FastPhysMonExample/FastPhysicsMonitoring_jobOptions.py") + ################### ## Common Utils ## diff --git a/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py b/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py index a2cb5d279c7..4f802ce165c 100644 --- a/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py +++ b/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py @@ -6,7 +6,9 @@ def TauMonitoringConfig(flags): from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator result = ComponentAccumulator() - from .tauMonitorAlgorithm import tauMonitoringConfig - result.merge(tauMonitoringConfig(flags)) + # the following should not run in RAW to ESD, if we're in two-step + if flags.DQ.Environment != 'tier0Raw': + from .tauMonitorAlgorithm import tauMonitoringConfig + result.merge(tauMonitoringConfig(flags)) return result diff --git a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py index cdc26888927..15455299d15 100644 --- a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py +++ b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py @@ -381,11 +381,11 @@ class _TileInfoConfigurator( TileInfoLoader ): dbConnStr = 'DCS_OFL' from IOVDbSvc.CondDB import conddb if useHV: - conddb.addFolder(dbConnStr, "/TILE/DCS/HV", className = 'CondAttrListCollection') + conddb.addFolder(dbConnStr, "/TILE/DCS/HV<key>/TILE/DCS/HV</key>", className = 'CondAttrListCollection') if useHVSET: - conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET", className = 'CondAttrListCollection') + conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET<key>/TILE/DCS/HVSET</key>", className = 'CondAttrListCollection') if useSTATUS: - conddb.addFolder(dbConnStr, "/TILE/DCS/STATES", className = 'CondAttrListCollection') + conddb.addFolder(dbConnStr, "/TILE/DCS/STATES<key>/TILE/DCS/STATES</key>", className = 'CondAttrListCollection') from TileConditions.TileConditionsConf import TileDCSCondAlg condSequence += TileDCSCondAlg(name = dcsCondAlg, diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py index 83b62e933e5..502cc03b192 100644 --- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py +++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py @@ -143,12 +143,7 @@ if not 'TileCommissioning' in dir(): if jobproperties.Beam.beamType != 'collisions': TileCommissioning = True else: - try: - from RecExConfig.RecFlags import rec - TileCommissioning = rec.Commissioning() - except: - msg.info("No RecFlags available - looks like a simulation job") - TileCommissioning = False + TileCommissioning = False if TileCommissioning: msg.info("Adjusting TileInfo to return cell noise for Opt.Filter with iterations") diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py index 814312213c7..d0adaf914a4 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py @@ -49,9 +49,9 @@ def trigCaloDataAccessSvcCfg( flags ): acc.merge( createLArRoI_Map( flags ) ) # Needed by bad channel maskers, refrerenced from LArCellCont. - from IOVDbSvc.IOVDbSvcConfig import addFolders - acc.merge(addFolders(flags, ['/LAR/BadChannels/BadChannels'], 'LAR')) - acc.merge(addFolders(flags, ['/LAR/BadChannels/MissingFEBs'], 'LAR')) + from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg, LArBadFebCfg + acc.merge(LArBadChannelCfg(flags)) + acc.merge(LArBadFebCfg(flags)) from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg acc.merge( TileEMScaleCondAlgCfg(flags) ) -- GitLab