Skip to content

Commit 7f8ed25

Browse files
committed
path for LHCphase ccdb configurable
1 parent 96e2f45 commit 7f8ed25

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Detectors/TOF/calibration/include/TOFCalibration/LHCClockCalibrator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ class LHCClockCalibrator final : public o2::calibration::TimeSlotCalibration<o2:
9999

100100
void setCalibTOFapi(CalibTOFapi* api) { mCalibTOFapi = api; }
101101
CalibTOFapi* getCalibTOFapi() const { return mCalibTOFapi; }
102+
const char* getPath() const { return mPath.Data(); }
103+
void setPath(const char* path) { mPath = path; }
102104

103105
private:
104106
int mMinEntries = 0;
@@ -107,6 +109,7 @@ class LHCClockCalibrator final : public o2::calibration::TimeSlotCalibration<o2:
107109
CalibTOFapi* mCalibTOFapi = nullptr;
108110
CcdbObjectInfoVector mInfoVector; // vector of CCDB Infos , each element is filled with the CCDB description of the accompanying LHCPhase
109111
LHCphaseVector mLHCphaseVector; // vector of LhcPhase, each element is filled in "process" when we finalize one slot (multiple can be finalized during the same "process", which is why we have a vector. Each element is to be considered the output of the device, and will go to the CCDB
112+
TString mPath = "TOF/Calib/LHCphaseSync";
110113

111114
#ifdef DEBUGGING
112115
int mNslot = 0;

Detectors/TOF/calibration/src/LHCClockCalibrator.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void LHCClockCalibrator::finalizeSlot(Slot& slot)
158158
l.setStartValidity(starting);
159159
l.setEndValidity(stopping);
160160

161-
mInfoVector.emplace_back("TOF/Calib/LHCphase", clName, flName, md, starting, stopping);
161+
mInfoVector.emplace_back(mPath.Data(), clName, flName, md, starting, stopping);
162162
mLHCphaseVector.emplace_back(l);
163163

164164
slot.print();

Detectors/TOF/calibration/testWorkflow/LHCClockCalibratorSpec.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ class LHCClockCalibDevice : public o2::framework::Task
5353
int nb = std::max(500, ic.options().get<int>("nbins"));
5454
auto slotL = ic.options().get<uint32_t>("tf-per-slot");
5555
auto delay = ic.options().get<uint32_t>("max-delay");
56+
std::string path = ic.options().get<std::string>("output-path");
57+
5658
mCalibrator = std::make_unique<o2::tof::LHCClockCalibrator>(minEnt, nb);
59+
mCalibrator->setPath(path.data());
5760
mCalibrator->setSlotLength(slotL);
5861
mCalibrator->setMaxSlotsDelay(delay);
5962

@@ -216,6 +219,7 @@ DataProcessorSpec getLHCClockCalibDeviceSpec(bool useCCDB)
216219
AlgorithmSpec{adaptFromTask<device>(ccdbRequest, useCCDB)},
217220
Options{
218221
{"tf-per-slot", VariantType::UInt32, 5u, {"number of TFs per calibration time slot"}},
222+
{"output-path", VariantType::String, "TOF/Calib/LHCphaseSync", {"path to ccdb output"}},
219223
{"max-delay", VariantType::UInt32, 3u, {"number of slots in past to consider"}},
220224
{"min-entries", VariantType::Int, 500, {"minimum number of entries to fit single time slot"}},
221225
{"nbins", VariantType::Int, 4000, {"number of bins for "}}}};

0 commit comments

Comments
 (0)