You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Detectors/GlobalTracking/src/CalibTOF.cxx
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
#include<TFile.h>
17
17
#include"DataFormatsParameters/GRPObject.h"
18
18
#include"ReconstructionDataFormats/PID.h"
19
+
#include"CCDB/CcdbApi.h"
19
20
20
21
#include"GlobalTracking/CalibTOF.h"
21
22
@@ -25,6 +26,7 @@
25
26
#include"TRandom.h"
26
27
27
28
usingnamespaceo2::globaltracking;
29
+
using CcdbApi = o2::ccdb::CcdbApi;
28
30
29
31
ClassImp(CalibTOF);
30
32
@@ -259,9 +261,23 @@ void CalibTOF::run(int flag, int sector)
259
261
}
260
262
261
263
//______________________________________________
262
-
voidCalibTOF::fillOutput()
264
+
voidCalibTOF::fillOutput(int flag)
263
265
{
264
266
mOutputTree->Fill();
267
+
268
+
if (mFillCCDB) {
269
+
CcdbApi api;
270
+
api.init(mCCDBpath.c_str()); // or http://localhost:8080 for a local installation
271
+
272
+
if (flag & kLHCphase) {
273
+
std::map<std::string, std::string> metadataLHCphase; // can be empty
274
+
api.storeAsTFileAny(mLHCphaseObj, "TOF/LHCphase", metadataLHCphase, (ulong)mMinTimestamp*1000, (ulong)mMaxTimestamp*1000); // we use as validity the timestamps that we got from the input for the calibration; but we need to convert to ms for the CCDB (at least for now that we use an integer for the timestamp)
275
+
}
276
+
if (flag & kChannelOffset || flag & kChannelTimeSlewing) {
277
+
std::map<std::string, std::string> metadataChannelCalib; // can be empty
278
+
api.storeAsTFileAny(mTimeSlewingObj, "TOF/ChannelCalib", metadataChannelCalib, (ulong)mMinTimestamp*1000); // contains both offset and time slewing; we use as validity the START ONLY timestamp that we got from the input for the calibration; but we need to convert to ms for the CCDB (at least for now that we use an integer for the timestamp), END is default
0 commit comments