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

'CMakeLists.txt' (MdtCalibUtils-00-05-17)

	* addressing coverity defect 12711
	* fixing dbg compiler warning
	* tagging MdtCalibUtils-00-05-17
parent f66222c4
################################################################################
# Package: MdtCalibUtils
################################################################################
# Declare the package name:
atlas_subdir( MdtCalibUtils )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData
MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibInterfaces
MuonSpectrometer/MuonCalib/MuonCalibEvent
MuonSpectrometer/MuonCalib/MuonCalibEventBase
MuonSpectrometer/MuonCalib/MuonCalibIdentifier
PRIVATE
MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibStl )
# Component(s) in the package:
atlas_add_library( MdtCalibUtils
src/*.cxx
PUBLIC_HEADERS MdtCalibUtils
LINK_LIBRARIES MdtCalibData MuonCalibEvent MuonCalibEventBase MuonCalibIdentifier )
......@@ -13,7 +13,7 @@ double GlobalTimeFitter::GTFit( MuonCalibSegment * seg ) {
double timeShift ;
float tdcmin=1000000;
double timeoffset ;
double timeoffset=0.;
int stepf,stepff[13],stepl,stepr,dtt,dttbuono(0);
// double abuona,bbuona,chibuo,chi2r,chi2l;
// double aoutr,aoutl,boutr,boutl;
......
......@@ -18,9 +18,21 @@ namespace MuonCalib {
std::istream& RtDataFromFile::read( std::istream& is )
{
std::string version;
std::string m_rts_str;
// read number of rts in file
is >> version >> m_rts;
is >> version >> m_rts_str;
unsigned long int pos = 0;
std::string::size_type start = m_rts_str.find_first_not_of(" ",pos);
if(start == std::string::npos) {
std::cout << "RtDataFromFile::read -- problems extracting m_rts -- crashing." << std::endl;
throw;
}
std::string::size_type stop = m_rts_str.find_first_of(" ",start+1);
if (stop == std::string::npos) stop = m_rts_str.size();
m_rts = std::stoi(m_rts_str.substr(start,stop-start),nullptr);
m_rts = (m_rts>M_MAX_RTS) ? M_MAX_RTS : m_rts;
for( unsigned int i=0;i<m_rts;++i){
if(version != "v0.0") {
......
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