Commit 7791d513 authored by Tim Martin's avatar Tim Martin
Browse files

* Switch T0 R3 monitoring to use in-file trigger mettadata config

 * Change "run3_dummy" to "none" in TrigConfigSvc
 * Remove debug and update dates
 * Remove un-needed flag for JSON name
parent 121592fa
......@@ -8,16 +8,11 @@
@brief Simple new configuration framework functions for getting a TrigDecisionTool. Probably do not work except for reading ESD and AOD. Will be superseded by proper code from Trigger.
'''
def getTrigDecisionTool(flags):
''' Setup a TrigDecisionTool. Short-cuts deduplication with memoization.'''
if getTrigDecisionTool.rv:
return getTrigDecisionTool.rv
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigTool
rv = ComponentAccumulator()
......@@ -26,22 +21,33 @@ def getTrigDecisionTool(flags):
rv.addPublicTool(ToolSvc.TrigDecisionTool)
getTrigDecisionTool.rv = rv
return getTrigDecisionTool.rv
from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigTool
cfgtool = TrigConf__xAODConfigTool('xAODConfigTool')
rv.addPublicTool(cfgtool)
from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
tdt = Trig__TrigDecisionTool('TrigDecisionTool')
tdt.ConfigTool = cfgtool
tdt.NavigationFormat = "TrigComposite"
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.
# For now, it is assumed that any Run 2 AOD will be used with the legacy monitoring
from TrigEDMConfig.TriggerEDM import EDMLibraries
tdt.Navigation.Dlls = [e for e in EDMLibraries if 'TPCnv' not in e]
# Other valid option "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.
tdt.NavigationFormat = "TrigComposite"
tdt.OutputLevel = 1
print("TIMM")
cfgtool = TrigConf__xAODConfigTool('xAODConfigTool')
cfgtool.OutputLevel = 1
# Minimal config needed to read metadata: MetaDataSvc & ProxyProviderSvc
from AthenaServices.AthenaServicesConf import MetaDataSvc
mdSvc = MetaDataSvc( "MetaDataSvc" )
mdSvc.MetaDataContainer = "MetaDataHdr"
rv.addService(mdSvc)
rv.addPublicTool(tdt)
rv.addPublicTool(cfgtool)
from SGComps.SGCompsConf import ProxyProviderSvc
pdps = ProxyProviderSvc( "ProxyProviderSvc" )
pdps.ProviderNames += [ "MetaDataSvc" ]
rv.addService(pdps)
getTrigDecisionTool.rv = rv
return rv
......
......@@ -127,6 +127,9 @@ if TriggerFlags.doMT():
from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc
svcMgr += getHLTConfigSvc()
from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvc
svcMgr += TrigConfigSvc("TrigConfigSvc")
svcMgr.TrigConfigSvc.PriorityList = ["none", "ds", "xml"]
from L1Decoder.L1DecoderConfig import L1Decoder
topSequence += L1Decoder()
......@@ -141,10 +144,6 @@ if TriggerFlags.doMT():
l1Decoder.ExtraInputs += [fakeTypeKey]
l1Decoder.ctpUnpacker.ForceEnableAllChains=False # this will make HLT respecting L1 chain decisions
# TIMM
ServiceMgr.MessageSvc.defaultLimit = 0
ServiceMgr.MessageSvc.enableSuppression = False
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=True
from TriggerJobOpts.TriggerConfig import triggerIDCCacheCreatorsCfg
......@@ -237,17 +236,14 @@ for i in outSequence.getAllChildren():
from TrigOutputHandling.TrigOutputHandlingConf import TriggerBitsMakerTool
from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMakerMT
bitsmakerTool = TriggerBitsMakerTool()
bitsmakerTool.OutputLevel = VERBOSE
tdm = TrigDecisionMakerMT('TrigDecMakerMT') # Replaces TrigDecMaker and finally deprecates Run 1 EDM
tdm.BitsMakerTool = bitsmakerTool
tdm.OutputLevel = VERBOSE # TIMM
topSequence += tdm
log.info('xTrigDecision writing enabled')
### Produce the metadata:
from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODMenuWriterMT
md = TrigConf__xAODMenuWriterMT()
md.OutputLevel = VERBOSE # TIMM
topSequence += md
log.info('TriggerMenu Metadata writing enabled')
......
......@@ -301,9 +301,10 @@ class SetupTrigConfigSvc(object):
"""
state == xml -> read the trigger configuration from 2 xml files, one for L1, one for HLT
stats == ds -> read the trigger configuration from the detector store = esd header
state == none -> service is not directly serving the run3 configuration
"""
self.states = ["xml"]
self.allowedStates = set(['xml','ds'])
self.allowedStates = set(['none','xml','ds'])
self.initialised = False
from AthenaCommon.Logging import logging
......
......@@ -27,7 +27,7 @@ ConfigSvcBase::~ConfigSvcBase()
void
ConfigSvcBase::declareCommonProperties() {
declareProperty( "ConfigSource", m_configSourceString,
"Source of trigger configuration; can be \"XML\", \"MySQL\", \"Oracle\", \"DBLookup\"");
"Source of trigger configuration; can be \"XML\", \"MySQL\", \"Oracle\", \"DBLookup\", or \"none\"");
declareProperty( "XMLMenuFile", m_xmlFile,
"XML file containing the trigger configuration.");
declareProperty( "DBServer", m_dbServer,
......
......@@ -182,7 +182,7 @@ HLTConfigSvc::initialize() {
m_inputType = "db";
m_smk = joSvc->superMasterKey();
m_dbConnection = joSvc->server();
m_configSourceString = "";
m_configSourceString = "none";
}
} else {
ATH_MSG_INFO("Did not locate TrigConf::JobOptionsSvc, not running athenaHLT");
......
......@@ -52,6 +52,18 @@ TrigConfigSvc::initialize() {
ATH_MSG_INFO(" => " << testsvc);
if ( testsvc == "none" ) {
ATH_CHECK( AAH::setProperty( m_hltSvc, "ConfigSource", testsvc ) );
if (m_hltSvc.retrieve().isSuccess()) {
m_hltservice = m_hltSvc.operator->();
ATH_MSG_WARNING("Got HLT Svc " << m_hltSvc.typeAndName() << ", will not serve configuration via this service");
hltfromxml = true;
} else {
ATH_MSG_FATAL("failed to retrieve HLT ConfigSvc: " << m_hltSvc << " with source 'none'");
return StatusCode::FAILURE;
}
}
if ( testsvc == "ds" ) {
if (m_dsSvc.retrieve().isSuccess()) {
if(m_l1service==0) m_l1service = m_dsSvc.operator->();
......
......@@ -40,7 +40,7 @@ atlas_add_library( TrigConfxAODLib
if( NOT XAOD_STANDALONE )
atlas_add_component( TrigConfxAOD
src/*.h src/*.cxx src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib GaudiKernel
LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib GaudiKernel TrigConfData
TrigConfxAODLib )
endif()
......
......@@ -65,6 +65,10 @@ namespace TrigConf {
ctpConfig.prescaleSet().setPrescale( menu->itemCtpIds()[ i ],
static_cast< float >( menu->itemPrescales()[ i ] ) );
}
if( msg.level() <= MSG::VERBOSE ) {
msg << MSG::VERBOSE << "L1 item " << menu->itemNames()[ i ]
<< " has ctpid " << menu->itemCtpIds()[ i ] << endmsg;
}
}
// Clear the current HLT configuration:
......@@ -115,8 +119,9 @@ namespace TrigConf {
*/
if( msg.level() <= MSG::VERBOSE ) {
msg << MSG::VERBOSE << "chain has " << counters.size()
<< " signatures" << endmsg;
msg << MSG::VERBOSE << "chain " << menu->chainNames()[ i ]
<< " has counter " << menu->chainIds()[ i ]
<< " and " << counters.size() << " signatures" << endmsg;
}
for( size_t sig = 0; sig < counters.size(); ++sig ) {
std::vector< HLTTriggerElement* > outTEs;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
// $Id: xAODMenuWriter.cxx 717661 2016-01-14 08:16:47Z tbold $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRIGOUTPUTHANDLING_ITRIGGERBITSMAKERTOOL_H
#define TRIGOUTPUTHANDLING_ITRIGGERBITSMAKERTOOL_H
......
......@@ -101,10 +101,6 @@ def createTriggerFlags():
flags.addFlag('Trigger.HLTMenuFile',
lambda prevFlags: 'HLTMenu_'+prevFlags.Trigger.triggerMenuSetup+'_' + prevFlags.Trigger.menuVersion + '.xml')
# HLT JSON file name (R3)
flags.addFlag('Trigger.outputHLTmenuJsonFile',
lambda prevFlags: 'HLTmenu_'+prevFlags.Trigger.triggerMenuSetup+'_' + prevFlags.Trigger.menuVersion + '.json')
# generate or not the L1 configuration
flags.addFlag('Trigger.generateL1Menu', False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment