Skip to content
Merged
Changes from all 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
42 changes: 41 additions & 1 deletion CCDB/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,44 @@ auto alignment = mgr.get<o2::FOO::GeomAlignment>("/FOO/Alignment");

## Note on the use of TFile to store data

The reason for using a TFile to store the data in the CCDB is because it has the advantage of keeping the data together with the ROOT streamer info in the same place and because it makes it easy to open objects directly from a ROOT session. The streamers enable class schema evolution.
The reason for using a TFile to store the data in the CCDB is because it has the advantage of keeping the data together with the ROOT streamer info in the same place and because it makes it easy to open objects directly from a ROOT session. The streamers enable class schema evolution.

## Command line tools

A few prototypic command line tools are offered. These can be used in scriptable generic workflows
and facilitate the following tasks:

1. Upload and annotate a generic C++ object serialized in a ROOT file

```bash
o2-ccdb-upload -f myRootFile.root --key histogram1 --path /Detector1/QA/ --meta "Description=Foo;Author=Person1;Uploader=Person2"
```
This will upload the object serialized in `myRootFile.root` under the key `histogram1`. Object will be put to the CCDB path `/Detector1/QA`.
For full list of options see `o2-ccdb-upload --help`.

2. Download a CCDB object to a local ROOT file (including its meta information)

```bash
o2-ccdb-downloadccdbfile --path /Detector1/QA/ --dest /tmp/CCDB --timestamp xxx
```
This will download the CCDB object under path given by `--path` to a directory given by `--dest` on the disc.
(The final filename will be `/tmp/CCDB/Detector1/QA/snapshot.root` for the moment).
All meta-information as well as the information associated to this query will be appended to the file.

For full list of options see `o2-ccdb-downloadccdbfile --help`.

3. Inspect the content of a ROOT file and print summary about type of contained (CCDB) objects and its meta information

```bash
o2-ccdb-inspectccdbfile filename
```
Lists all keys and stored types in a ROOT file (downloaded with tool `o2-ccdb-downloadccdbfile`) and prints a summary about the attached meta-information.


### TODO command line tools

- [ ] combine all tools into a single swiss-knife executable?
- [ ] offer more tools mapping all REST functionality of the server: be able to browse, list, query online content, etc.
- [ ] provide error diagnostics; different level of verbosity
- [ ] provide json interaction modes (give meta-information; retrieve meta-information)
- [ ] use meta-info filters when downloading