From f107145b647f14863abf999550ed7e3ac48ddca5 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari Date: Mon, 16 Aug 2021 09:49:41 +0200 Subject: [PATCH 1/4] Removed lexical_cast boost dependency --- .../testTrackerAlignmentPayloadInspector.cpp | 4 +-- .../test/testBeamSpotPayloadInspector.cpp | 6 ++-- .../src/OnlineDBOutputService.cc | 4 +-- ...estAlCaRecoTriggerBitsPayloadInspector.cpp | 4 +-- .../test/testRunInfoPayloadInspector.cpp | 4 +-- .../interface/SiPixelGainCalibHelper.h | 4 +-- ...xelFEDChannelContainer_PayloadInspector.cc | 2 +- .../test/testSiPixelPayloadInspector.cpp | 34 +++++++++---------- .../SiStripApvGain_PayloadInspector.cc | 4 +-- .../plugins/SiStripNoises_PayloadInspector.cc | 6 ++-- .../SiStripPedestals_PayloadInspector.cc | 4 +-- .../test/testSiStripPayloadInspector.cpp | 24 ++++++------- CondCore/Utilities/bin/conddb_test_read.cpp | 2 +- .../plugins/BasicP_PayloadInspector.cc | 6 ++-- CondCore/Utilities/src/CondDBFetch.cc | 2 +- CondCore/Utilities/src/PayloadInspector.cc | 4 +-- CondCore/Utilities/test/testPngHistograms.cpp | 2 +- 17 files changed, 58 insertions(+), 58 deletions(-) diff --git a/CondCore/AlignmentPlugins/test/testTrackerAlignmentPayloadInspector.cpp b/CondCore/AlignmentPlugins/test/testTrackerAlignmentPayloadInspector.cpp index 486c5d7d2824d..7124f3ff69990 100644 --- a/CondCore/AlignmentPlugins/test/testTrackerAlignmentPayloadInspector.cpp +++ b/CondCore/AlignmentPlugins/test/testTrackerAlignmentPayloadInspector.cpp @@ -22,8 +22,8 @@ int main(int argc, char** argv) { std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS"); std::string tag = "TrackerAlignment_v21_offline"; - cond::Time_t start = boost::lexical_cast(294034); - cond::Time_t end = boost::lexical_cast(305898); + cond::Time_t start = static_cast(294034); + cond::Time_t end = static_cast(305898); std::cout << "## Alignment Histos" << std::endl; diff --git a/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp b/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp index 6fc591f7a4be5..4a0741a2a7b3f 100644 --- a/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp +++ b/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp @@ -27,8 +27,8 @@ int main(int argc, char** argv) { // BeamSpot std::string tag = "BeamSpotObjects_PCL_byLumi_v0_prompt"; - cond::Time_t start = boost::lexical_cast(1406876667347162); - //cond::Time_t end = boost::lexical_cast(1406876667347162); + cond::Time_t start = static_cast(1406876667347162); + //cond::Time_t end = static_cast(1406876667347162); edm::LogPrint("testBeamSpotPayloadInspector") << "## Exercising BeamSpot plots " << std::endl; @@ -37,7 +37,7 @@ int main(int argc, char** argv) { edm::LogPrint("testBeamSpotPayloadInspector") << histoParameters.data() << std::endl; tag = "BeamSpotOnlineTestLegacy"; - start = boost::lexical_cast(1443392479297557); + start = static_cast(1443392479297557); edm::LogPrint("testBeamSpotPayloadInspector") << "## Exercising BeamSpotOnline plots " << std::endl; diff --git a/CondCore/DBOutputService/src/OnlineDBOutputService.cc b/CondCore/DBOutputService/src/OnlineDBOutputService.cc index 3896bfc7e8aa0..20d53634e9950 100644 --- a/CondCore/DBOutputService/src/OnlineDBOutputService.cc +++ b/CondCore/DBOutputService/src/OnlineDBOutputService.cc @@ -69,8 +69,8 @@ namespace cond { if (!std::getline(sinfo, slumi, ',')) { throw Exception("Can't get lumi id from OMS Service."); } - unsigned int run = boost::lexical_cast(srun); - unsigned int lumi = boost::lexical_cast(slumi); + unsigned int run = std::stoul(srun); + unsigned int lumi = std::stoul(slumi); lastLumiProcessed = cond::time::lumiTime(run, lumi); return lastLumiProcessed; } diff --git a/CondCore/HLTPlugins/test/testAlCaRecoTriggerBitsPayloadInspector.cpp b/CondCore/HLTPlugins/test/testAlCaRecoTriggerBitsPayloadInspector.cpp index d08272a31ec45..4eb5a7ecf29e7 100644 --- a/CondCore/HLTPlugins/test/testAlCaRecoTriggerBitsPayloadInspector.cpp +++ b/CondCore/HLTPlugins/test/testAlCaRecoTriggerBitsPayloadInspector.cpp @@ -22,8 +22,8 @@ int main(int argc, char** argv) { std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS"); std::string tag = "AlCaRecoHLTpaths8e29_1e31_v7_hlt"; - cond::Time_t start = boost::lexical_cast(270000); - cond::Time_t end = boost::lexical_cast(304820); + cond::Time_t start = static_cast(270000); + cond::Time_t end = static_cast(304820); std::cout << "## AlCaRecoTriggerBit Histos" << std::endl; diff --git a/CondCore/RunInfoPlugins/test/testRunInfoPayloadInspector.cpp b/CondCore/RunInfoPlugins/test/testRunInfoPayloadInspector.cpp index dc78079b886b4..5bd13a5c89358 100644 --- a/CondCore/RunInfoPlugins/test/testRunInfoPayloadInspector.cpp +++ b/CondCore/RunInfoPlugins/test/testRunInfoPayloadInspector.cpp @@ -22,8 +22,8 @@ int main(int argc, char** argv) { std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS"); std::string tag = "runinfo_31X_hlt"; - cond::Time_t start = boost::lexical_cast(311950); - cond::Time_t end = boost::lexical_cast(312237); + cond::Time_t start = static_cast(311950); + cond::Time_t end = static_cast(312237); std::cout << "## RunInfo testing" << std::endl; diff --git a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h index 5f8598040d07f..824c54cc592eb 100644 --- a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h +++ b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h @@ -426,7 +426,7 @@ namespace gainCalibHelper { auto paramValues = cond::payloadInspector::PlotBase::inputParamValues(); auto ip = paramValues.find("SetLog"); if (ip != paramValues.end()) { - auto answer = boost::lexical_cast(ip->second); + auto answer = ip->second; if (!SiPixelPI::checkAnswerOK(answer, setLog)) { throw cms::Exception(label_) << "\nERROR: " << answer @@ -590,7 +590,7 @@ namespace gainCalibHelper { auto paramValues = cond::payloadInspector::PlotBase::inputParamValues(); auto ip = paramValues.find("SetLog"); if (ip != paramValues.end()) { - auto answer = boost::lexical_cast(ip->second); + auto answer = ip->second; if (!SiPixelPI::checkAnswerOK(answer, setLog)) { throw cms::Exception(label_) << "\nERROR: " << answer diff --git a/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc b/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc index fd440af137345..1839bdf4fe5e5 100644 --- a/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc +++ b/CondCore/SiPixelPlugins/plugins/SiPixelFEDChannelContainer_PayloadInspector.cc @@ -82,7 +82,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("Scenarios"); if (ip != paramValues.end()) { - auto input = boost::lexical_cast(ip->second); + auto input = ip->second; typedef boost::tokenizer> tokenizer; boost::char_separator sep{","}; tokenizer tok{input, sep}; diff --git a/CondCore/SiPixelPlugins/test/testSiPixelPayloadInspector.cpp b/CondCore/SiPixelPlugins/test/testSiPixelPayloadInspector.cpp index 34b6ad1d50ed0..8f726f3b53b02 100644 --- a/CondCore/SiPixelPlugins/test/testSiPixelPayloadInspector.cpp +++ b/CondCore/SiPixelPlugins/test/testSiPixelPayloadInspector.cpp @@ -33,8 +33,8 @@ int main(int argc, char** argv) { // Lorentz Angle std::string tag = "SiPixelLorentzAngle_v11_offline"; - cond::Time_t start = boost::lexical_cast(303790); - cond::Time_t end = boost::lexical_cast(324245); + cond::Time_t start = static_cast(303790); + cond::Time_t end = static_cast(324245); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising Lorentz Angle plots " << std::endl; @@ -68,7 +68,7 @@ int main(int argc, char** argv) { // 2 tags comparisons std::string tag2 = "SiPixelLorentzAngle_2016_ultralegacymc_v2"; - cond::Time_t start2 = boost::lexical_cast(1); + cond::Time_t start2 = static_cast(1); SiPixelLorentzAngleValueComparisonTwoTags histo6; histo6.process(connectionString, PI::mk_input(tag, start, start, tag2, start2, start2)); @@ -81,8 +81,8 @@ int main(int argc, char** argv) { // SiPixelQuality tag = "SiPixelQuality_forDigitizer_phase1_2018_permanentlyBad"; - start = boost::lexical_cast(1); - end = boost::lexical_cast(1); + start = static_cast(1); + end = static_cast(1); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixelQuality plots " << std::endl; @@ -97,8 +97,8 @@ int main(int argc, char** argv) { // SiPixelGainCalibrationOffline tag = "SiPixelGainCalibration_2009runs_express"; - start = boost::lexical_cast(312203); - end = boost::lexical_cast(312203); + start = static_cast(312203); + end = static_cast(312203); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixelGainCalibrationOffline plots " << std::endl; @@ -118,7 +118,7 @@ int main(int argc, char** argv) { histo13.process(connectionString, PI::mk_input(tag, start, end)); edm::LogPrint("testSiPixelPayloadInspector") << histo13.data() << std::endl; - end = boost::lexical_cast(326851); + end = static_cast(326851); SiPixelGainCalibOfflinePedestalComparisonSingleTag histo14; histo14.process(connectionString, PI::mk_input(tag, start, end)); @@ -143,8 +143,8 @@ int main(int argc, char** argv) { // SiPixelTemplates tag = "SiPixelTemplateDBObject38Tv3_express"; - start = boost::lexical_cast(326083); - end = boost::lexical_cast(326083); + start = static_cast(326083); + end = static_cast(326083); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixelTemplates plots " << std::endl; @@ -177,8 +177,8 @@ int main(int argc, char** argv) { // SiPixelGenErrors tag = "SiPixelGenErrorDBObject_phase1_BoR3_HV350_Tr2000"; - start = boost::lexical_cast(1); - end = boost::lexical_cast(1); + start = static_cast(1); + end = static_cast(1); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixelGenErrors plots " << std::endl; @@ -193,8 +193,8 @@ int main(int argc, char** argv) { // SiPixelQualityProbabilities tag = "SiPixelQualityProbabilities_UltraLegacy2018_v0_mc"; - start = boost::lexical_cast(1); - end = boost::lexical_cast(1); + start = static_cast(1); + end = static_cast(1); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixelQualityProbabilities plots " << std::endl; @@ -205,8 +205,8 @@ int main(int argc, char** argv) { // SiPixelDynamicInefficiency tag = "SiPixelDynamicInefficiency_PhaseI_v9"; - start = boost::lexical_cast(1); - end = boost::lexical_cast(1); + start = static_cast(1); + end = static_cast(1); edm::LogPrint("testSiPixelPayloadInspector") << "## Exercising SiPixeDynamicInefficiency plots " << std::endl; @@ -215,7 +215,7 @@ int main(int argc, char** argv) { edm::LogPrint("testSiPixelPayloadInspector") << histo26.data() << std::endl; tag2 = "SiPixelDynamicInefficiency_PhaseI_v6"; - start2 = boost::lexical_cast(1); + start2 = static_cast(1); SiPixelFullIneffROCsMapCompareTwoTags histo27; histo27.process(connectionString, PI::mk_input(tag, start, start, tag2, start2, start2)); diff --git a/CondCore/SiStripPlugins/plugins/SiStripApvGain_PayloadInspector.cc b/CondCore/SiStripPlugins/plugins/SiStripApvGain_PayloadInspector.cc index bc21118b11bc0..dc2b59002db67 100644 --- a/CondCore/SiStripPlugins/plugins/SiStripApvGain_PayloadInspector.cc +++ b/CondCore/SiStripPlugins/plugins/SiStripApvGain_PayloadInspector.cc @@ -566,7 +566,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("nsigma"); if (ip != paramValues.end()) { - nsigma = boost::lexical_cast(ip->second); + nsigma = std::stoul(ip->second); } // trick to deal with the multi-ioved tag and two tag case at the same time @@ -674,7 +674,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("nsigma"); if (ip != paramValues.end()) { - nsigma = boost::lexical_cast(ip->second); + nsigma = std::stoul(ip->second); edm::LogPrint("SiStripApvGain_PayloadInspector") << "using custom z-axis saturation: " << nsigma << " sigmas" << std::endl; } else { diff --git a/CondCore/SiStripPlugins/plugins/SiStripNoises_PayloadInspector.cc b/CondCore/SiStripPlugins/plugins/SiStripNoises_PayloadInspector.cc index f367b6ab14a05..213e1c848a583 100644 --- a/CondCore/SiStripPlugins/plugins/SiStripNoises_PayloadInspector.cc +++ b/CondCore/SiStripPlugins/plugins/SiStripNoises_PayloadInspector.cc @@ -117,7 +117,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("DetIds"); if (ip != paramValues.end()) { - auto input = boost::lexical_cast(ip->second); + auto input = ip->second; typedef boost::tokenizer> tokenizer; boost::char_separator sep{","}; tokenizer tok{input, sep}; @@ -316,7 +316,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("DetId"); if (ip != paramValues.end()) { - the_detid = boost::lexical_cast(ip->second); + the_detid = std::stoul(ip->second); } if (payload.get()) { @@ -962,7 +962,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("nsigma"); if (ip != paramValues.end()) { - nsigma = boost::lexical_cast(ip->second); + nsigma = std::stoul(ip->second); } // trick to deal with the multi-ioved tag and two tag case at the same time diff --git a/CondCore/SiStripPlugins/plugins/SiStripPedestals_PayloadInspector.cc b/CondCore/SiStripPlugins/plugins/SiStripPedestals_PayloadInspector.cc index 862300c85b89c..19089ff7b30ad 100644 --- a/CondCore/SiStripPlugins/plugins/SiStripPedestals_PayloadInspector.cc +++ b/CondCore/SiStripPlugins/plugins/SiStripPedestals_PayloadInspector.cc @@ -116,7 +116,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("DetIds"); if (ip != paramValues.end()) { - auto input = boost::lexical_cast(ip->second); + auto input = ip->second; typedef boost::tokenizer> tokenizer; boost::char_separator sep{","}; tokenizer tok{input, sep}; @@ -315,7 +315,7 @@ namespace { auto paramValues = PlotBase::inputParamValues(); auto ip = paramValues.find("DetId"); if (ip != paramValues.end()) { - the_detid = boost::lexical_cast(ip->second); + the_detid = std::stoul(ip->second); } if (payload.get()) { diff --git a/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp b/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp index 285202ed5293c..012152eb49e39 100644 --- a/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp +++ b/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp @@ -31,8 +31,8 @@ int main(int argc, char** argv) { // Gains std::string tag = "SiStripApvGain_FromParticles_GR10_v11_offline"; - cond::Time_t start = boost::lexical_cast(132440); - cond::Time_t end = boost::lexical_cast(285368); + cond::Time_t start = static_cast(132440); + cond::Time_t end = static_cast(285368); boost::python::dict inputs; edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Gains plots " << std::endl; @@ -72,8 +72,8 @@ int main(int argc, char** argv) { // Noise tag = "SiStripNoise_GR10_v1_hlt"; - start = boost::lexical_cast(312968); - end = boost::lexical_cast(313120); + start = static_cast(312968); + end = static_cast(313120); edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Noise plots " << std::endl; @@ -98,8 +98,8 @@ int main(int argc, char** argv) { // Pedestals tag = "SiStripPedestals_v2_prompt"; - start = boost::lexical_cast(303420); - end = boost::lexical_cast(313120); + start = static_cast(303420); + end = static_cast(313120); edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Pedestal plots " << std::endl; @@ -120,8 +120,8 @@ int main(int argc, char** argv) { //Latency tag = "SiStripLatency_v2_prompt"; - start = boost::lexical_cast(315347); - end = boost::lexical_cast(316675); + start = static_cast(315347); + end = static_cast(316675); edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Latency plots " << std::endl; @@ -135,8 +135,8 @@ int main(int argc, char** argv) { //Threshold tag = "SiStripThreshold_v1_prompt"; - start = boost::lexical_cast(315352); - end = boost::lexical_cast(315460); + start = static_cast(315352); + end = static_cast(315460); edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Threshold plots " << std::endl; @@ -146,8 +146,8 @@ int main(int argc, char** argv) { // test SiStripTkMaps tag = "SiStripBadComponents_startupMC_for2017_v1_mc"; - start = boost::lexical_cast(1); - end = boost::lexical_cast(1); + start = static_cast(1); + end = static_cast(1); edm::LogPrint("testSiStripPayloadInspector") << "## Exercising SiStripTkMaps plots " << std::endl; diff --git a/CondCore/Utilities/bin/conddb_test_read.cpp b/CondCore/Utilities/bin/conddb_test_read.cpp index a4024d9fac3b7..2cbb9d44c4672 100644 --- a/CondCore/Utilities/bin/conddb_test_read.cpp +++ b/CondCore/Utilities/bin/conddb_test_read.cpp @@ -53,7 +53,7 @@ int cond::TestReadUtilities::execute() { std::string siovs = getOptionValue("iovs"); tokenizer tok(siovs); for (auto &t : tok) { - iovs.push_back(boost::lexical_cast(t)); + iovs.push_back(std::stoull(t)); } } diff --git a/CondCore/Utilities/plugins/BasicP_PayloadInspector.cc b/CondCore/Utilities/plugins/BasicP_PayloadInspector.cc index 35a4a52429b79..fbcd8389f8b9d 100644 --- a/CondCore/Utilities/plugins/BasicP_PayloadInspector.cc +++ b/CondCore/Utilities/plugins/BasicP_PayloadInspector.cc @@ -34,15 +34,15 @@ namespace { auto paramValues = cond::payloadInspector::PlotBase::inputParamValues(); auto ip = paramValues.find("Factor"); if (ip != paramValues.end()) { - v = v * boost::lexical_cast(ip->second); + v = v * std::stof(ip->second); } ip = paramValues.find("Offset"); if (ip != paramValues.end()) { - v = v + boost::lexical_cast(ip->second); + v = v + std::stof(ip->second); } ip = paramValues.find("Scale"); if (ip != paramValues.end()) { - v = v * boost::lexical_cast(ip->second); + v = v * std::stof(ip->second); } return v; } diff --git a/CondCore/Utilities/src/CondDBFetch.cc b/CondCore/Utilities/src/CondDBFetch.cc index d950d7145e5ce..3df053b00879f 100644 --- a/CondCore/Utilities/src/CondDBFetch.cc +++ b/CondCore/Utilities/src/CondDBFetch.cc @@ -344,7 +344,7 @@ namespace cond { bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo); if (!found) throwException( - "Payload with id " + boost::lexical_cast(payloadId) + " has not been found in the database.", + "Payload with id " + payloadId + " has not been found in the database.", "fetch"); return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr); } diff --git a/CondCore/Utilities/src/PayloadInspector.cc b/CondCore/Utilities/src/PayloadInspector.cc index 15a0f80b4b6f3..8df6d785274e4 100644 --- a/CondCore/Utilities/src/PayloadInspector.cc +++ b/CondCore/Utilities/src/PayloadInspector.cc @@ -79,8 +79,8 @@ namespace cond { std::string tagName = boost::python::extract(entry[0]); std::string time0s = boost::python::extract(entry[1]); std::string time1s = boost::python::extract(entry[2]); - cond::Time_t time0 = boost::lexical_cast(time0s); - cond::Time_t time1 = boost::lexical_cast(time1s); + cond::Time_t time0 = std::stoull(time0s); + cond::Time_t time1 = std::stoull(time1s); tags[i] = std::make_tuple(tagName, time0, time1); } ret = exec_process(connectionString, tags); diff --git a/CondCore/Utilities/test/testPngHistograms.cpp b/CondCore/Utilities/test/testPngHistograms.cpp index f527f6e4ce27e..0ecbfef087a3b 100644 --- a/CondCore/Utilities/test/testPngHistograms.cpp +++ b/CondCore/Utilities/test/testPngHistograms.cpp @@ -23,7 +23,7 @@ int main(int argc, char** argv) { std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS"); std::string tag = std::string("BasicPayload_v10.0"); - cond::Time_t since = boost::lexical_cast("901"); + cond::Time_t since = std::stoull("901"); std::cout << "## PNG Histo" << std::endl; From c2f3f43826d2ae6d76a49d2858cd5b4399a64e36 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari Date: Wed, 18 Aug 2021 18:15:15 +0200 Subject: [PATCH 2/4] applied checks --- CondCore/Utilities/src/CondDBFetch.cc | 4 +--- CondCore/Utilities/src/CondDBFetch.cc.rej | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 CondCore/Utilities/src/CondDBFetch.cc.rej diff --git a/CondCore/Utilities/src/CondDBFetch.cc b/CondCore/Utilities/src/CondDBFetch.cc index 3df053b00879f..17d8d2531d6c6 100644 --- a/CondCore/Utilities/src/CondDBFetch.cc +++ b/CondCore/Utilities/src/CondDBFetch.cc @@ -343,9 +343,7 @@ namespace cond { std::string payloadTypeName; bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo); if (!found) - throwException( - "Payload with id " + payloadId + " has not been found in the database.", - "fetch"); + throwException("Payload with id " + payloadId + " has not been found in the database.", "fetch"); return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr); } diff --git a/CondCore/Utilities/src/CondDBFetch.cc.rej b/CondCore/Utilities/src/CondDBFetch.cc.rej new file mode 100644 index 0000000000000..2528fb80fbcf6 --- /dev/null +++ b/CondCore/Utilities/src/CondDBFetch.cc.rej @@ -0,0 +1,13 @@ +--- CondCore/Utilities/src/CondDBFetch.cc ++++ CondCore/Utilities/src/CondDBFetch.cc +@@ -344,9 +344,7 @@ + std::string payloadTypeName; + bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo); + if (!found) +- throwException( +- "Payload with id " + payloadId + " has not been found in the database.", +- "fetch"); ++ throwException("Payload with id " + payloadId + " has not been found in the database.", "fetch"); + return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr); + } + From ca07bd757fd7d6484ebcb4f462e98a459962dcb4 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari Date: Tue, 24 Aug 2021 08:47:49 +0200 Subject: [PATCH 3/4] resolve conflicts --- .../SiStripPlugins/test/testSiStripPayloadInspector.cpp | 2 +- CondCore/Utilities/src/PayloadInspector.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp b/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp index 012152eb49e39..152e3b755061a 100644 --- a/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp +++ b/CondCore/SiStripPlugins/test/testSiStripPayloadInspector.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { std::string tag = "SiStripApvGain_FromParticles_GR10_v11_offline"; cond::Time_t start = static_cast(132440); cond::Time_t end = static_cast(285368); - boost::python::dict inputs; + py::dict inputs; edm::LogPrint("testSiStripPayloadInspector") << "## Exercising Gains plots " << std::endl; diff --git a/CondCore/Utilities/src/PayloadInspector.cc b/CondCore/Utilities/src/PayloadInspector.cc index 8df6d785274e4..cb08ecd10b5cd 100644 --- a/CondCore/Utilities/src/PayloadInspector.cc +++ b/CondCore/Utilities/src/PayloadInspector.cc @@ -75,10 +75,10 @@ namespace cond { std::vector > tags; tags.resize(nt); for (size_t i = 0; i < nt; i++) { - boost::python::tuple entry = boost::python::extract(tagsWithTimeBoundaries[i]); - std::string tagName = boost::python::extract(entry[0]); - std::string time0s = boost::python::extract(entry[1]); - std::string time1s = boost::python::extract(entry[2]); + boost::python::tuple entry = tagsWithTimeBoundaries[i].cast(); + std::string tagName = entry[0].cast(); + std::string time0s = entry[1].cast(); + std::string time1s = entry[2].cast(); cond::Time_t time0 = std::stoull(time0s); cond::Time_t time1 = std::stoull(time1s); tags[i] = std::make_tuple(tagName, time0, time1); From 22407accf404ccb6ef15131d8e646ed290225015 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari Date: Tue, 24 Aug 2021 11:41:31 +0200 Subject: [PATCH 4/4] fixes --- CondCore/Utilities/src/CondDBFetch.cc.rej | 13 ------------- CondCore/Utilities/src/PayloadInspector.cc | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 CondCore/Utilities/src/CondDBFetch.cc.rej diff --git a/CondCore/Utilities/src/CondDBFetch.cc.rej b/CondCore/Utilities/src/CondDBFetch.cc.rej deleted file mode 100644 index 2528fb80fbcf6..0000000000000 --- a/CondCore/Utilities/src/CondDBFetch.cc.rej +++ /dev/null @@ -1,13 +0,0 @@ ---- CondCore/Utilities/src/CondDBFetch.cc -+++ CondCore/Utilities/src/CondDBFetch.cc -@@ -344,9 +344,7 @@ - std::string payloadTypeName; - bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo); - if (!found) -- throwException( -- "Payload with id " + payloadId + " has not been found in the database.", -- "fetch"); -+ throwException("Payload with id " + payloadId + " has not been found in the database.", "fetch"); - return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr); - } - diff --git a/CondCore/Utilities/src/PayloadInspector.cc b/CondCore/Utilities/src/PayloadInspector.cc index cb08ecd10b5cd..e6987122d4a12 100644 --- a/CondCore/Utilities/src/PayloadInspector.cc +++ b/CondCore/Utilities/src/PayloadInspector.cc @@ -75,7 +75,7 @@ namespace cond { std::vector > tags; tags.resize(nt); for (size_t i = 0; i < nt; i++) { - boost::python::tuple entry = tagsWithTimeBoundaries[i].cast(); + py::tuple entry = tagsWithTimeBoundaries[i].cast(); std::string tagName = entry[0].cast(); std::string time0s = entry[1].cast(); std::string time1s = entry[2].cast();