Skip to content

Commit 584aa52

Browse files
authored
Update CCDB doc with info about disc caching
1 parent 1568e06 commit 584aa52

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

CCDB/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ snaptshotapi.init("file:///tmp/CCDBSnapshot");
6363
auto deadpixelsback = snapshotapi.retrieveFromTFileAny<o2::FOO::DeadPixelMap>("FOO/DeadPixels", metadata);
6464
```
6565

66+
## Local object caching and testing feature
67+
68+
A simple mechanism is offered that allows caching CCDB objects on disc. In this mode, the CcdbApi will
69+
look if an object is already located on the disc. If not, the request is made to the server and the response automically saved locally. If yes, we just
70+
take the local file. The feature can be activated by exporting a shell variable `export ALICEO2_CCDB_LOCALCACHE=$PWD/.ccdb` which is set to a path on the disc where objects should be put. This mechanism is useful to reduce calls to the server in case multiple processes need the same objects (and the object can be regarded as valid for all requests).
71+
72+
Note that this mechanism also allows for local development and test cycles. Say, some algorithm needs access to object `/Foo/Bar/`.
73+
Then it suffices to put the ROOT file containing the ccdb-object as filename `snapshot.root` inside the `/Foo/Bar/` directory structure, inside the `ALICEO2_CCDB_LOCALCACHE` folder (so, something like `/home/user/.ccdb/Foo/Bar/snapshot.root`).
74+
Then testing can proceed without actually having to upload the CCDB object to a server.
75+
76+
6677
# BasicCCDBManager
6778

6879
A basic higher level class `BasicCCDBManager` is offered for convenient access to the CCDB from

0 commit comments

Comments
 (0)