From b2afb30152ff2de0860a0ddeb9f3daf05ad6a29d Mon Sep 17 00:00:00 2001 From: Martin Eide <43970264+mrtineide@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:28:49 +0200 Subject: [PATCH] Update README so example code has std:: When working on AliceO2Group/AliceO2#14524 the code that needed to be changed came most likely from the README.md and its code example. So with this change now any future copy-paste will also have std::. --- CCDB/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CCDB/README.md b/CCDB/README.md index ce8d9e19f7b27..e098617cf44e3 100644 --- a/CCDB/README.md +++ b/CCDB/README.md @@ -31,7 +31,7 @@ If you access the CCDB with a web browser, add `/browse` at the end of the URL t ```c++ // init CcdbApi api; -map metadata; // can be empty +std::map metadata; // can be empty api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation // store abitrary user object in strongly typed manner auto deadpixels = new o2::FOO::DeadPixelMap(); @@ -39,7 +39,7 @@ api.storeAsTFileAny(deadpixels, "FOO/DeadPixels", metadata); // read like this (you have to specify the type) auto deadpixelsback = api.retrieveFromTFileAny("FOO/DeadPixels", metadata); // read like this to get the headers as well, and thus the metadata attached to the object -map headers; +std::map headers; auto deadpixelsback = api.retrieveFromTFileAny("FOO/DeadPixels", metadata /* constraint the objects retrieved to those matching the metadata */, -1 /* timestamp */, &headers /* the headers attached to the returned object */); // finally, use this method to retrieve only the headers (and thus the metadata) std::map headers = f.api.retrieveHeaders("FOO/DeadPixels", f.metadata); @@ -50,7 +50,7 @@ std::map headers = f.api.retrieveHeaders("FOO/DeadPixe ```c++ // init CcdbApi api; -map metadata; // can be empty +std::map metadata; // can be empty api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation // create a local snapshot of everthing in or below the FOO folder valid for timestamp 12345 api.snapshot("FOO", "/tmp/CCDBSnapshot/", 12345);