Skip to content

Commit c1f2264

Browse files
cortesepsawenzel
authored andcommitted
More compact output
1 parent e0e7ec1 commit c1f2264

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

Detectors/ZDC/workflow/src/DigitRecoSpec.cxx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
/// @brief ZDC reconstruction
1414
/// @author pietro.cortese@cern.ch
1515

16+
#include <iostream>
1617
#include <vector>
18+
#include <string>
1719
#include "CCDB/BasicCCDBManager.h"
1820
#include "CCDB/CCDBTimeStampUtils.h"
1921
#include "Framework/Logger.h"
@@ -69,35 +71,45 @@ void DigitRecoSpec::run(ProcessingContext& pc)
6971
return;
7072
}
7173
mgr.setTimestamp(timeStamp);
74+
75+
std::string loadedConfFiles = "Loaded ZDC configuration files for timestamp " + std::to_string(timeStamp) + ":";
7276
auto* moduleConfig = mgr.get<o2::zdc::ModuleConfig>(o2::zdc::CCDBPathConfigModule);
7377
if (!moduleConfig) {
74-
LOG(FATAL) << "Missing configuration object";
78+
LOG(FATAL) << "Missing ModuleConfig ZDC configuration object";
7579
return;
80+
} else {
81+
loadedConfFiles += " ModuleConfig";
7682
}
77-
LOG(INFO) << "Loaded ZDC module configuration for timestamp " << timeStamp;
7883
if (mVerbosity > DbgZero) {
84+
LOG(INFO) << "Loaded ZDC module configuration for timestamp " << timeStamp;
7985
moduleConfig->print();
8086
}
8187

8288
// Configuration parameters for ZDC reconstruction
8389
auto* recoConfigZDC = mgr.get<o2::zdc::RecoConfigZDC>(o2::zdc::CCDBPathRecoConfigZDC);
8490
if (!recoConfigZDC) {
91+
LOG(INFO) << loadedConfFiles;
8592
LOG(FATAL) << "Missing RecoConfigZDC object";
8693
return;
94+
} else {
95+
loadedConfFiles += " RecoConfigZDC";
8796
}
88-
LOG(INFO) << "Loaded RecoConfigZDC for timestamp " << timeStamp;
8997
if (mVerbosity > DbgZero) {
98+
LOG(INFO) << "Loaded RecoConfigZDC for timestamp " << timeStamp;
9099
recoConfigZDC->print();
91100
}
92101

93102
// TDC centering
94103
auto* tdcParam = mgr.get<o2::zdc::ZDCTDCParam>(o2::zdc::CCDBPathTDCCalib);
95104
if (!tdcParam) {
105+
LOG(INFO) << loadedConfFiles;
96106
LOG(FATAL) << "Missing ZDCTDCParam calibration object";
97107
return;
108+
} else {
109+
loadedConfFiles += " ZDCTDCParam";
98110
}
99-
LOG(INFO) << "Loaded TDC centering ZDCTDCParam for timestamp " << timeStamp;
100111
if (mVerbosity > DbgZero) {
112+
LOG(INFO) << "Loaded TDC centering ZDCTDCParam for timestamp " << timeStamp;
101113
tdcParam->print();
102114
}
103115

@@ -106,8 +118,9 @@ void DigitRecoSpec::run(ProcessingContext& pc)
106118
if (!energyParam) {
107119
LOG(WARNING) << "Missing ZDCEnergyParam calibration object - using default";
108120
} else {
109-
LOG(INFO) << "Loaded Energy calibration ZDCEnergyParam for timestamp " << timeStamp;
121+
loadedConfFiles += " ZDCEnergyParam";
110122
if (mVerbosity > DbgZero) {
123+
LOG(INFO) << "Loaded Energy calibration ZDCEnergyParam for timestamp " << timeStamp;
111124
energyParam->print();
112125
}
113126
}
@@ -117,12 +130,15 @@ void DigitRecoSpec::run(ProcessingContext& pc)
117130
if (!towerParam) {
118131
LOG(WARNING) << "Missing ZDCTowerParam calibration object - using default";
119132
} else {
120-
LOG(INFO) << "Loaded Tower calibration ZDCTowerParam for timestamp " << timeStamp;
133+
loadedConfFiles += " ZDCTowerParam";
121134
if (mVerbosity > DbgZero) {
135+
LOG(INFO) << "Loaded Tower calibration ZDCTowerParam for timestamp " << timeStamp;
122136
towerParam->print();
123137
}
124138
}
125139

140+
LOG(INFO) << loadedConfFiles;
141+
126142
mDR.setModuleConfig(moduleConfig);
127143
mDR.setRecoConfigZDC(recoConfigZDC);
128144
mDR.setTDCParam(tdcParam);

0 commit comments

Comments
 (0)