Skip to content

Commit f3c78cf

Browse files
committed
PHOS calibrations check file path in device init
1 parent d93b2f2 commit f3c78cf

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

Detectors/PHOS/calib/src/PHOSEnergyCalibDevice.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ void PHOSEnergyCalibDevice::init(o2::framework::InitContext& ic)
3838
mEDigMin = ic.options().get<float>("ecalibdigitmin");
3939
mECluMin = ic.options().get<float>("ecalibclumin");
4040

41+
if (mOutputDir.compare("/dev/null")) {
42+
mOutputDir = o2::utils::Str::rectifyDirectory(mOutputDir);
43+
}
44+
if (mMetaFileDir.compare("/dev/null")) {
45+
mMetaFileDir = o2::utils::Str::rectifyDirectory(mMetaFileDir);
46+
}
47+
4148
LOG(info) << "Energy calibration options";
4249
LOG(info) << " output-dif=" << mOutputDir;
4350
bool toFillDigits = mOutputDir.compare("/dev/null");

Detectors/PHOS/calib/src/PHOSRunbyrunCalibDevice.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ void PHOSRunbyrunCalibDevice::init(o2::framework::InitContext& ic)
2727
o2::base::GRPGeomHelper::instance().setRequest(mCCDBRequest);
2828
mCalibrator.reset(new PHOSRunbyrunCalibrator());
2929

30+
if (mOutputDir.compare("/dev/null")) {
31+
mOutputDir = o2::utils::Str::rectifyDirectory(mOutputDir);
32+
}
33+
if (mMetaFileDir.compare("/dev/null")) {
34+
mMetaFileDir = o2::utils::Str::rectifyDirectory(mMetaFileDir);
35+
}
36+
3037
// mCalibrator->setSlotLength(slotL);
3138
// mCalibrator->setMaxSlotsDelay(delay);
3239
mCalibrator->setUpdateAtTheEndOfRunOnly();

Detectors/PHOS/calib/src/phos-calib-workflow.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
6868

6969
bool writeRootOutput = !configcontext.options().get<bool>("disable-root-output");
7070
std::string outputDir = configcontext.options().get<std::string>("phoscalib-output-dir");
71-
if (outputDir.compare("/dev/null")) {
72-
outputDir = o2::utils::Str::rectifyDirectory(outputDir);
73-
} else {
71+
if (!outputDir.compare("/dev/null")) {
7472
writeRootOutput = false;
7573
}
7674
std::string metaFileDir = configcontext.options().get<std::string>("phoscalib-meta-output-dir");
77-
if (metaFileDir.compare("/dev/null")) {
78-
metaFileDir = o2::utils::Str::rectifyDirectory(metaFileDir);
79-
}
8075

8176
if (doPedestals && doHgLgRatio) {
8277
LOG(fatal) << "Can not run pedestal and HG/LG calibration simulteneously";

0 commit comments

Comments
 (0)