Skip to content

Commit ff97eb5

Browse files
committed
Fix issues spot by the static analyzer, and make some cleanup in the same files
1 parent 12ead85 commit ff97eb5

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
@@ -9,11 +9,11 @@
99
#include "CoralBase/TimeStamp.h"
1010
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1111
#include "FWCore/ParameterSet/interface/ParameterSet.h"
12+
#include "FWCore/Utilities/interface/isFinite.h"
1213
#include "RelationalAccess/ICursor.h"
1314
#include "RelationalAccess/IQuery.h"
1415
#include "RelationalAccess/ISchema.h"
1516
#include "RelationalAccess/ISessionProxy.h"
16-
#include <iostream>
1717
#include <memory>
1818
#include <sstream>
1919
#include <utility>
@@ -454,7 +454,7 @@ bool LHCInfoPopConSourceHandler::getEcalData(cond::persistency::Session& session
454454
dipVal = dipValAttribute.data<std::string>();
455455
elementNr = elementNrAttribute.data<unsigned int>();
456456
value = valueNumberAttribute.data<float>();
457-
if (std::isnan(value))
457+
if (edm::isNotFinite(value))
458458
value = 0.;
459459
if (filter.process(iovTime)) {
460460
iovMap.insert(std::make_pair(changeTime, filter.current()->first));

0 commit comments

Comments
 (0)