Skip to content

Commit e96552a

Browse files
mrtineidesawenzel
authored andcommitted
Update README so example code has std::
When working on #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::.
1 parent a4605d0 commit e96552a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CCDB/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ If you access the CCDB with a web browser, add `/browse` at the end of the URL t
3131
```c++
3232
// init
3333
CcdbApi api;
34-
map<string, string> metadata; // can be empty
34+
std::map<std::string, std::string> metadata; // can be empty
3535
api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation
3636
// store abitrary user object in strongly typed manner
3737
auto deadpixels = new o2::FOO::DeadPixelMap();
3838
api.storeAsTFileAny(deadpixels, "FOO/DeadPixels", metadata);
3939
// read like this (you have to specify the type)
4040
auto deadpixelsback = api.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata);
4141
// read like this to get the headers as well, and thus the metadata attached to the object
42-
map<string, string> headers;
42+
std::map<std::string, std::string> headers;
4343
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 */);
4444
// finally, use this method to retrieve only the headers (and thus the metadata)
4545
std::map<std::string, std::string> headers = f.api.retrieveHeaders("FOO/DeadPixels", f.metadata);
@@ -50,7 +50,7 @@ std::map<std::string, std::string> headers = f.api.retrieveHeaders("FOO/DeadPixe
5050
```c++
5151
// init
5252
CcdbApi api;
53-
map<string, string> metadata; // can be empty
53+
std::map<std::string, std::string> metadata; // can be empty
5454
api.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation
5555
// create a local snapshot of everthing in or below the FOO folder valid for timestamp 12345
5656
api.snapshot("FOO", "/tmp/CCDBSnapshot/", 12345);

0 commit comments

Comments
 (0)