Skip to content

Commit 05aa363

Browse files
authored
CCDB - README.md: Info on command line tools (#2947)
1 parent 24a891e commit 05aa363

1 file changed

Lines changed: 41 additions & 1 deletion

File tree

CCDB/README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,44 @@ auto alignment = mgr.get<o2::FOO::GeomAlignment>("/FOO/Alignment");
9696

9797
## Note on the use of TFile to store data
9898

99-
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.
99+
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.
100+
101+
## Command line tools
102+
103+
A few prototypic command line tools are offered. These can be used in scriptable generic workflows
104+
and facilitate the following tasks:
105+
106+
1. Upload and annotate a generic C++ object serialized in a ROOT file
107+
108+
```bash
109+
o2-ccdb-upload -f myRootFile.root --key histogram1 --path /Detector1/QA/ --meta "Description=Foo;Author=Person1;Uploader=Person2"
110+
```
111+
This will upload the object serialized in `myRootFile.root` under the key `histogram1`. Object will be put to the CCDB path `/Detector1/QA`.
112+
For full list of options see `o2-ccdb-upload --help`.
113+
114+
2. Download a CCDB object to a local ROOT file (including its meta information)
115+
116+
```bash
117+
o2-ccdb-downloadccdbfile --path /Detector1/QA/ --dest /tmp/CCDB --timestamp xxx
118+
```
119+
This will download the CCDB object under path given by `--path` to a directory given by `--dest` on the disc.
120+
(The final filename will be `/tmp/CCDB/Detector1/QA/snapshot.root` for the moment).
121+
All meta-information as well as the information associated to this query will be appended to the file.
122+
123+
For full list of options see `o2-ccdb-downloadccdbfile --help`.
124+
125+
3. Inspect the content of a ROOT file and print summary about type of contained (CCDB) objects and its meta information
126+
127+
```bash
128+
o2-ccdb-inspectccdbfile filename
129+
```
130+
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.
131+
132+
133+
### TODO command line tools
134+
135+
- [ ] combine all tools into a single swiss-knife executable?
136+
- [ ] offer more tools mapping all REST functionality of the server: be able to browse, list, query online content, etc.
137+
- [ ] provide error diagnostics; different level of verbosity
138+
- [ ] provide json interaction modes (give meta-information; retrieve meta-information)
139+
- [ ] use meta-info filters when downloading

0 commit comments

Comments
 (0)