Commit 50e8230a authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (TrigROBDataProviderSvc-00-01-11)

	* TrigROBDataProviderSvc_RTT.cxx: coverity fix
	* Tagging TrigROBDataProviderSvc-00-01-11

2016-03-09  Stewart Martin-Haugh  <smh@cern.ch>
	* src/TrigROBDataProviderSvc.cxx:
	* Clang stringstream fix
	* Tagging TrigROBDataProviderSvc-00-01-10
parent a803da1c
################################################################################
# Package: TrigROBDataProviderSvc
################################################################################
# Declare the package name:
atlas_subdir( TrigROBDataProviderSvc )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Event/ByteStreamData
GaudiKernel
PRIVATE
Control/CxxUtils
Control/StoreGate
Event/ByteStreamCnvSvcBase
Trigger/TrigDataAccess/TrigDataAccessMonitoring
Trigger/TrigMonitoring/TrigMonitorBase )
# External dependencies:
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( tdaq-common )
# Component(s) in the package:
atlas_add_library( TrigROBDataProviderSvcLib
src/*.cxx
PUBLIC_HEADERS TrigROBDataProviderSvc
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData GaudiKernel ByteStreamData_test StoreGateLib SGtests ByteStreamCnvSvcBaseLib TrigDataAccessMonitoringLib TrigMonitorBaseLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils )
atlas_add_component( TrigROBDataProviderSvc
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel CxxUtils StoreGateLib SGtests ByteStreamCnvSvcBaseLib TrigDataAccessMonitoringLib TrigMonitorBaseLib TrigROBDataProviderSvcLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
atlas_install_scripts( python/scripts/*.py )
......@@ -23,18 +23,10 @@
#include "GaudiKernel/IAlgContextSvc.h"
#include "GaudiKernel/IAlgorithm.h"
#include "StoreGate/StoreGateSvc.h"
#include "CxxUtils/excepts.h"
#include <iostream>
#ifndef HAVE_NEW_IOSTREAMS
#include <strstream> /*gnu-specific*/
typedef strstream __sstream;
#else
#include <sstream>
typedef std::ostringstream __sstream;
#endif
#include <iomanip>
#include <cassert>
#include <bitset>
......@@ -666,7 +658,7 @@ void TrigROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, con
}
}
if(logLevel() <= MSG::DEBUG) {
__sstream ost;
std::ostringstream ost;
ost << " Number of scheduled ROB Ids = " << m_Det_Robs_for_retrieval.size() << "\n" ;
unsigned int rob_counter = 1;
for (std::map<uint32_t,int>::const_iterator map_it=m_Det_Robs_for_retrieval.begin(); map_it!=m_Det_Robs_for_retrieval.end(); ++map_it,++rob_counter){
......@@ -679,10 +671,6 @@ void TrigROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, con
<< " Lvl1 id = " << m_currentLvl1ID << "\n"
<< ost.str()
<< endreq;
#ifndef HAVE_NEW_IOSTREAMS
ost.freeze(false);
#endif
}
} // end if (!m_useROSmappingForROBRetrieval.value())
}
......@@ -1073,7 +1061,7 @@ std::string TrigROBDataProviderSvc::dumpROBcache() const {
ONLINE_ROBMAP::const_iterator cache_end = m_online_robmap.end() ;
int nrob = 0;
__sstream ost;
std::ostringstream ost;
ost << " --- Dump of ROB cache ids --- total size = "
<< m_online_robmap.size() <<"\n";
for(; cache_it!=cache_end; ++cache_it){
......@@ -1083,9 +1071,6 @@ std::string TrigROBDataProviderSvc::dumpROBcache() const {
<< std::dec << " decimal: source id = " << (*cache_it).second.source_id() << "\n";
}
std::string ret(ost.str());
#ifndef HAVE_NEW_IOSTREAMS
ost.freeze(false);
#endif
return ret;
}
......@@ -1195,14 +1180,11 @@ int TrigROBDataProviderSvc::collectCompleteEventData(const std::string callerNam
<< endreq;
}
if (logLevel() <= MSG::VERBOSE) {
__sstream ost;
std::ostringstream ost;
unsigned int rob_counter = 1;
for (std::vector<uint32_t>::const_iterator rob_it = retrievedRobIds.begin(); rob_it != retrievedRobIds.end(); ++rob_it,++rob_counter)
ost << " # = "<< std::setw(5) << rob_counter << " ROB id = 0x" << std::hex << *rob_it << std::dec << "\n" ;
logStream() << MSG::VERBOSE << "\n" << ost.str() << endreq;
#ifndef HAVE_NEW_IOSTREAMS
ost.freeze(false);
#endif
}
// update event complete flag
......@@ -1476,7 +1458,7 @@ void TrigROBDataProviderSvc::addROBDataToCache(std::vector<uint32_t>& robIdsForR
}
if(logLevel() <= MSG::DEBUG) {
__sstream ost;
std::ostringstream ost;
unsigned int rob_counter = 1;
for (std::vector<uint32_t>::const_iterator rob_it=retrievedRobIds.begin(); rob_it!=retrievedRobIds.end(); ++rob_it,++rob_counter)
ost << " # = "<< std::setw(5) << rob_counter << " ROB id = 0x" << std::hex << (*rob_it) << std::dec << "\n" ;
......@@ -1488,9 +1470,6 @@ void TrigROBDataProviderSvc::addROBDataToCache(std::vector<uint32_t>& robIdsForR
<< " Number of actually received ROB Ids = " << retrievedRobIds.size() << "\n"
<< ost.str()
<< endreq;
#ifndef HAVE_NEW_IOSTREAMS
ost.freeze(false);
#endif
}
if ( m_doMonitoring || p_robMonStruct ) {
......
......@@ -355,14 +355,14 @@ void TrigROBDataProviderSvc_RTT::getROBData(const std::vector<uint32_t>& robIds,
if (!found_pref) {
// search if another algorithm has predeclared it:
CALLER_ROBMAP::const_iterator callit;
std::vector <uint32_t> robIds;
std::vector <uint32_t> robIds_pre;
std::string prefetching_caller="";
for (callit= m_caller_robmap.begin(); callit!= m_caller_robmap.end(); ++callit){
prefetching_caller = (*callit).first;
if (prefetching_caller.find("_pref") == std::string::npos) continue;// only prefetching algo
// if (m_callerName == prefetching_caller) continue;//not needed
robIds = (*callit).second;
if (std::find(robIds.begin(), robIds.end(), (*it))!=robIds.end()) {
robIds_pre = (*callit).second;
if (std::find(robIds_pre.begin(), robIds_pre.end(), (*it))!=robIds_pre.end()) {
found_another_pref=true;
break;
}
......
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