Commit 6986148c authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh Committed by Graeme Stewart
Browse files

'Fix tdaq-common dependency' (TrigInterfaces-01-02-06)

	* Fix tdaq-common dependency
	* remove some eformat includes
	* Tagging TrigInterfaces-01-02-06

2016-08-02  scott snyder  <snyder@bnl.gov>

	* Tagging TrigInterfaces-01-02-05.
	* endreq -> endmsg.

2016-06-23 Stewart Martin-Haugh <smh@cern.ch>
	* CPU improvements for OPI data (see ATR-14370)
	* Tagging TrigInterfaces-01-02-04
parent fba9b145
......@@ -23,7 +23,7 @@ atlas_depends_on_subdirs( PUBLIC
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( tdaq-common )
find_package( tdaq-common COMPONENTS eformat )
# Component(s) in the package:
atlas_add_library( TrigInterfacesLib
......
......@@ -745,13 +745,13 @@ namespace HLT
const std::string& label,
HLT::Navigation::MemoryManagement mm) {
if (!feature) {
msg() << MSG::FATAL << "Cannot attach null feature!" << endreq;
msg() << MSG::FATAL << "Cannot attach null feature!" << endmsg;
return HLT::FATAL;
}
if (!m_config || !m_config->getNavigation() ||
!m_config->getNavigation()->attachFeature(te, feature, mm, key, label)) {
msg() << MSG::ERROR << "Failed to attach feature!" << endreq;
msg() << MSG::ERROR << "Failed to attach feature!" << endmsg;
return HLT::NAV_ERROR;
}
......
......@@ -113,7 +113,7 @@ StatusCode Algo::initialize()
else {
ATH_MSG_WARNING( "ErrorCode " << in << " already in map - not adding");
}
mitr++;
++mitr;
}
m_ecMapSize = m_ecMap.size();
......@@ -488,13 +488,13 @@ void Algo::addSteeringOperationalInfo(bool wasRun, unsigned int /*ntes*/, Trigge
unsigned int icall = 0;
// Don't want to use "defined" any more as we no longer have map behavior here.
const std::vector<std::string> keys = steer_opi->getKeys();
const std::vector<float> values = steer_opi->getValues();
const std::vector<std::string>& keys = steer_opi->getKeys();
const std::vector<float>& values = steer_opi->getValues();
// Find any previous "call", reverse-iterate until we come upon a "CHAIN" at which point we must stop
for (unsigned int pos = keys.size() - 1; pos > 0; --pos) {
if (keys.at(pos) == callkey) {
icall = static_cast<unsigned int>(values.at(pos)) + 1; // Increment value
if (keys[pos] == callkey) {
icall = floor(values[pos]) + 1; // Increment value
steer_opi->updateAtLocation( pos, static_cast<float>(icall) );
break;
} else if (keys.at(pos).compare(0, 3, "SEQ") == 0) {
......@@ -514,13 +514,12 @@ void Algo::addSteeringOperationalInfo(bool wasRun, unsigned int /*ntes*/, Trigge
}
// now create unique prefix
std::stringstream callstr;
callstr << prefix << ":" << icall;
prefix = callstr.str();
prefix = prefix + ":" + std::to_string(icall);
// Iterate over ROI TEs and collect ROI words
if(te && m_config->getNavigation()) {
const std::vector<TriggerElement*> &roi_vec = Navigation::getRoINodes(te);
std::string roi_istr_pref = prefix + ":RoiId:";
for(unsigned int i = 0; i < roi_vec.size(); ++i) {
TriggerElement *roiTE = roi_vec[i];
if(!roiTE) continue;
......@@ -529,15 +528,14 @@ void Algo::addSteeringOperationalInfo(bool wasRun, unsigned int /*ntes*/, Trigge
const TrigRoiDescriptor *roi_des = 0;
m_config -> getNavigation() -> getFeature<TrigRoiDescriptor>(roiTE, roi_des);
std::stringstream roi_istr;
roi_istr << prefix+":RoiId:" << i;
std::string roi_istr = roi_istr_pref + std::to_string(i);
if(roi_des) {
// RoI node has RoI descriptor - save RoiId
steer_opi -> set(roi_istr.str(), static_cast<float>(roi_des->roiId()));
// RoI node has RoI descriptor - save RoiId
steer_opi -> set(roi_istr, static_cast<float>(roi_des->roiId()));
} else {
// RoI node is either Energy or JetEt: assume there are less than 255 rois!
steer_opi -> set(roi_istr.str(), 255.0);
// RoI node is either Energy or JetEt: assume there are less than 255 rois!
steer_opi -> set(roi_istr, 255.0);
}
}
}
......
......@@ -11,7 +11,7 @@
#include "TrigTimeAlgs/TrigTimer.h"
#include "GaudiKernel/GaudiException.h"
#include "eformat/Issue.h"
using namespace HLT;
......
......@@ -12,7 +12,6 @@
#include "TrigNavigation/TriggerElement.h"
#include "GaudiKernel/GaudiException.h"
#include "eformat/Issue.h"
using namespace HLT;
......
......@@ -22,24 +22,24 @@ ErrorCode HLT::trigExceptionHandler(MsgStream* log)
throw;
}
catch (GaudiException& ex) {
if (log) *log << MSG::WARNING << "Caught GAUDI exception: " << ex.what() << endreq;
if (log) *log << MSG::WARNING << "Caught GAUDI exception: " << ex.what() << endmsg;
return GAUDI_EXCEPTION;
}
catch (eformat::Issue& ex) {
if (log) *log << MSG::WARNING << "Caught eformat issue (data access error): " << ex.what()
<< "in: " << ex.context().file_name() << "line: " << ex.context().line_number() << endreq;
<< "in: " << ex.context().file_name() << "line: " << ex.context().line_number() << endmsg;
return EFORMAT_EXCEPTION;
}
catch (std::bad_alloc& ex) {
if (log) *log << MSG::ERROR << "Memory allocation issue caught: " << ex.what() << endreq;
if (log) *log << MSG::ERROR << "Memory allocation issue caught: " << ex.what() << endmsg;
throw; // this is serious, re-throwing
}
catch (std::exception& ex) {
if (log) *log << MSG::ERROR << "std::exception caught: " << ex.what() << endreq;
if (log) *log << MSG::ERROR << "std::exception caught: " << ex.what() << endmsg;
return STD_EXCEPTION;
}
catch (...) {
if (log) *log << MSG::ERROR << "Unknown exception caught" << endreq;
if (log) *log << MSG::ERROR << "Unknown exception caught" << endmsg;
return UNKNOWN_EXCEPTION;
}
}
......@@ -10,7 +10,6 @@
#include "TrigNavigation/Navigation.h"
#include "GaudiKernel/GaudiException.h"
#include "eformat/Issue.h"
using namespace HLT;
......
......@@ -10,7 +10,6 @@
#include "TrigNavigation/TriggerElement.h"
#include "GaudiKernel/GaudiException.h"
#include "eformat/Issue.h"
#include "TrigTimeAlgs/TrigTimerSvc.h"
......
......@@ -12,7 +12,6 @@
#include "TrigTimeAlgs/TrigTimerSvc.h"
#include "GaudiKernel/GaudiException.h"
#include "eformat/Issue.h"
using namespace HLT;
......
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