Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Detectors/CTP/workflowScalers/src/ctpCCDBManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,16 @@ int ctpCCDBManager::saveOrbitReset(long timeStamp)
o2::ccdb::CcdbApi api;
std::map<std::string, std::string> metadata; // can be empty
api.init(mCCDBHost.c_str()); // or http://localhost:8080 for a local installation

// store abitrary user object in strongly typed manner
int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
// int ret = api.storeAsTFileAny(&vect, mCCDBPathOrbitReset, metadata, tmin, tmax);
std::cout << "Storing:" << mCCDBPathOrbitReset << " tmin:" << tmin << " tmax:" << tmax << " ts:" << timeStamp << std::endl;
std::string filename = "orbitReset.root";
TClass* tcls = TClass::GetClass(typeid(vect));
auto ti = tcls->GetTypeInfo();
auto classname = "std::vector<int64_t>";
metadata["adjustableEOV"] = "true";
int ret = api.storeAsTFile_impl(&(vect), *ti, mCCDBPathOrbitReset, metadata, tmin, tmax);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are using storeAsTFile_impl? Please use the standard interface api.storeAsTFile(...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied how I did it at:PR14534

Should I change to storeAsTFileAny(... or storeAsTFile(... ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use storeAsTFileAny, the .._impl is an implementation which may change.

o2::ccdb::CcdbObjectInfo oi(mCCDBPathOrbitReset, classname, filename, metadata, tmin, tmax);
adjustOverriddenEOV(api, oi);
if (ret == 0) {
LOG(info) << "Orbit reset saved in ccdb:" << mCCDBHost << " tmin:" << tmin << " tmax:" << tmax;
} else {
Expand Down