Skip to content

Commit d55d5d4

Browse files
authored
Swtich to lowercase log levels for new FairLogger (GPU) (#7706)
1 parent 9464a70 commit d55d5d4

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

GPU/TPCFastTransformation/TPCFastTransform.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int TPCFastTransform::writeToFile(std::string outFName, std::string name)
167167
}
168168
TFile outf(outFName.data(), "recreate");
169169
if (outf.IsZombie()) {
170-
LOG(ERROR) << "Failed to open output file " << outFName;
170+
LOG(error) << "Failed to open output file " << outFName;
171171
return -1;
172172
}
173173

@@ -195,16 +195,16 @@ TPCFastTransform* TPCFastTransform::loadFromFile(std::string inpFName, std::stri
195195
}
196196
TFile inpf(inpFName.data());
197197
if (inpf.IsZombie()) {
198-
LOG(ERROR) << "Failed to open input file " << inpFName;
198+
LOG(error) << "Failed to open input file " << inpFName;
199199
return nullptr;
200200
}
201201
TPCFastTransform* transform = reinterpret_cast<TPCFastTransform*>(inpf.GetObjectChecked(name.data(), TPCFastTransform::Class()));
202202
if (!transform) {
203-
LOG(ERROR) << "Failed to load " << name << " from " << inpFName;
203+
LOG(error) << "Failed to load " << name << " from " << inpFName;
204204
return nullptr;
205205
}
206206
if (transform->mFlatBufferSize > 0 && transform->mFlatBufferContainer == nullptr) {
207-
LOG(ERROR) << "Failed to load " << name << " from " << inpFName << ": empty flat buffer container";
207+
LOG(error) << "Failed to load " << name << " from " << inpFName << ": empty flat buffer container";
208208
return nullptr;
209209
}
210210
transform->setActualBufferAddress(transform->mFlatBufferContainer);

GPU/Utils/FlatObject.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ inline int FlatObject::writeToFile(T& obj, TFile& outf, const char* name)
478478
assert(obj.isConstructed());
479479

480480
if (outf.IsZombie()) {
481-
LOG(ERROR) << "Failed to write to file " << outf.GetName();
481+
LOG(error) << "Failed to write to file " << outf.GetName();
482482
return -1;
483483
}
484484

@@ -499,16 +499,16 @@ inline T* FlatObject::readFromFile(TFile& inpf, const char* name)
499499
/// read from file
500500

501501
if (inpf.IsZombie()) {
502-
LOG(ERROR) << "Failed to read from file " << inpf.GetName();
502+
LOG(error) << "Failed to read from file " << inpf.GetName();
503503
return nullptr;
504504
}
505505
T* pobj = reinterpret_cast<T*>(inpf.GetObjectChecked(name, T::Class()));
506506
if (!pobj) {
507-
LOG(ERROR) << "Failed to load " << name << " from " << inpf.GetName();
507+
LOG(error) << "Failed to load " << name << " from " << inpf.GetName();
508508
return nullptr;
509509
}
510510
if (pobj->mFlatBufferSize > 0 && pobj->mFlatBufferContainer == nullptr) {
511-
LOG(ERROR) << "Failed to load " << name << " from " << inpf.GetName() << ": empty flat buffer container";
511+
LOG(error) << "Failed to load " << name << " from " << inpf.GetName() << ": empty flat buffer container";
512512
return nullptr;
513513
}
514514
pobj->setActualBufferAddress(pobj->mFlatBufferContainer);

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
154154
auto& hbfu = o2::raw::HBFUtils::Instance();
155155
processAttributes->tfSettings.simStartOrbit = hbfu.getFirstIRofTF(o2::InteractionRecord(0, hbfu.orbitFirstSampled)).orbit;
156156

157-
LOG(INFO) << "Initializing run paramerers from GRP bz=" << config.configGRP.solenoidBz << " cont=" << grp->isDetContinuousReadOut(o2::detectors::DetID::TPC);
157+
LOG(info) << "Initializing run paramerers from GRP bz=" << config.configGRP.solenoidBz << " cont=" << grp->isDetContinuousReadOut(o2::detectors::DetID::TPC);
158158

159159
confParam = config.ReadConfigurableParam();
160160
processAttributes->allocateOutputOnTheFly = confParam.allocateOutputOnTheFly;
@@ -165,7 +165,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
165165
#ifdef GPUCA_BUILD_EVENT_DISPLAY
166166
processAttributes->displayBackend.reset(new GPUDisplayBackendGlfw);
167167
config.configProcessing.eventDisplay = processAttributes->displayBackend.get();
168-
LOG(INFO) << "Event display enabled";
168+
LOG(info) << "Event display enabled";
169169
#else
170170
throw std::runtime_error("Standalone Event Display not enabled at build time!");
171171
#endif
@@ -178,7 +178,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
178178
int myId = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
179179
int idMax = ic.services().get<const o2::framework::DeviceSpec>().maxInputTimeslices;
180180
config.configProcessing.deviceNum = myId;
181-
LOG(INFO) << "GPU device number selected from pipeline id: " << myId << " / " << idMax;
181+
LOG(info) << "GPU device number selected from pipeline id: " << myId << " / " << idMax;
182182
}
183183
if (config.configProcessing.debugLevel >= 3 && processAttributes->verbosity == 0) {
184184
processAttributes->verbosity = 1;
@@ -270,12 +270,12 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
270270
config.configCalib.dEdxCorrection = processAttributes->dEdxCorrection.get();
271271

272272
if (std::filesystem::exists(confParam.gainCalibFile)) {
273-
LOG(INFO) << "Loading tpc gain correction from file " << confParam.gainCalibFile;
273+
LOG(info) << "Loading tpc gain correction from file " << confParam.gainCalibFile;
274274
const auto* gainMap = o2::tpc::utils::readCalPads(confParam.gainCalibFile, "GainMap")[0];
275275
processAttributes->tpcPadGainCalib = GPUO2Interface::getPadGainCalib(*gainMap);
276276
} else {
277277
if (not confParam.gainCalibFile.empty()) {
278-
LOG(WARN) << "Couldn't find tpc gain correction file " << confParam.gainCalibFile << ". Not applying any gain correction.";
278+
LOG(warn) << "Couldn't find tpc gain correction file " << confParam.gainCalibFile << ". Not applying any gain correction.";
279279
}
280280
processAttributes->tpcPadGainCalib = GPUO2Interface::getPadGainCalibDefault();
281281
}
@@ -418,7 +418,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
418418
offset += tpcZSonTheFlySizes[i * NEndpoints + j];
419419
}
420420
if (verbosity >= 1) {
421-
LOG(INFO) << "GOT ZS on the fly pages FOR SECTOR " << i << " -> pages: " << pageSector;
421+
LOG(info) << "GOT ZS on the fly pages FOR SECTOR " << i << " -> pages: " << pageSector;
422422
}
423423
}
424424
}
@@ -533,7 +533,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
533533
region.allocator = [name, &buffer, &pc, outputSpec = std::move(outputSpec), verbosity, offset](size_t size) -> void* {
534534
size += offset;
535535
if (verbosity) {
536-
LOG(INFO) << "ALLOCATING " << size << " bytes for " << std::get<DataOrigin>(outputSpec).template as<std::string>() << "/" << std::get<DataDescription>(outputSpec).template as<std::string>() << "/" << std::get<2>(outputSpec);
536+
LOG(info) << "ALLOCATING " << size << " bytes for " << std::get<DataOrigin>(outputSpec).template as<std::string>() << "/" << std::get<DataDescription>(outputSpec).template as<std::string>() << "/" << std::get<2>(outputSpec);
537537
}
538538
std::chrono::time_point<std::chrono::high_resolution_clock> start, end;
539539
if (verbosity) {
@@ -543,7 +543,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
543543
if (verbosity) {
544544
end = std::chrono::high_resolution_clock::now();
545545
std::chrono::duration<double> elapsed_seconds = end - start;
546-
LOG(INFO) << "Allocation time for " << name << " (" << size << " bytes)" << ": " << elapsed_seconds.count() << "s";
546+
LOG(info) << "Allocation time for " << name << " (" << size << " bytes)" << ": " << elapsed_seconds.count() << "s";
547547
}
548548
return (buffer.second = buffer.first->get().data()) + offset;
549549
};
@@ -630,7 +630,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
630630
bool createEmptyOutput = false;
631631
if (retVal != 0) {
632632
if (retVal == 3 && processAttributes->config->configProcessing.ignoreNonFatalGPUErrors) {
633-
LOG(ERROR) << "GPU Reconstruction aborted with non fatal error code, ignoring";
633+
LOG(error) << "GPU Reconstruction aborted with non fatal error code, ignoring";
634634
createEmptyOutput = true;
635635
} else {
636636
throw std::runtime_error("tracker returned error code " + std::to_string(retVal));
@@ -688,7 +688,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
688688
}
689689
}
690690

691-
LOG(INFO) << "found " << ptrs.nOutputTracksTPCO2 << " track(s)";
691+
LOG(info) << "found " << ptrs.nOutputTracksTPCO2 << " track(s)";
692692

693693
if (specconfig.outputCompClusters) {
694694
CompressedClustersROOT compressedClusters = *ptrs.tpcCompressedClusters;
@@ -746,7 +746,7 @@ DataProcessorSpec getGPURecoWorkflowSpec(gpuworkflow::CompletionPolicyData* poli
746746
processAttributes->qa->cleanup();
747747
}
748748
timer.Stop();
749-
LOG(INFO) << "GPU Reoncstruction time for this TF " << timer.CpuTime() - cput << " s (cpu), " << timer.RealTime() - realt << " s (wall)";
749+
LOG(info) << "GPU Reoncstruction time for this TF " << timer.CpuTime() - cput << " s (cpu), " << timer.RealTime() - realt << " s (wall)";
750750
};
751751

752752
return processingFct;

0 commit comments

Comments
 (0)