Skip to content

Commit 655ee7b

Browse files
committed
dev: validity range adjustment
1 parent cd8e576 commit 655ee7b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,16 @@ int ctpCCDBManager::saveOrbitReset(long timeStamp)
157157
o2::ccdb::CcdbApi api;
158158
std::map<std::string, std::string> metadata; // can be empty
159159
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation
160-
161-
// store abitrary user object in strongly typed manner
162-
int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
160+
//int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
161+
std::cout << "Storing:" << mCCDBPathOrbitReset << " tmin:" << tmin << " tmax:" << tmax << " ts:" << timeStamp << std::endl;
162+
std::string filename = "orbitReset.root";
163+
TClass* tcls = TClass::GetClass(typeid(vect));
164+
auto ti = tcls->GetTypeInfo();
165+
auto classname = "std::vector<int64_t>";
166+
metadata["adjustableEOV"] = "true";
167+
int ret = api.storeAsTFile_impl(&(vect), *ti, mCCDBPathOrbitReset, metadata, tmin, tmax);
168+
o2::ccdb::CcdbObjectInfo oi(mCCDBPathOrbitReset, classname, filename, metadata, tmin, tmax);
169+
adjustOverriddenEOV(api, oi);
163170
if (ret == 0) {
164171
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
165172
} else {

0 commit comments

Comments
 (0)