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
Extending the CCDB API to optionally get the headers from first HTTP request (#14709)
* Extend CCDB functions with optional headers
* Remove the header filtering & add more tests
* Fix code snippets and enhance metadata retrieval documentation
Updated code snippets in README for header retrieval and added optional parameter documentation details.
Also fixed some CI formatting errors.
* Change unit test with to have correct includes
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata);
41
-
// read like this to get the headers as well, and thus the metadata attached to the object
40
+
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata);
41
+
// read like this to get the headers as well, and thus the metadata attached to the object
42
42
std::map<std::string, std::string> headers;
43
-
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata /* constraint the objects retrieved to those matching the metadata */, -1/* timestamp */, &headers /* the headers attached to the returned object */);
43
+
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata /* constraint the objects retrieved to those matching the metadata */, -1/* timestamp */, &headers /* the headers attached to the returned object */);
44
44
// finally, use this method to retrieve only the headers (and thus the metadata)
@@ -111,6 +111,12 @@ This feature is useful to avoid using newer objects if the CCDB is updated in pa
111
111
112
112
In cached mode, the manager can check that local objects are still valid by requiring `mgr.setLocalObjectValidityChecking(true)`, in this case a CCDB query is performed only if the cached object is no longer valid.
113
113
114
+
If you want the headers/metadata for the object retrieved from the CCDB there is an optional paramater to `BasicCCDBManager::getForTimeStamp`. These headers are also cached (when caching is enabled) and is updated when a CCDB query is sent.
0 commit comments