Skip to content

Commit 444aebe

Browse files
committed
Forlogger migration of more expressions, not caught in first regex
1 parent d426ef8 commit 444aebe

16 files changed

Lines changed: 70 additions & 70 deletions

File tree

Common/Utils/src/FileFetcher.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ FileFetcher::FileFetcher(const std::string& input, const std::string& selRegex,
4646
// parse input list
4747
mCopyDirName = o2::utils::Str::create_unique_path(mCopyDirName, 8);
4848
processInput(input);
49-
LOGP(INFO, "Input contains {} files, {} remote", getNFiles(), mNRemote);
49+
LOGP(info, "Input contains {} files, {} remote", getNFiles(), mNRemote);
5050
if (mNRemote) {
5151
if (mNoRemoteCopy) { // make sure the copy command is provided, unless copy was explicitly forbidden
52-
LOGP(INFO, "... but their local copying is explicitly forbidden");
52+
LOGP(info, "... but their local copying is explicitly forbidden");
5353
} else {
5454
if (mCopyCmd.find("?src") == std::string::npos || mCopyCmd.find("?dst") == std::string::npos) {
5555
throw std::runtime_error(fmt::format("remote files asked but copy cmd \"{}\" is not valid", mCopyCmd));
@@ -60,7 +60,7 @@ FileFetcher::FileFetcher(const std::string& input, const std::string& selRegex,
6060
throw std::runtime_error(fmt::format("failed to create scratch directory {}", mCopyDirName));
6161
}
6262
mCopyCmdLogFile = fmt::format("{}/{}", mCopyDirName, "copy-cmd.log");
63-
LOGP(INFO, "FileFetcher tmp scratch directory is set to {}", mCopyDirName);
63+
LOGP(info, "FileFetcher tmp scratch directory is set to {}", mCopyDirName);
6464
}
6565
}
6666
}
@@ -90,7 +90,7 @@ void FileFetcher::processInput(const std::vector<std::string>& input)
9090
} else if (mSelRegex && !std::regex_match(inp, *mSelRegex.get())) { // provided selector does not match, treat as a txt file with list
9191
std::ifstream listFile(inp);
9292
if (!listFile.good()) {
93-
LOGP(ERROR, "file {} pretends to be a list of inputs but does not exist", inp);
93+
LOGP(error, "file {} pretends to be a list of inputs but does not exist", inp);
9494
continue;
9595
}
9696
std::string line;
@@ -141,7 +141,7 @@ bool FileFetcher::addInputFile(const std::string& fname)
141141
} else if (fs::exists(fname)) { // local file
142142
mInputFiles.emplace_back(FileRef{fname, "", false, false});
143143
} else {
144-
LOGP(ERROR, "file {} pretends to be local but does not exist", fname);
144+
LOGP(error, "file {} pretends to be local but does not exist", fname);
145145
return false;
146146
}
147147
return true;
@@ -227,7 +227,7 @@ void FileFetcher::cleanup()
227227
try {
228228
fs::remove_all(mCopyDirName);
229229
} catch (...) {
230-
LOGP(ERROR, "FileFetcher failed to remove sctrach directory {}", mCopyDirName);
230+
LOGP(error, "FileFetcher failed to remove sctrach directory {}", mCopyDirName);
231231
}
232232
}
233233
}
@@ -260,7 +260,7 @@ void FileFetcher::fetcher()
260260
while (mRunning) {
261261
mNLoops = mNFilesProc / getNFiles();
262262
if (mNLoops > mMaxLoops) {
263-
LOGP(INFO, "Finished file fetching: {} of {} files fetched successfully in {} iterations", mNFilesProcOK, mNFilesProc, mMaxLoops);
263+
LOGP(info, "Finished file fetching: {} of {} files fetched successfully in {} iterations", mNFilesProcOK, mNFilesProc, mMaxLoops);
264264
mRunning = false;
265265
break;
266266
}
@@ -312,14 +312,14 @@ bool FileFetcher::copyFile(size_t id)
312312
std::vector<std::string> copyParams{"-c", realCmd};
313313
bp::child copyChild(bp::search_path("sh"), copyParams, bp::std_err > mCopyCmdLogFile, bp::std_out > mCopyCmdLogFile);
314314
while (!copyChild.wait_for(5s)) {
315-
LOGP(INFO, "FileFetcher: waiting for copy command. cmd={}", realCmd);
315+
LOGP(info, "FileFetcher: waiting for copy command. cmd={}", realCmd);
316316
}
317317
const auto sysRet = copyChild.exit_code();
318318
if (sysRet != 0) {
319-
LOGP(WARNING, "FileFetcher: non-zero exit code {} for cmd={}", sysRet, realCmd);
319+
LOGP(warning, "FileFetcher: non-zero exit code {} for cmd={}", sysRet, realCmd);
320320
}
321321
if (!fs::is_regular_file(mInputFiles[id].getLocalName()) || fs::is_empty(mInputFiles[id].getLocalName())) {
322-
LOGP(ERROR, "FileFetcher: failed for copy command {}", realCmd);
322+
LOGP(error, "FileFetcher: failed for copy command {}", realCmd);
323323
return false;
324324
}
325325
mCopied[mInputFiles[id].getLocalName()] = id + 1;

Detectors/TPC/calibration/SpacePoints/src/TrackInterpolation.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void TrackInterpolation::interpolateTrack(int iSeed)
167167
// TODO: check if reset of covariance matrix is needed here (or, in case TOF point is not available at outermost TRD layer)
168168
if (!trkWork.update(clTOFYZ, clTOFCov)) {
169169
LOG(debug) << "Failed to update extrapolated ITS track with TOF cluster";
170-
//LOGF(INFO, "trkWork.y=%f, cl.y=%f, trkWork.z=%f, cl.z=%f", trkWork.getY(), clTOFYZ[0], trkWork.getZ(), clTOFYZ[1]);
170+
//LOGF(info, "trkWork.y=%f, cl.y=%f, trkWork.z=%f, cl.z=%f", trkWork.getY(), clTOFYZ[0], trkWork.getZ(), clTOFYZ[1]);
171171
return;
172172
}
173173
}

Detectors/TPC/calibration/src/IDCAverageGroup.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ void o2::tpc::IDCAverageGroup<Type>::updatePadStatusMapFromFile(const char* file
106106
CalDet<PadFlags>* padStatus{nullptr};
107107
inpfile.GetObject(objName, padStatus);
108108
if (!padStatus) {
109-
LOG(FATAL) << "No valid pad flag object was loaded";
109+
LOG(fatal) << "No valid pad flag object was loaded";
110110
return;
111111
}
112112

113113
const auto type = padStatus->getPadSubset();
114114
if (type != PadSubset::Region) {
115-
LOG(FATAL) << "Wrong pad subset type! Type must be PadSubset::Region";
115+
LOG(fatal) << "Wrong pad subset type! Type must be PadSubset::Region";
116116
return;
117117
}
118118
mPadStatus.reset(padStatus);
@@ -363,7 +363,7 @@ bool o2::tpc::IDCAverageGroup<Type>::setFromFile(const char* fileName, const cha
363363
idcAverageGroupTmp = reinterpret_cast<Temp*>(inpf.GetObjectChecked(name, Temp::Class()));
364364

365365
if (!idcAverageGroupTmp) {
366-
LOGP(ERROR, "Failed to load {} from {}", name, inpf.GetName());
366+
LOGP(error, "Failed to load {} from {}", name, inpf.GetName());
367367
return false;
368368
}
369369
this->setIDCs(idcAverageGroupTmp->getIDCsUngrouped());

Detectors/TPC/spacecharge/include/TPCSpaceCharge/DataContainer3D.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ template <typename DataT>
128128
int DataContainer3D<DataT>::writeToFile(TFile& outf, const char* name) const
129129
{
130130
if (outf.IsZombie()) {
131-
LOGP(ERROR, "Failed to write to file: {}", outf.GetName());
131+
LOGP(error, "Failed to write to file: {}", outf.GetName());
132132
return -1;
133133
}
134134
outf.WriteObjectAny(this, DataContainer3D<DataT>::Class(), name);
@@ -140,20 +140,20 @@ template <typename DataT>
140140
bool DataContainer3D<DataT>::initFromFile(TFile& inpf, const char* name)
141141
{
142142
if (inpf.IsZombie()) {
143-
LOGP(ERROR, "Failed to read from file: {}", inpf.GetName());
143+
LOGP(error, "Failed to read from file: {}", inpf.GetName());
144144
return false;
145145
}
146146
DataContainer3D<DataT>* dataCont{nullptr};
147147
dataCont = reinterpret_cast<DataContainer3D<DataT>*>(inpf.GetObjectChecked(name, DataContainer3D<DataT>::Class()));
148148

149149
if (!dataCont) {
150-
LOGP(ERROR, "Failed to load {} from {}", name, inpf.GetName());
150+
LOGP(error, "Failed to load {} from {}", name, inpf.GetName());
151151
return false;
152152
}
153153

154154
if (mZVertices != dataCont->getNZ() || mRVertices != dataCont->getNR() || mPhiVertices != dataCont->getNPhi()) {
155-
LOGP(ERROR, "Data from input file has different definition of vertices!");
156-
LOGP(ERROR, "set vertices before creating the sc object to: SpaceCharge<>::setGrid({}, {}, {})", dataCont->getNZ(), dataCont->getNR(), dataCont->getNPhi());
155+
LOGP(error, "Data from input file has different definition of vertices!");
156+
LOGP(error, "set vertices before creating the sc object to: SpaceCharge<>::setGrid({}, {}, {})", dataCont->getNZ(), dataCont->getNR(), dataCont->getNPhi());
157157
delete dataCont;
158158
return false;
159159
}
@@ -167,14 +167,14 @@ template <typename DataT>
167167
DataContainer3D<DataT>* DataContainer3D<DataT>::loadFromFile(TFile& inpf, const char* name)
168168
{
169169
if (inpf.IsZombie()) {
170-
LOGP(ERROR, "Failed to read from file {}", inpf.GetName());
170+
LOGP(error, "Failed to read from file {}", inpf.GetName());
171171
return nullptr;
172172
}
173173
DataContainer3D<DataT>* dataCont{nullptr};
174174

175175
dataCont = reinterpret_cast<DataContainer3D<DataT>*>(inpf.GetObjectChecked(name, DataContainer3D<DataT>::Class()));
176176
if (!dataCont) {
177-
LOGP(ERROR, "Failed to load {} from {}", name, inpf.GetName());
177+
LOGP(error, "Failed to load {} from {}", name, inpf.GetName());
178178
return nullptr;
179179
}
180180
return dataCont;

Detectors/TPC/spacecharge/src/PoissonSolver.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ void PoissonSolver<DataT>::poissonMultiGrid2D(DataContainer& matricesV, const Da
7070

7171
//Check that number of mParamGrid.NRVertices and mParamGrid.NZVertices is suitable for multi grid
7272
if (!isPowerOfTwo(mParamGrid.NRVertices - 1)) {
73-
LOGP(ERROR, "PoissonMultiGrid2D: PoissonMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
73+
LOGP(error, "PoissonMultiGrid2D: PoissonMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
7474
return;
7575
}
7676
if (!isPowerOfTwo(mParamGrid.NZVertices - 1)) {
77-
LOGP(ERROR, "PoissonMultiGrid2D: PoissonMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
77+
LOGP(error, "PoissonMultiGrid2D: PoissonMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
7878
return;
7979
}
8080

@@ -198,15 +198,15 @@ void PoissonSolver<DataT>::poissonMultiGrid3D2D(DataContainer& matricesV, const
198198

199199
// Check that the number of mParamGrid.NRVertices and mParamGrid.NZVertices is suitable for a binary expansion
200200
if (!isPowerOfTwo((mParamGrid.NRVertices - 1))) {
201-
LOGP(ERROR, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
201+
LOGP(error, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
202202
return;
203203
}
204204
if (!isPowerOfTwo((mParamGrid.NZVertices - 1))) {
205-
LOGP(ERROR, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
205+
LOGP(error, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
206206
return;
207207
}
208208
if (mParamGrid.NPhiVertices <= 3) {
209-
LOGP(ERROR, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NPhiVertices. Must be larger than 3");
209+
LOGP(error, "PoissonMultiGrid3D2D: Poisson3DMultiGrid - Error in the number of mParamGrid.NPhiVertices. Must be larger than 3");
210210
return;
211211
}
212212

@@ -348,15 +348,15 @@ void PoissonSolver<DataT>::poissonMultiGrid3D(DataContainer& matricesV, const Da
348348

349349
// Check that the number of mParamGrid.NRVertices and mParamGrid.NZVertices is suitable for a binary expansion
350350
if (!isPowerOfTwo((mParamGrid.NRVertices - 1))) {
351-
LOGP(ERROR, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
351+
LOGP(error, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NRVertices. Must be 2**M + 1");
352352
return;
353353
}
354354
if (!isPowerOfTwo((mParamGrid.NZVertices - 1))) {
355-
LOGP(ERROR, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
355+
LOGP(error, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NZVertices. Must be 2**N + 1");
356356
return;
357357
}
358358
if (mParamGrid.NPhiVertices <= 3) {
359-
LOGP(ERROR, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NPhiVertices. Must be larger than 3");
359+
LOGP(error, "PoissonMultiGrid3D: Poisson3DMultiGrid - Error in the number of mParamGrid.NPhiVertices. Must be larger than 3");
360360
return;
361361
}
362362

Detectors/TPC/spacecharge/src/SpaceCharge.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void SpaceCharge<DataT>::calculateDistortionsCorrections(const o2::tpc::Side sid
5858
using timer = std::chrono::high_resolution_clock;
5959
using SC = o2::tpc::SpaceCharge<DataT>;
6060
if (!mIsChargeSet[side]) {
61-
LOGP(ERROR, "the charge is not set!");
61+
LOGP(error, "the charge is not set!");
6262
}
6363

6464
const std::array<std::string, 2> sglobalType{"local distortion/correction interpolator", "Electric fields"};
@@ -772,7 +772,7 @@ typename SpaceCharge<DataT>::TH3DataT SpaceCharge<DataT>::rebinDensityHisto(cons
772772
do {
773773
zLowBinOrig += 1;
774774
if (zLowBinOrig > zUpBinOrig) {
775-
LOGP(WARNING, "SOMETHING WENT WRONG: SETTING BINS TO: {}", zUpBinOrig);
775+
LOGP(warning, "SOMETHING WENT WRONG: SETTING BINS TO: {}", zUpBinOrig);
776776
zLowBinOrig = zUpBinOrig;
777777
notequal = false;
778778
}
@@ -789,7 +789,7 @@ typename SpaceCharge<DataT>::TH3DataT SpaceCharge<DataT>::rebinDensityHisto(cons
789789
do {
790790
zUpBinOrig -= 1;
791791
if (zUpBinOrig < zLowBinOrig) {
792-
LOGP(WARNING, "SOMETHING WENT WRONG: SETTING BINS TO: {}", zLowBinOrig);
792+
LOGP(warning, "SOMETHING WENT WRONG: SETTING BINS TO: {}", zLowBinOrig);
793793
zUpBinOrig = zLowBinOrig;
794794
notequal = false;
795795
}
@@ -1112,13 +1112,13 @@ void SpaceCharge<DataT>::calcGlobalDistortions(const Fields& formulaStruct, cons
11121112

11131113
for (;;) {
11141114
if (iter > maxIterations) {
1115-
LOGP(ERROR, "Aborting calculation of distortions for iZ: {}, iR: {}, iPhi: {} due to iteration '{}' > maxIterations '{}'!", iZ, iR, iPhi, iter, maxIterations);
1115+
LOGP(error, "Aborting calculation of distortions for iZ: {}, iR: {}, iPhi: {} due to iteration '{}' > maxIterations '{}'!", iZ, iR, iPhi, iter, maxIterations);
11161116
break;
11171117
}
11181118
const DataT z0Tmp = z0 + dzDist + iter * stepSize; // starting z position
11191119

11201120
if (getSide(z0Tmp) != side) {
1121-
LOGP(ERROR, "Aborting calculation of distortions for iZ: {}, iR: {}, iPhi: {} due to change in the sides!", iZ, iR, iPhi);
1121+
LOGP(error, "Aborting calculation of distortions for iZ: {}, iR: {}, iPhi: {} due to change in the sides!", iZ, iR, iPhi);
11221122
break;
11231123
}
11241124

Detectors/TPC/workflow/src/CalibProcessingHelper.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ uint64_t calib_processing_helper::processRawData(o2::framework::InputRecord& inp
138138
}
139139

140140
} catch (const std::exception& e) {
141-
LOGP(ERROR, "EXCEPTIION in processRawData: {} -> skipping part:{}/{} of spec:{}/{}/{}, size:{}", e.what(), dh->splitPayloadIndex, dh->splitPayloadParts,
141+
LOGP(error, "EXCEPTIION in processRawData: {} -> skipping part:{}/{} of spec:{}/{}/{}, size:{}", e.what(), dh->splitPayloadIndex, dh->splitPayloadParts,
142142
dh->dataOrigin, dh->dataDescription, subSpecification, dh->payloadSize);
143143
errorCount++;
144144
continue;

Detectors/TPC/workflow/src/ClusterSharingMapSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ void ClusterSharingMapSpec::run(ProcessingContext& pc)
3636
o2::gpu::GPUO2InterfaceRefit::fillSharedClustersMap(&clustersTPC->clusterIndex, tracksTPC, tracksTPCClRefs.data(), bufVec.data());
3737

3838
timer.Stop();
39-
LOGF(INFO, "Timing for TPC clusters sharing map creation: Cpu: %.3e Real: %.3e s", timer.CpuTime(), timer.RealTime());
39+
LOGF(info, "Timing for TPC clusters sharing map creation: Cpu: %.3e Real: %.3e s", timer.CpuTime(), timer.RealTime());
4040
}

Detectors/TPC/workflow/src/EntropyDecoderSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void EntropyDecoderSpec::run(ProcessingContext& pc)
5353

5454
void EntropyDecoderSpec::endOfStream(EndOfStreamContext& ec)
5555
{
56-
LOGF(INFO, "TPC Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
56+
LOGF(info, "TPC Entropy Decoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
5757
mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
5858
}
5959

Detectors/TPC/workflow/src/EntropyEncoderSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void EntropyEncoderSpec::run(ProcessingContext& pc)
7171

7272
void EntropyEncoderSpec::endOfStream(EndOfStreamContext& ec)
7373
{
74-
LOGF(INFO, "TPC Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
74+
LOGF(info, "TPC Entropy Encoding total timing: Cpu: %.3e Real: %.3e s in %d slots",
7575
mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
7676
}
7777

0 commit comments

Comments
 (0)