Commit 912f166a authored by Joerg Stelzer's avatar Joerg Stelzer Committed by Graeme Stewart
Browse files

DSConfigSvc: Fix L1Prescale reading from COOL (TrigConfigSvc-01-01-55)

	* DSConfigSvc: Fix L1Prescale reading from COOL
	* TrigConfigSvc-01-01-54/5

2015-07-28 Ricardo Abreu  <ricardo.abreu@cern.ch>
	* Fix HLT PS list configuration for HLTConfigSvc (ATR-11877)
	* TrigConfigSvc-01-01-53

2015-07-15 Ricardo Abreu  <ricardo.abreu@cern.ch>
	* Properly signal failures caused by wrong PS Keys (for ATR-10120)
	* TrigConfigSvc-01-01-52
parent 72f99250
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: DSConfigSvc.cxx 677827 2015-06-24 07:52:56Z stelzer $
// $Id: DSConfigSvc.cxx 692062 2015-08-29 21:31:16Z stelzer $
#include "GaudiKernel/IIncidentSvc.h"
#include "GaudiKernel/Incident.h"
......@@ -479,6 +479,7 @@ TrigConf::DSConfigSvc::update( IOVSVC_CALLBACK_ARGS_K( keys ) ) {
ATH_MSG_INFO( "Updating trigger configuration: LVL1 prescales" );
CondAttrListCollection::size_type nCh = lvl1PsAtrColl->size();
bool isRun2 = ( nCh == 512 );
ATH_MSG_INFO( " Number of prescales: " << nCh );
......@@ -499,13 +500,19 @@ TrigConf::DSConfigSvc::update( IOVSVC_CALLBACK_ARGS_K( keys ) ) {
// single prescale, the channel id is the ctpid)
CondAttrListCollection::AttributeList atrList =
lvl1PsAtrColl->chanAttrListPair( ch )->second;
readLvl1Prescale( atrList, ps );
pss.setPrescale( ch, ps );
if( isRun2 ) {
pss.setCut( ch, ps );
} else {
pss.setPrescale( ch, ps );
}
}
if( msgLvl( MSG::DEBUG ) ) {
pss.print();
pss.print("",5);
}
m_ctpConfig.setPrescaleSet( pss ); // overwrites the old one
......
......@@ -55,13 +55,16 @@ TrigConf::HLTJobOptionsSvc::sysInitialize() {
// (which is problematic for modifying the HLTJobOptionsSvc)
StatusCode sc = base_class::sysInitialize();
// set the message level from the DB
vector<const Property*>* ownProperties;
m_catalogue.optionsOf( name(), ownProperties);
for(const Property * p : *ownProperties) {
if(p->name() != "OutputLevel") continue;
this->setProperty( "OutputLevel", *p );
break;
if(sc.isSuccess())
{
// set the message level from the DB
vector<const Property*>* ownProperties;
m_catalogue.optionsOf( name(), ownProperties);
for(const Property * p : *ownProperties) {
if(p->name() != "OutputLevel") continue;
this->setProperty( "OutputLevel", *p );
break;
}
}
return sc;
}
......@@ -338,7 +341,6 @@ TrigConf::HLTJobOptionsSvc::setMyProperties( const std::string& client, IPropert
}
bool fail = false;
// this is for the case of old configurations
......@@ -363,6 +365,10 @@ TrigConf::HLTJobOptionsSvc::setMyProperties( const std::string& client, IPropert
if(client=="ApplicationMgr" && dbprop->name()=="Go") continue;
if(client=="ApplicationMgr" && dbprop->name()=="Exit") continue;
if (dbprop->name()=="DBHLTPSKeySet")
continue; /* special case of property that is wrongly interpreted an
empty array property (ATR-11877) */
sc = StatusCode::FAILURE;
const StringProperty* sp = dynamic_cast<const StringProperty*>(dbprop);
......@@ -382,7 +388,7 @@ TrigConf::HLTJobOptionsSvc::setMyProperties( const std::string& client, IPropert
if (dbprop->name()=="DBTable") spval = m_dbconfig->m_schema;
if (dbprop->name()=="DBSMKey") spval = lexical_cast<string,int>(m_dbconfig->m_smkey);
if (dbprop->name()=="DBHLTPSKey") spval = lexical_cast<string,int>(m_dbconfig->m_hltkey);
if (dbprop->name()=="DBHLTPSKeySet") spval = m_dbconfig->hltKeysToString();
}
if(m_dbconfig->m_lvl1key && client=="LVL1ConfigSvc") {
......@@ -442,7 +448,6 @@ TrigConf::HLTJobOptionsSvc::setMyProperties( const std::string& client, IPropert
fail = true;
}
ATH_MSG_DEBUG("Finished setting properties for " << client);
return fail? StatusCode::FAILURE : StatusCode::SUCCESS;
......
......@@ -97,7 +97,11 @@ LVL1ConfigSvc::initialize() {
m_ctpConfig->setSMK( m_dbSMKey );
m_ctpConfig->setPrescaleSetId( m_prescaleSetID );
m_ctpConfig->setBunchGroupSetId( m_bunchgroupSetID );
m_storageMgr->masterTableLoader().load( *m_ctpConfig );
if(!m_storageMgr->masterTableLoader().load( *m_ctpConfig ))
{
ATH_MSG_ERROR("Could not load CTPConfig object");
return StatusCode::FAILURE;
}
ATH_MSG_VERBOSE("CTPConfig object loaded");
m_thrcfg = &m_ctpConfig->menu().thresholdConfig();
......
......@@ -55,7 +55,8 @@ TrigConfigSvc::initialize() {
if(m_l1service==0) m_l1service = m_dsSvc.operator->();
if(m_hltservice==0) m_hltservice = m_dsSvc.operator->();
} else {
ATH_MSG_WARNING("failed to retrieve DetStore TrigConfigSvc: " << m_dsSvc);
ATH_MSG_FATAL("failed to retrieve DetStore TrigConfigSvc: " << m_dsSvc);
return StatusCode::FAILURE;
}
}
......@@ -63,7 +64,8 @@ TrigConfigSvc::initialize() {
if (m_l1topoSvc.retrieve().isSuccess()) {
m_l1toposervice = m_l1topoSvc.operator->();
} else {
ATH_MSG_WARNING("failed to retrieve L1TopoConfigSvc: " << m_l1topoSvc);
ATH_MSG_FATAL("failed to retrieve L1TopoConfigSvc: " << m_l1topoSvc);
return StatusCode::FAILURE;
}
}
......@@ -72,17 +74,19 @@ TrigConfigSvc::initialize() {
m_l1service = m_lvl1Svc.operator->();
l1fromxml = true;
} else {
ATH_MSG_WARNING("failed to retrieve LVL1 ConfigSvc: " << m_lvl1Svc);
ATH_MSG_FATAL("failed to retrieve LVL1 ConfigSvc: " << m_lvl1Svc);
return StatusCode::FAILURE;
}
}
if ( m_hltservice == 0 && (svc == "xmlhlt" || svc == "xml") ) {
if ( m_hltservice == 0 && (testsvc == "xmlhlt" || testsvc == "xml") ) {
if (m_hltSvc.retrieve().isSuccess()) {
m_hltservice = m_hltSvc.operator->();
hltfromxml = true;
} else {
ATH_MSG_WARNING("failed to retrieve HLT ConfigSvc: " << m_hltSvc);
ATH_MSG_FATAL("failed to retrieve HLT ConfigSvc: " << m_hltSvc);
return StatusCode::FAILURE;
}
}
......
Supports Markdown
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