diff --git a/CCDB/README.md b/CCDB/README.md index f38e322da009a..273bae5c7df53 100644 --- a/CCDB/README.md +++ b/CCDB/README.md @@ -96,4 +96,44 @@ auto alignment = mgr.get("/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. \ No newline at end of file +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