Commit d3f53149 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-TrigConfSvcPathResolveFix' into 'master'

xml file path resolution in c++ for LVL1ConfigSvc (ATR-20864)

See merge request !30255
parents fe137019 50660cc5
...@@ -40,7 +40,7 @@ find_package( nlohmann_json ) ...@@ -40,7 +40,7 @@ find_package( nlohmann_json )
atlas_add_component( TrigConfigSvc atlas_add_component( TrigConfigSvc
src/*.cxx src/components/*.cxx src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} INCLUDE_DIRS ${COOL_INCLUDE_DIRS}
LINK_LIBRARIES AthAnalysisBaseCompsLib AthenaBaseComps TrigConfIO TrigConfData TrigConfStorage TrigConfL1Data L1TopoConfig EventInfo AthenaMonitoringLib nlohmann_json::nlohmann_json ) LINK_LIBRARIES AthAnalysisBaseCompsLib AthenaBaseComps TrigConfIO TrigConfData TrigConfStorage TrigConfL1Data L1TopoConfig EventInfo AthenaMonitoringLib PathResolver nlohmann_json::nlohmann_json )
# Install files from the package: # Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from PyUtils.Decorators import memoize from PyUtils.Decorators import memoize
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
...@@ -156,7 +156,6 @@ def getL1ConfigSvc( flags = None ): ...@@ -156,7 +156,6 @@ def getL1ConfigSvc( flags = None ):
from AthenaCommon.Logging import log from AthenaCommon.Logging import log
from TriggerJobOpts.TriggerFlags import TriggerFlags from TriggerJobOpts.TriggerFlags import TriggerFlags
from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
from TrigConfigSvc.TrigConfigSvcConfig import findFileInXMLPATH
from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import theApp
# generate menu file # generate menu file
generatedFile = generateL1Menu( flags=flags ) generatedFile = generateL1Menu( flags=flags )
...@@ -165,7 +164,12 @@ def getL1ConfigSvc( flags = None ): ...@@ -165,7 +164,12 @@ def getL1ConfigSvc( flags = None ):
l1ConfigSvc = TrigConf__LVL1ConfigSvc( "LVL1ConfigSvc" ) l1ConfigSvc = TrigConf__LVL1ConfigSvc( "LVL1ConfigSvc" )
l1ConfigSvc.ConfigSource = "XML" l1ConfigSvc.ConfigSource = "XML"
l1XMLFile = findFileInXMLPATH( TriggerFlags.inputLVL1configFile() if flags is None else flags.Trigger.LVL1ConfigFile ) l1XMLFile = TriggerFlags.inputLVL1configFile() if flags is None else flags.Trigger.LVL1ConfigFile
# check if file exists in this directory otherwise add the package to aid path resolution
# also a '/' in the file name indicates that no package needs to be added
import os.path
if not ( "/" in l1XMLFile or os.path.isfile(l1XMLFile) ):
l1XMLFile = "TriggerMenuMT/" + l1XMLFile
l1ConfigSvc.XMLMenuFile = l1XMLFile l1ConfigSvc.XMLMenuFile = l1XMLFile
log.info( "For run 2 style menu access configured LVL1ConfigSvc with input file : %s", l1XMLFile ) log.info( "For run 2 style menu access configured LVL1ConfigSvc with input file : %s", l1XMLFile )
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from TrigConfigSvc.TrigConfigSvcConf import (TrigConf__LVL1ConfigSvc, from TrigConfigSvc.TrigConfigSvcConf import (TrigConf__LVL1ConfigSvc,
TrigConf__L1TopoConfigSvc, TrigConf__L1TopoConfigSvc,
...@@ -417,32 +417,8 @@ class SetupTrigConfigSvc(object): ...@@ -417,32 +417,8 @@ class SetupTrigConfigSvc(object):
def TrigConfigSvcCfg( flags ): def TrigConfigSvcCfg( flags ):
from AthenaCommon.Logging import log from TrigConfigSvc.TrigConfigSvcCfg import TrigConfigSvcCfg
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator return TrigConfigSvcCfg( flags )
acc = ComponentAccumulator()
from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
from TrigConfigSvc.TrigConfigSvcConfig import findFileInXMLPATH
l1ConfigSvc = TrigConf__LVL1ConfigSvc( "LVL1ConfigSvc" )
l1XMLFile = findFileInXMLPATH(flags.Trigger.LVL1ConfigFile)
log.debug( "LVL1ConfigSvc input file:"+l1XMLFile )
l1ConfigSvc.XMLMenuFile = l1XMLFile
l1ConfigSvc.ConfigSource = "XML"
acc.addService( l1ConfigSvc )
from TrigConfigSvc.TrigConfigSvcConf import TrigConf__HLTConfigSvc
hltConfigSvc = TrigConf__HLTConfigSvc( "HLTConfigSvc" )
hltJsonFile = flags.Trigger.HLTMenuFile.replace(".xml",".json").replace("HLTconfig","HLTmenu")
#hltJsonFile = findFileInXMLPATH(hltJsonFile)
log.debug( "HLTConfigSvc input file:"+hltJsonFile )
hltConfigSvc.JsonFileName = hltJsonFile
acc.addService( hltConfigSvc )
return acc
if __name__ == "__main__": if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable from AthenaCommon.Configurable import Configurable
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
// class declaration // class declaration
...@@ -57,16 +57,8 @@ using namespace TrigConf; ...@@ -57,16 +57,8 @@ using namespace TrigConf;
HLTConfigSvc::HLTConfigSvc( const string& name, ISvcLocator* pSvcLocator ) : HLTConfigSvc::HLTConfigSvc( const string& name, ISvcLocator* pSvcLocator ) :
base_class(name, pSvcLocator), base_class(name, pSvcLocator),
m_eventStore(0), m_eventStore( "StoreGateSvc/StoreGateSvc", name ),
m_currentLumiblock(0), m_histProp_timePrescaleUpdate(Gaudi::Histo1DDef("Time for prescale update",0,200,100))
m_currentPSS(0),
m_setMergedHLT(true),
m_doMon(false),
m_partition(""),
m_histProp_timePrescaleUpdate(Gaudi::Histo1DDef("Time for prescale update",0,200,100)),
m_hist_timePrescaleUpdate(0),
m_hist_prescaleLB(0),
m_PartitionName("")
{ {
base_class::declareCommonProperties(); base_class::declareCommonProperties();
...@@ -293,8 +285,8 @@ HLTConfigSvc::initialize() { ...@@ -293,8 +285,8 @@ HLTConfigSvc::initialize() {
ATH_MSG_INFO("Fired Incident 'TrigConf' - " << incname); ATH_MSG_INFO("Fired Incident 'TrigConf' - " << incname);
} }
CHECK(service("StoreGateSvc", m_eventStore, /*createIf=*/false)); CHECK( m_eventStore.retrieve() );
ATH_MSG_INFO("finish initialize"); ATH_MSG_INFO("finish initialize");
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
...@@ -355,7 +347,7 @@ TrigConf::HLTConfigSvc::applyPrescaleSet(const TrigConf::HLTPrescaleSet& pss) { ...@@ -355,7 +347,7 @@ TrigConf::HLTConfigSvc::applyPrescaleSet(const TrigConf::HLTPrescaleSet& pss) {
ATH_MSG_INFO("Applying PSK " << pss.id() << " to menu "); ATH_MSG_INFO("Applying PSK " << pss.id() << " to menu ");
const EventInfo* pEvent(0); const EventInfo* pEvent(0);
if ( m_eventStore && m_eventStore->retrieve(pEvent).isSuccess() ) { if ( m_eventStore->retrieve(pEvent).isSuccess() ) {
ATH_MSG_INFO("on event " << *pEvent->event_ID()); ATH_MSG_INFO("on event " << *pEvent->event_ID());
} }
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef TrigConfigSvc_HLTConfigSvc #ifndef TrigConfigSvc_HLTConfigSvc
...@@ -81,25 +81,25 @@ namespace TrigConf { ...@@ -81,25 +81,25 @@ namespace TrigConf {
enum ConfigSource { XML, ORACLE, MYSQL, SQLITE, DBLOOKUP }; enum ConfigSource { XML, ORACLE, MYSQL, SQLITE, DBLOOKUP };
StoreGateSvc* m_eventStore; ServiceHandle<StoreGateSvc> m_eventStore;
// The configuration: // The configuration:
HLTFrame m_HLTFrame; // what for is this varaible - seems unused ??? HLTFrame m_HLTFrame; // what for is this varaible - seems unused ???
uint m_currentLumiblock; uint m_currentLumiblock { 0 };
uint m_currentPSS; uint m_currentPSS { 0 };
// Properties: // Properties:
bool m_setMergedHLT; bool m_setMergedHLT { true };
bool m_doMon; bool m_doMon { false };
std::string m_partition; std::string m_partition { "" };
Histo1DProperty m_histProp_timePrescaleUpdate; Histo1DProperty m_histProp_timePrescaleUpdate;
// Histograms: // Histograms:
TH1F* m_hist_timePrescaleUpdate; TH1F* m_hist_timePrescaleUpdate { nullptr };
TH2I* m_hist_prescaleLB; TH2I* m_hist_prescaleLB { nullptr };
StringProperty m_PartitionName; // non-empty job-property overwrite value from DataFlowConfig StringProperty m_PartitionName { "" }; // non-empty job-property overwrite value from DataFlowConfig
}; };
} }
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
#include "./LVL1ConfigSvc.h" #include "./LVL1ConfigSvc.h"
...@@ -38,141 +38,163 @@ ...@@ -38,141 +38,163 @@
#include "TrigConfL1Data/JetThresholdValue.h" #include "TrigConfL1Data/JetThresholdValue.h"
#include "TrigConfL1Data/L1DataDef.h" #include "TrigConfL1Data/L1DataDef.h"
#include "TrigConfBase/TrigDBConnectionConfig.h"
#include "TrigConfInterfaces/IJobOptionsSvc.h" #include "TrigConfInterfaces/IJobOptionsSvc.h"
#include "boost/algorithm/string/case_conv.hpp" #include "boost/algorithm/string.hpp"
// STL includes: // STL includes:
#include <exception> #include <exception>
#include <vector> #include <vector>
using namespace std; using namespace std;
using namespace TrigConf;
LVL1ConfigSvc::LVL1ConfigSvc( const std::string& name, ISvcLocator* pSvcLocator ) :
base_class( name, pSvcLocator ),
m_detectorStore(0),
m_ctpConfig(0),
m_thrcfg(0),
m_muctpi(0),
m_prescaleSetID(0),
m_bunchgroupSetID(0),
m_dumpTTVmap(false)
{
TrigConf::LVL1ConfigSvc::LVL1ConfigSvc( const std::string& name, ISvcLocator* pSvcLocator ) :
base_class( name, pSvcLocator )
{
base_class::declareCommonProperties(); base_class::declareCommonProperties();
declareProperty( "DBLVL1PSKey", m_prescaleSetID, "L1 Prescale key");
declareProperty( "DBBGSKey", m_bunchgroupSetID, "L1 Bunchgroup key");
declareProperty( "DumpTTVmap", m_dumpTTVmap, "Dump threshold vector");
} }
LVL1ConfigSvc::~LVL1ConfigSvc() TrigConf::LVL1ConfigSvc::~LVL1ConfigSvc()
{} {}
const TrigConf::ThresholdConfig*
TrigConf::LVL1ConfigSvc::thresholdConfig() const { return m_ctpConfig ? &m_ctpConfig->menu().thresholdConfig() : nullptr; }
StatusCode StatusCode
LVL1ConfigSvc::writeConfigToDetectorStore() { TrigConf::LVL1ConfigSvc::initializeRun3StyleMenu() {
m_inputType = boost::to_lower_copy(m_inputType.value()); // lower case
if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) {
if( joSvc->superMasterKey()>0 ) {
ATH_MSG_INFO("Taking new style menu from db with setting from TrigConf::JobOptionsSvc");
m_inputType = "db";
m_smk = joSvc->superMasterKey();
m_dbConnection = joSvc->server();
}
}
ATH_MSG_INFO("Run 3 style menu configuration");
ATH_MSG_INFO(" Run 3 input type = " << m_inputType.value());
if( m_inputType == "file" ) {
ATH_MSG_INFO(" Run 3 input file = " << m_l1FileName.value());
} else if ( m_inputType == "db" ) {
ATH_MSG_INFO(" Run 3 DB connection = " << m_dbConnection);
ATH_MSG_INFO(" Run 3 SMK = " << m_smk);
}
if( ! loadRun3StyleMenu().isSuccess() ) {
ATH_MSG_INFO( "The previous WARNING message is being ignored in the current transition phase. Once we rely entirely on the new menu providing mechanism, this will become a reason to abort.");
}
return StatusCode::SUCCESS;
}
StatusCode
TrigConf::LVL1ConfigSvc::loadRun3StyleMenu() {
// do not write empty menu to storegate, so people can check on handlekey being valid // do not write empty menu to storegate, so people can check on handlekey being valid
if( m_inputType == "none" ) { if( m_inputType == "none" ) {
ATH_MSG_INFO( "No L1 menu recorded in the detector store" ); ATH_MSG_INFO( "No L1 menu recorded in the detector store" );
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
TrigConf::L1Menu * l1menu = new TrigConf::L1Menu(); TrigConf::L1Menu * l1menu = new TrigConf::L1Menu();
if( m_inputType == "db" ) { if( m_inputType == "db" ) {
// db menu loader // db menu loader
TrigConf::TrigDBMenuLoader dbloader(m_dbConnection); TrigConf::TrigDBMenuLoader dbloader(m_dbConnection);
dbloader.setLevel(TrigConf::MSGTC::WARNING); dbloader.setLevel(TrigConf::MSGTC::WARNING);
if( dbloader.loadL1Menu( m_smk, *l1menu ) ) { if( dbloader.loadL1Menu( m_smk, *l1menu ) ) {
ATH_MSG_INFO( "Loaded L1 menu from DB " << m_dbConnection << " for SMK " << m_smk.value() ); ATH_MSG_INFO( "Loaded L1 menu from DB " << m_dbConnection << " for SMK " << m_smk.value() );
} else { } else {
ATH_MSG_WARNING( "Failed loading L1 menu from DB for SMK " << m_smk.value()); ATH_MSG_WARNING( "Failed loading L1 menu from DB for SMK " << m_smk.value());
return StatusCode::RECOVERABLE; return StatusCode::RECOVERABLE;
} }
} else if ( m_inputType == "file" ) { } else if ( m_inputType == "file" ) {
// json file menu loader // json file menu loader
TrigConf::JsonFileLoader fileLoader; TrigConf::JsonFileLoader fileLoader;
fileLoader.setLevel(TrigConf::MSGTC::WARNING); fileLoader.setLevel(TrigConf::MSGTC::WARNING);
if( fileLoader.loadFile( m_l1FileName, *l1menu ) ) { if( fileLoader.loadFile( m_l1FileName, *l1menu ) ) {
ATH_MSG_INFO( "Loaded L1 menu file " << m_l1FileName.value() ); ATH_MSG_INFO( "Loaded L1 menu file " << m_l1FileName.value() );
} else { } else {
ATH_MSG_WARNING( "Failed loading L1 menu file " << m_l1FileName.value()); ATH_MSG_WARNING( "Failed loading L1 menu file " << m_l1FileName.value());
return StatusCode::RECOVERABLE; return StatusCode::RECOVERABLE;
} }
} else if( m_inputType == "cool" ) { } else if( m_inputType == "cool" ) {
ATH_MSG_FATAL( "Loading of L1 menu from COOL + DB not implemented"); ATH_MSG_FATAL( "Loading of L1 menu from COOL + DB not implemented");
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
// auto writeHandle = SG::makeHandle(m_l1MenuKey); // auto writeHandle = SG::makeHandle(m_l1MenuKey);
// ATH_MSG_INFO("Recording L1 menu with " << m_l1MenuKey); // ATH_MSG_INFO("Recording L1 menu with " << m_l1MenuKey);
// ATH_CHECK( writeHandle.record( std::unique_ptr<TrigConf::L1Menu>(l1menu) )); // ATH_CHECK( writeHandle.record( std::unique_ptr<TrigConf::L1Menu>(l1menu) ));
ServiceHandle<StoreGateSvc> detStore( "StoreGateSvc/DetectorStore", name() ); ServiceHandle<StoreGateSvc> detStore( "StoreGateSvc/DetectorStore", name() );
ATH_CHECK( detStore.retrieve() ); ATH_CHECK( detStore.retrieve() );
if( detStore->record(l1menu,"L1TriggerMenu").isSuccess() ) { if( detStore->record(l1menu,"L1TriggerMenu").isSuccess() ) {
ATH_MSG_INFO( "Recorded L1 menu with key 'L1TriggerMenu' in the detector store" ); ATH_MSG_INFO( "Recorded L1 menu with key 'L1TriggerMenu' in the detector store" );
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode StatusCode
LVL1ConfigSvc::initialize() { TrigConf::LVL1ConfigSvc::initializeRun2StyleMenu() {
/// Handle to JobOptionsSvc used to retrieve the DataFlowConfig property m_configSourceString = boost::to_lower_copy(m_configSourceString); // lower case
// ATH_CHECK( m_l1MenuKey.initialize() ); if ( m_configSourceString == "none" ) {
ATH_MSG_INFO("Run 2 style menu has been disabled");
if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) { m_xmlFile = "";
if( joSvc->superMasterKey()>0 ) { } else if( m_configSourceString == "xml") {
m_inputType = "db"; if( boost::algorithm::ends_with(m_xmlFile, ".xml") && ! boost::algorithm::starts_with(m_xmlFile, "./") ) {
m_smk = joSvc->superMasterKey(); m_xmlFile = PathResolver::find_file( m_xmlFile, "XMLPATH" );
m_dbConnection = joSvc->server();
m_configSourceString = "NONE";
} }
} else { } else {
ATH_MSG_INFO("Did not locate TrigConf::JobOptionsSvc, not running athenaHLT"); TrigDBConnectionConfig::DBType dbtype(TrigDBConnectionConfig::DBLookup);
if (m_configSourceString == "oracle") { dbtype = TrigDBConnectionConfig::Oracle; }
else if (m_configSourceString == "mysql") { dbtype = TrigDBConnectionConfig::MySQL; }
else if (m_configSourceString == "sqlite") { dbtype = TrigDBConnectionConfig::SQLite; }
if(m_dbHLTPSKey) {
m_dbconfig = std::make_unique<TrigDBConnectionConfig>( dbtype, m_dbServer, m_dbSMKey, m_dbHLTPSKey );
} else {
m_dbconfig = std::make_unique<TrigDBConnectionConfig>( dbtype, m_dbServer, m_dbSMKey, m_dbHLTPSKeySet );
}
m_dbconfig->m_useFrontier = m_useFrontier;
} }
StatusCode sc = writeConfigToDetectorStore(); ATH_MSG_INFO("Run 2 style menu");
if( !sc.isSuccess() ) { ATH_MSG_INFO(" Run 2 config source = " << m_configSourceString);
ATH_MSG_INFO( "This previous WARNING message is being ignored in the current transition phase. Once we rely entirely on the new menu providing mechanism, this will become a reason to abort."); if( m_configSourceString != "none" ) {
if( m_configSourceString == "xml" ) {
ATH_MSG_INFO(" Run 2 Input file = " << m_xmlFile);
} else {
ATH_MSG_INFO(" Run 2 DB Server = " << m_dbServer);
ATH_MSG_INFO(" Run 2 DB User = " << m_dbUser);
ATH_MSG_INFO(" Run 2 DB Table = " << m_dbTable);
ATH_MSG_INFO(" Run 2 DB connection = " << m_dbconfig->toString());
ATH_MSG_INFO(" Run 2 SMK = " << m_dbSMKey);
ATH_MSG_INFO(" Run 2 L1 PSK = " << m_prescaleSetID);
ATH_MSG_INFO(" Run 2 BGSK = " << m_bunchgroupSetID);
ATH_MSG_INFO(" UseFrontier = " << m_useFrontier.value());
}
} }
CHECK(ConfigSvcBase::initialize()); if( m_dbconfig==nullptr && m_xmlFile=="NONE" ) {
// could be that this is needed when running from DB
CHECK(setProperties());
if( !fromDB() and m_xmlFile=="NONE" ) {
ATH_MSG_INFO("xml file set to NONE, will not load LVL1 Menu"); ATH_MSG_INFO("xml file set to NONE, will not load LVL1 Menu");
return StatusCode::SUCCESS; } else {
CHECK( loadRun2StyleMenu() );
} }
return StatusCode::SUCCESS;
}
if( fromDB() ) {
ATH_MSG_INFO(" DB LVL1 PrescaleKey = " << m_prescaleSetID);
ATH_MSG_INFO(" DB BunchGroupSetKey = " << m_bunchgroupSetID);
}
/**
* Loading Run-2-style menu
*/
StatusCode
TrigConf::LVL1ConfigSvc::loadRun2StyleMenu() {
CHECK( initStorageMgr() ); CHECK( initStorageMgr() );
try { try {
// m_storageMgr->setLevel(MSGTC::DEBUG); // TODO check if this is propagated to the loader
// m_storageMgr->masterTableLoader().setLevel(MSGTC::DEBUG);
m_ctpConfig = new CTPConfig(); m_ctpConfig = new CTPConfig();
m_ctpConfig->setSMK( m_dbSMKey ); m_ctpConfig->setSMK( m_dbSMKey );
m_ctpConfig->setPrescaleSetId( m_prescaleSetID ); m_ctpConfig->setPrescaleSetId( m_prescaleSetID );
...@@ -183,37 +205,25 @@ LVL1ConfigSvc::initialize() { ...@@ -183,37 +205,25 @@ LVL1ConfigSvc::initialize() {
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
ATH_MSG_VERBOSE("CTPConfig object loaded"); ATH_MSG_VERBOSE("CTPConfig object loaded");
m_thrcfg = &m_ctpConfig->menu().thresholdConfig();
m_muctpi = new Muctpi(); m_muctpi = new Muctpi();
m_muctpi->setSMK( m_dbSMKey ); m_muctpi->setSMK( m_dbSMKey );
//m_muctpi->setLvl1MasterTableId( 0 );
m_storageMgr->masterTableLoader().load( *m_muctpi ); m_storageMgr->masterTableLoader().load( *m_muctpi );
ATH_MSG_VERBOSE("MuCTPI configuration object loaded"); ATH_MSG_VERBOSE("MuCTPI configuration object loaded");
} catch ( std::exception & e ) { } catch ( std::exception & e ) {
CHECK(freeStorageMgr()); CHECK(freeStorageMgr());
ATH_MSG_ERROR("Standard C++ exception caught: " << e.what()); ATH_MSG_ERROR("Standard C++ exception caught: " << e.what());
return StatusCode::FAILURE; return StatusCode::FAILURE;
} catch ( ... ) { } catch ( ... ) {
CHECK(freeStorageMgr()); CHECK(freeStorageMgr());
ATH_MSG_ERROR("Unknown exception caught."); ATH_MSG_ERROR("Unknown exception caught.");
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
CHECK(freeStorageMgr()); CHECK(freeStorageMgr());
/**
// * Check if we have a valid trigger menu:
// Check if we have a valid trigger menu: */
//
if( Verifyer::verify( m_ctpConfig->menu(), msg() ) ) { if( Verifyer::verify( m_ctpConfig->menu(), msg() ) ) {
ATH_MSG_ERROR("Loaded trigger menu fails verification"); ATH_MSG_ERROR("Loaded trigger menu fails verification");
return StatusCode::FAILURE; return StatusCode::FAILURE;
...@@ -221,23 +231,29 @@ LVL1ConfigSvc::initialize() { ...@@ -221,23 +231,29 @@ LVL1ConfigSvc::initialize() {
ATH_MSG_DEBUG("Loaded trigger menu passed verification"); ATH_MSG_DEBUG("Loaded trigger menu passed verification");
} }
ATH_MSG_DEBUG("Dumping LVL1 configuration"); return StatusCode::SUCCESS;
}
if (msgSvc()->outputLevel(name()) <= MSG::INFO) {
m_ctpConfig->print(" ", m_printMenuLevel);
}
// Dump threshold value map StatusCode
if (m_dumpTTVmap) { TrigConf::LVL1ConfigSvc::initialize() {