Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
Expand Down Expand Up @@ -61,8 +62,8 @@ process.add_(cms.Service('JobReportService'))
process.add_(cms.Service('TFileService',fileName=cms.string('{}')))
)_";

// Format the raw string literal using fmt::format
return fmt::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
// Format the raw string literal using std::format
return std::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
}

//___________________________________________________________________________________________
Expand Down
5 changes: 3 additions & 2 deletions Alignment/OfflineValidation/test/testTrackAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include "Alignment/OfflineValidation/interface/TkAlStyle.h"

#include <format>
#define CATCH_CONFIG_MAIN
#include "catch.hpp"

Expand Down Expand Up @@ -56,8 +57,8 @@ process.add_(cms.Service('JobReportService'))
process.add_(cms.Service('TFileService',fileName=cms.string('{}')))
)_";

// Format the raw string literal using fmt::format
return fmt::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
// Format the raw string literal using std::format
return std::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
}

//___________________________________________________________________________________________
Expand Down
5 changes: 3 additions & 2 deletions CalibTracker/SiPixelESProducers/test/test_catch2_ESSources.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "FWCore/TestProcessor/interface/TestProcessor.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
Expand Down Expand Up @@ -62,8 +63,8 @@ process.add_(cms.Service('JobReportService'))
process.moduleToTest(process.getConditions)
)_";

// Format the raw string literal using fmt::format
return fmt::format(rawString, recordName, dataName, esProducerName);
// Format the raw string literal using std::format
return std::format(rawString, recordName, dataName, esProducerName);
}

//___________________________________________________________________________________________
Expand Down
5 changes: 3 additions & 2 deletions DQM/EcalCommon/test/testEcalCommon.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "FWCore/TestProcessor/interface/TestProcessor.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
Expand Down Expand Up @@ -32,8 +33,8 @@ process.add_(cms.Service('JobReportService'))
process.add_(cms.Service('DQMStore'))
)_";

// Format the raw string literal using fmt::format
return fmt::format(rawString, cfiName, analyzerName, analyzerName);
// Format the raw string literal using std::format
return std::format(rawString, cfiName, analyzerName, analyzerName);
}

//___________________________________________________________________________________________
Expand Down
3 changes: 2 additions & 1 deletion DQM/HcalTasks/plugins/HcalFEDIntegrityTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <vector>
#include <string>
#include <format>

using namespace std;
using namespace edm;
Expand Down Expand Up @@ -141,7 +142,7 @@ void HcalFEDIntegrityTask::labelBins(MonitorElement *me) {
return;

for (int i = 0; i < xbins; i++) {
const std::string xLabel = fmt::format("{}", minFEDNum_ + i);
const std::string xLabel = std::format("{}", minFEDNum_ + i);
me->setBinLabel(i + 1, xLabel, 1);
}
}
Expand Down
17 changes: 9 additions & 8 deletions DQM/RPCMonitorClient/plugins/RPCEventSummary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include <format>

RPCEventSummary::RPCEventSummary(const edm::ParameterSet& ps) {
edm::LogVerbatim("rpceventsummary") << "[RPCEventSummary]: Constructor";
Expand Down Expand Up @@ -95,14 +96,14 @@ void RPCEventSummary::dqmEndLuminosityBlock(DQMStore::IBooker& ibooker,

std::vector<std::string> segmentNames;
for (int i = -2; i <= 2; i++) {
const std::string segName = fmt::format("RPC_Wheel{}", i);
const std::string segName = std::format("RPC_Wheel{}", i);
segmentNames.push_back(segName);
}

for (int i = -numberDisk_; i <= numberDisk_; i++) {
if (i == 0)
continue;
const std::string segName = fmt::format("RPC_Disk{}", i);
const std::string segName = std::format("RPC_Disk{}", i);
segmentNames.push_back(segName);
}

Expand Down Expand Up @@ -146,8 +147,8 @@ void RPCEventSummary::clientOperation(DQMStore::IGetter& igetter) {
float barrelFactor = 0;

for (int w = -2; w < 3; w++) {
const std::string meName1 = fmt::format("{}/DeadChannelFraction_Roll_vs_Sector_Wheel{}", globalFolder_, w);
const std::string meName2 = fmt::format("{}/RPCNoisyStrips_Roll_vs_Sector_Wheel{}", globalFolder_, w);
const std::string meName1 = std::format("{}/DeadChannelFraction_Roll_vs_Sector_Wheel{}", globalFolder_, w);
const std::string meName2 = std::format("{}/RPCNoisyStrips_Roll_vs_Sector_Wheel{}", globalFolder_, w);
MonitorElement* myMe1 = igetter.get(meName1);
MonitorElement* myMe2 = igetter.get(meName2);

Expand Down Expand Up @@ -182,7 +183,7 @@ void RPCEventSummary::clientOperation(DQMStore::IGetter& igetter) {

wheelFactor = wheelFactor / myMe1->getNbinsX();

const std::string globalMEName = fmt::format("{}/reportSummaryContents/RPC_Wheel{}", eventInfoPath_, w);
const std::string globalMEName = std::format("{}/reportSummaryContents/RPC_Wheel{}", eventInfoPath_, w);
MonitorElement* globalMe = igetter.get(globalMEName);
if (globalMe)
globalMe->Fill(wheelFactor);
Expand All @@ -201,8 +202,8 @@ void RPCEventSummary::clientOperation(DQMStore::IGetter& igetter) {
if (d == 0)
continue;

const std::string meName1 = fmt::format("{}/DeadChannelFraction_Ring_vs_Segment_Disk{}", globalFolder_, d);
const std::string meName2 = fmt::format("{}/RPCNoisyStrips_Ring_vs_Segment_Disk{}", globalFolder_, d);
const std::string meName1 = std::format("{}/DeadChannelFraction_Ring_vs_Segment_Disk{}", globalFolder_, d);
const std::string meName2 = std::format("{}/RPCNoisyStrips_Ring_vs_Segment_Disk{}", globalFolder_, d);
MonitorElement* myMe1 = igetter.get(meName1);
MonitorElement* myMe2 = igetter.get(meName2);

Expand Down Expand Up @@ -245,7 +246,7 @@ void RPCEventSummary::clientOperation(DQMStore::IGetter& igetter) {

diskFactor = diskFactor / 6;

const std::string globalMEName = fmt::format("{}/reportSummaryContents/RPC_Disk{}", eventInfoPath_, d);
const std::string globalMEName = std::format("{}/reportSummaryContents/RPC_Disk{}", eventInfoPath_, d);
MonitorElement* globalMe = igetter.get(globalMEName);
if (globalMe)
globalMe->Fill(diskFactor);
Expand Down
5 changes: 3 additions & 2 deletions DQM/RPCMonitorClient/src/RPCClusterSizeTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Geometry/RPCGeometry/interface/RPCGeomServ.h"
#include <format>

RPCClusterSizeTest::RPCClusterSizeTest(const edm::ParameterSet& ps) {
edm::LogVerbatim("rpceventsummary") << "[RPCClusterSizeTest]: Constructor";
Expand Down Expand Up @@ -55,7 +56,7 @@ void RPCClusterSizeTest::clientOperation() {
//Barrel
for (int wheel = -2; wheel <= 2; wheel++) {
for (int sector = 1; sector <= 12; sector++) {
std::string tmpName = fmt::format("ClusterSize_Wheel_{}_Sector_{}", wheel, sector);
std::string tmpName = std::format("ClusterSize_Wheel_{}_Sector_{}", wheel, sector);

if (tmpName == meName) {
MEAN = MEANWheel[wheel + 2];
Expand Down Expand Up @@ -97,7 +98,7 @@ void RPCClusterSizeTest::clientOperation() {
for (int disk = 1; disk <= numberOfDisks_; disk++) {
for (int ring = 2; ring < numberOfRings_ + 2; ring++) {
for (unsigned int ich = 0; ich < chNames.size(); ich++) {
std::string tmpName = fmt::format("ClusterSize_Disk_{}_Ring_{}_{}", (region * disk), ring, chNames[ich]);
std::string tmpName = std::format("ClusterSize_Disk_{}_Ring_{}_{}", (region * disk), ring, chNames[ich]);

if (tmpName == meName) {
xBin = (ich * 9);
Expand Down
4 changes: 3 additions & 1 deletion DQM/RPCMonitorDigi/src/RPCFEDIntegrity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "DQM/RPCMonitorDigi/interface/RPCRawDataCountsHistoMaker.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include <format>

RPCFEDIntegrity::RPCFEDIntegrity(const edm::ParameterSet& ps) {
edm::LogVerbatim("rpcfedintegrity") << "[RPCFEDIntegrity]: Constructor";

Expand Down Expand Up @@ -70,7 +72,7 @@ void RPCFEDIntegrity::labelBins(MonitorElement* myMe) {
return;

for (int i = 0; i < xbins; i++) {
const std::string xLabel = fmt::format("{}", minFEDNum_ + i);
const std::string xLabel = std::format("{}", minFEDNum_ + i);
myMe->setBinLabel(i + 1, xLabel, 1);
}
}
5 changes: 3 additions & 2 deletions DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
Expand Down Expand Up @@ -57,8 +58,8 @@ process.add_(cms.Service('JobReportService'))
process.add_(cms.Service('TFileService',fileName=cms.string('{}')))
)_";

// Format the raw string literal using fmt::format
return fmt::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
// Format the raw string literal using std::format
return std::format(rawString, analyzerName, analyzerName, analyzerName, rootFileName);
}

//___________________________________________________________________________________________
Expand Down
1 change: 1 addition & 0 deletions DQMServices/StreamerIO/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<use name="EventFilter/Utilities"/>
<use name="DQMServices/Components"/>
<use name="stdcxx-fs"/>
<use name="fmt"/>
<library file="*.cc" name="DQMServicesStreamerIOTestPlugins">
<flags EDM_PLUGIN="1"/>
</library>
Expand Down
1 change: 1 addition & 0 deletions DataFormats/CSCDigi/src/CSCWireDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "DataFormats/CSCDigi/interface/CSCWireDigi.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iostream>
#include <iterator>
#include <cstdint>

/// Constructors
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/FEDRawData/interface/SLinkRocketHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "FWCore/Utilities/interface/Exception.h"

//#include <memory>
#include <memory>
#include <span>

/*
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/FEDRawData/src/RawDataBuffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <DataFormats/FEDRawData/interface/RawDataBuffer.h>
#include <DataFormats/FEDRawData/interface/FEDNumbering.h>
#include <DataFormats/FEDRawData/interface/SourceIDNumbering.h>
#include "FWCore/Utilities/interface/Exception.h"
#include <cstring>

RawDataBuffer::RawDataBuffer() {}
RawDataBuffer::RawDataBuffer(uint32_t preallocSize) : usedSize_(0), data_(preallocSize) {}
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/Provenance/src/ThinnedAssociationsHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "FWCore/Utilities/interface/EDMException.h"
#include <algorithm>

#include <fmt/format.h>
#include <format>

namespace edm {

Expand Down Expand Up @@ -72,7 +72,7 @@ namespace edm {
ensureSlimmingConstraints();
} catch (edm::Exception& ex) {
ex.addContext("Calling ThinnedAssociationsHelper::addAssociation()");
ex.addAdditionalInfo(fmt::format("When adding a slimmed collection with BranchID {}", branches.thinned().id()));
ex.addAdditionalInfo(std::format("When adding a slimmed collection with BranchID {}", branches.thinned().id()));
throw ex;
}
}
Expand Down
1 change: 0 additions & 1 deletion DataFormats/SoATemplate/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<use name="boost_header"/>
<use name="fmt"/>
<use name="FWCore/Reflection" source_only="1"/>
<use name="FWCore/Utilities" source_only="1"/>
4 changes: 2 additions & 2 deletions DataFormats/SoATemplate/interface/SoACommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <boost/preprocessor.hpp>

#include <fmt/format.h>
#include <format>

#include "FWCore/Utilities/interface/typedefs.h"

Expand Down Expand Up @@ -49,7 +49,7 @@
}
#else
#define SOA_THROW_OUT_OF_RANGE(A, I, R) \
{ throw std::out_of_range(fmt::format("{}: index {} out of range {}", (A), (I), (R))); }
{ throw std::out_of_range(std::format("{}: index {} out of range {}", (A), (I), (R))); }
#endif

/* declare "scalars" (one value shared across the whole SoA) and "columns" (one value per element) */
Expand Down
3 changes: 2 additions & 1 deletion EventFilter/CTPPSRawToDigi/plugins/TotemVFATRawToDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

#include <string>
#include <format>

class TotemVFATRawToDigi : public edm::stream::EDProducer<> {
public:
Expand Down Expand Up @@ -209,7 +210,7 @@ void TotemVFATRawToDigi::run(edm::Event &event, const edm::EventSetup &es) {
if (analysisMaskHandle.isValid() && !analysisMaskHandle.failedToGet()) {
analysisMask = *analysisMaskHandle;
} else {
errSummary.add(fmt::format("No AnalysisMask found for {0}", subSystemName), "");
errSummary.add(std::format("No AnalysisMask found for {0}", subSystemName), "");
analysisMask = TotemAnalysisMask();
}

Expand Down
7 changes: 4 additions & 3 deletions EventFilter/CTPPSRawToDigi/src/CTPPSPixelDataFormatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <bitset>
#include <sstream>
#include <iostream>
#include <format>

using namespace edm;
using namespace std;
Expand Down Expand Up @@ -176,7 +177,7 @@ void CTPPSPixelDataFormatter::interpretRawData(
} else if ((nroc - 1) >= maxRocIndex) {
m_ErrorCheck.conversionError(fedId, iD, InvalidROCId, ww, errors);
m_ErrorSummary.add("Invalid ROC",
fmt::format("Id {0}, in link {1}, of FED {2} in DetId {3}", convroc, nlink, fedId, iD));
std::format("Id {0}, in link {1}, of FED {2} in DetId {3}", convroc, nlink, fedId, iD));

} else {
m_ErrorCheck.conversionError(fedId, iD, Unknown, ww, errors);
Expand Down Expand Up @@ -210,7 +211,7 @@ void CTPPSPixelDataFormatter::interpretRawData(
if (!isRun3 && (dcol < min_Dcol || dcol > max_Dcol || pxid < min_Pixid || pxid > max_Pixid)) {
m_ErrorSummary.add(
"unphysical dcol and/or pxid",
fmt::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, dcol= {4}, pxid= {5}, detId= {6}",
std::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, dcol= {4}, pxid= {5}, detId= {6}",
fedId,
nlink,
convroc,
Expand All @@ -225,7 +226,7 @@ void CTPPSPixelDataFormatter::interpretRawData(
}
if (isRun3 && (col < min_COL || col > max_COL || row < min_ROW || row > max_ROW)) {
m_ErrorSummary.add("unphysical col and/or row",
fmt::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, col= {4}, row= {5}, detId= {6}",
std::format("fedId= {0}, nllink= {1}, convroc= {2}, adc= {3}, col= {4}, row= {5}, detId= {6}",
fedId,
nlink,
convroc,
Expand Down
7 changes: 3 additions & 4 deletions EventFilter/SiStripRawToDigi/plugins/SiStripDigiToRaw.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include <iomanip>
#include <iostream>
#include <sstream>

#include <fmt/format.h>
#include <format>

#include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h"
#include "DataFormats/FEDRawData/interface/FEDHeader.h"
Expand Down Expand Up @@ -136,7 +135,7 @@ namespace sistrip {

//need to construct full object to copy full header
if (rawfedData.size() == 0)
warnings_.add("Invalid raw data for FED, skipping", fmt::format("id {0}", *ifed));
warnings_.add("Invalid raw data for FED, skipping", std::format("id {0}", *ifed));
const auto st_buffer = preconstructCheckFEDBuffer(rawfedData, true);
if (FEDBufferStatusCode::SUCCESS != st_buffer) {
edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
Expand All @@ -150,7 +149,7 @@ namespace sistrip {
<< " Could not construct FEDBuffer for FED " << *ifed << std::endl;
}
if (fedbuffer.headerType() == sistrip::HEADER_TYPE_INVALID) {
warnings_.add("Invalid header type for FED, skipping", fmt::format("id {0}", *ifed));
warnings_.add("Invalid header type for FED, skipping", std::format("id {0}", *ifed));
continue;
}

Expand Down
Loading