Skip to content

Commit 882064b

Browse files
authored
Merge pull request #46644 from perrotta/fixCondToolsRunInfoForStaticAnalyzer
Fix issues spot by the static analyzer, and make some cleanup in the same files
2 parents e2471cd + ff97eb5 commit 882064b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "CoralBase/Attribute.h"
1212
#include "CoralBase/AttributeSpecification.h"
1313
#include "CoralBase/TimeStamp.h"
14-
#include <iostream>
1514
#include <memory>
1615
#include <sstream>
1716
#include <utility>
@@ -146,7 +145,6 @@ void FillInfoPopConSourceHandler::getNewObjects() {
146145
coral::ICursor &fillDataCursor = fillDataQuery->execute();
147146
//initialize loop variables
148147
unsigned short previousFillNumber = 1;
149-
unsigned short currentFill = m_firstFill;
150148
cond::Time_t previousFillEndTime = 0ULL, afterPreviousFillEndTime = 0ULL, beforeStableBeamStartTime = 0ULL;
151149
if (tagInfo().size > 0) {
152150
previousFillNumber = previousFill->fillNumber();
@@ -167,7 +165,7 @@ void FillInfoPopConSourceHandler::getNewObjects() {
167165
fillDataCursor.currentRow().toOutputStream(qs);
168166
edm::LogInfo(m_name) << qs.str() << "\nfrom " << m_name << "::getNewObjects";
169167
}
170-
currentFill = fillDataCursor.currentRow()[std::string("LHCFILL")].data<unsigned short>();
168+
unsigned short currentFill = fillDataCursor.currentRow()[std::string("LHCFILL")].data<unsigned short>();
171169
coral::Attribute const &bunches1Attribute = fillDataCursor.currentRow()[std::string("NBUNCHESBEAM1")];
172170
if (bunches1Attribute.isNull()) {
173171
bunches1 = 0;

CondTools/RunInfo/src/LHCInfoPopConSourceHandler.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#include "CoralBase/TimeStamp.h"
1111
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1212
#include "FWCore/ParameterSet/interface/ParameterSet.h"
13+
#include "FWCore/Utilities/interface/isFinite.h"
1314
#include "RelationalAccess/ICursor.h"
1415
#include "RelationalAccess/IQuery.h"
1516
#include "RelationalAccess/ISchema.h"
1617
#include "RelationalAccess/ISessionProxy.h"
17-
#include <iostream>
1818
#include <memory>
1919
#include <sstream>
2020
#include <utility>
@@ -455,7 +455,7 @@ bool LHCInfoPopConSourceHandler::getEcalData(cond::persistency::Session& session
455455
dipVal = dipValAttribute.data<std::string>();
456456
elementNr = elementNrAttribute.data<unsigned int>();
457457
value = valueNumberAttribute.data<float>();
458-
if (std::isnan(value))
458+
if (edm::isNotFinite(value))
459459
value = 0.;
460460
if (filter.process(iovTime)) {
461461
iovMap.insert(std::make_pair(changeTime, filter.current()->first));

0 commit comments

Comments
 (0)