Skip to content

Commit 8698396

Browse files
committed
Detectors: make sure fmt 10.1.1 is supported
1 parent a3ebb09 commit 8698396

File tree

38 files changed

+51
-48
lines changed

38 files changed

+51
-48
lines changed

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/EncodedBlocks.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ class EncodedBlocks
402402
if (getANSHeader() == ANSVersionUnspecified) {
403403
rans::DenseHistogram<source_T> histogram{block.getDict(), block.getDict() + block.getNDict(), metadata.min};
404404
size_t renormingBits = rans::utils::sanitizeRenormingBitRange(metadata.probabilityBits);
405-
LOG_IF(debug, renormingBits != metadata.probabilityBits) << fmt::format("While reading metadata from external dictionary, rANSV1 is rounding renorming precision from {} to {}");
405+
LOG_IF(debug, renormingBits != metadata.probabilityBits)
406+
<< fmt::format("While reading metadata from external dictionary, rANSV1 is rounding renorming precision from {} to {}", metadata.probabilityBits, renormingBits);
406407
return rans::renorm(std::move(histogram), renormingBits, rans::RenormingPolicy::ForceIncompressible);
407408
} else {
408409
// dictionary is elias-delta coded inside the block

DataFormats/Detectors/GlobalTracking/include/DataFormatsGlobalTracking/RecoContainerCreateTracksVariadic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void o2::globaltracking::RecoContainer::createTracksVariadic(T creator, GTrackID
285285
if (srcSel[currentSource]) {
286286
if (matchesTPCTOF.size() && !tracksTPCTOF.size()) {
287287
throw std::runtime_error(fmt::format("TPC-TOF matched tracks ({}) require TPCTOF matches ({}) and TPCTOF tracks ({})",
288-
matchesTPCTOF.size(), tracksTPCTOF.size()));
288+
-1, matchesTPCTOF.size(), tracksTPCTOF.size()));
289289
}
290290
for (unsigned i = 0; i < matchesTPCTOF.size(); i++) {
291291
const auto& match = matchesTPCTOF[i];
@@ -321,7 +321,7 @@ void o2::globaltracking::RecoContainer::createTracksVariadic(T creator, GTrackID
321321
if (srcSel[currentSource]) {
322322
if (matchesMCHMID.size() && !tracksMCH.size()) {
323323
throw std::runtime_error(fmt::format("MCH-MID matched tracks ({}) require MCHMID matches ({}) and MCH tracks ({})",
324-
matchesMCHMID.size(), tracksMCH.size()));
324+
-1, matchesMCHMID.size(), tracksMCH.size()));
325325
}
326326
for (unsigned i = 0; i < matchesMCHMID.size(); i++) {
327327
const auto& match = matchesMCHMID[i];

DataFormats/Parameters/src/GRPTool.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ bool publish(std::string const& filename, std::string const& path, std::string C
205205
try {
206206
o2::utils::createDirectoriesIfAbsent(targetdir);
207207
} catch (std::exception e) {
208-
LOGP(error, fmt::format("Could not create local snapshot cache directory {}, reason: {}", targetdir, e.what()));
208+
LOGP(error, "Could not create local snapshot cache directory {}, reason: {}", targetdir, e.what());
209209
return false;
210210
}
211211

Detectors/CTF/workflow/src/ctf-reader-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
134134
int rateLimitingIPCID = std::stoi(configcontext.options().get<std::string>("timeframes-rate-limit-ipcid"));
135135
std::string chanFmt = configcontext.options().get<std::string>("metric-feedback-channel-format");
136136
if (rateLimitingIPCID > -1 && !chanFmt.empty()) {
137-
ctfInput.metricChannel = fmt::format(chanFmt, o2::framework::ChannelSpecHelpers::defaultIPCFolder(), rateLimitingIPCID);
137+
ctfInput.metricChannel = fmt::format(fmt::runtime(chanFmt), o2::framework::ChannelSpecHelpers::defaultIPCFolder(), rateLimitingIPCID);
138138
}
139139

140140
specs.push_back(o2::ctf::getCTFReaderSpec(ctfInput));

Detectors/DCS/src/AliasExpander.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ std::vector<std::string> extractRange(std::string range)
8282
std::vector<std::string> result;
8383

8484
for (auto i = a; i <= b; i++) {
85-
auto substituted = fmt::format(intFormat, i);
85+
auto substituted = fmt::format(fmt::runtime(intFormat), i);
8686
result.push_back(substituted);
8787
}
8888
return result;
@@ -124,7 +124,7 @@ std::vector<std::string> expandAlias(const std::string& pattern)
124124
std::vector<std::string> result;
125125

126126
for (auto r : range) {
127-
auto substituted = fmt::format(newPattern, r);
127+
auto substituted = fmt::format(fmt::runtime(newPattern), r);
128128
result.emplace_back(substituted);
129129
}
130130

Detectors/EMCAL/base/src/RCUTrailer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void RCUTrailer::setTimeSamplePhaseNS(uint64_t triggertime, uint64_t timesample)
172172
sample = 2;
173173
break;
174174
default:
175-
throw Error(Error::ErrorType_t::SAMPLINGFREQ_INVALID, fmt::format("invalid time sample: {:f}", timesample).data());
175+
throw Error(Error::ErrorType_t::SAMPLINGFREQ_INVALID, fmt::format(fmt::runtime("invalid time sample: {:f}"), timesample).data());
176176
};
177177
mAltroConfig.mSampleTime = sample;
178178
// calculate L1 phase
@@ -275,4 +275,4 @@ std::ostream& o2::emcal::operator<<(std::ostream& stream, const o2::emcal::RCUTr
275275
{
276276
trailer.printStream(stream);
277277
return stream;
278-
}
278+
}

Detectors/HMPID/calibration/src/HMPIDDCSProcessor.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ double HMPIDDCSProcessor::calculatePhotonEnergy(int i)
395395
if (dp.id.get_type() == DeliveryType::DPVAL_DOUBLE) {
396396
lambda = o2::dcs::getValue<double>(dp);
397397
} else {
398-
LOGP(warn, "DP type is {}", dp.id.get_type());
398+
LOGP(warn, "DP type is {}", (int)dp.id.get_type());
399399
LOGP(warn, "Not correct datatype for HMP_TRANPLANT_MEASURE_{}_WAVELENGTH --> Default wavelength used for iteration procTrans{}", i, i);
400400
lambda = arrWaveLenDefault[i];
401401
}

Detectors/ITSMFT/MFT/alignment/src/MillePede2.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ int MillePede2::SolveGlobalMatEq()
13841384
if (fgIterSol == MinResSolve::kSolFGMRes) {
13851385
res = slv->SolveFGMRES(sol, fgMinResCondType, fgMinResMaxIter, fgMinResTol, fgNKrylovV);
13861386
} else {
1387-
LOGF(warning, "MillePede2 - Undefined Iteritive Solver ID=%d, only %d are defined", fgIterSol, MinResSolve::kNSolvers);
1387+
LOGF(warning, "MillePede2 - Undefined Iteritive Solver ID=%d, only %d are defined", fgIterSol, (int)MinResSolve::kNSolvers);
13881388
}
13891389
}
13901390

Detectors/ITSMFT/common/reconstruction/src/PixelData.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ std::string ChipPixelData::getErrorDetails(int pos) const
4848
std::string rbuf = ": 0x<";
4949
int nc = getNBytesInRawBuff();
5050
for (int i = 0; i < nc; i++) {
51-
rbuf += fmt::format(i ? " {:02x}" : "{:02x}", (int)getRawErrBuff()[i]);
51+
rbuf += fmt::format(fmt::runtime(i ? " {:02x}" : "{:02x}"), (int)getRawErrBuff()[i]);
5252
}
5353
rbuf += '>';
5454
return rbuf;

Detectors/ITSMFT/common/reconstruction/src/RUInfo.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ std::string ChipInfo::asString() const
3535

3636
void ChipInfo::print() const
3737
{
38-
LOGP(info, asString());
38+
LOGP(info, fmt::runtime(asString()));
3939
}

0 commit comments

Comments
 (0)