| Crates.io | gluex-ccdb |
| lib.rs | gluex-ccdb |
| version | 0.1.3 |
| created_at | 2025-12-14 22:10:26.281209+00 |
| updated_at | 2026-01-22 18:32:42.939405+00 |
| description | A Rust interface to the GlueX Calibration and Conditions Database (CCDB) |
| homepage | https://github.com/denehoffman/gluex-rs |
| repository | https://github.com/denehoffman/gluex-rs |
| max_upload_size | |
| id | 1985183 |
| size | 123,145 |
Typed Rust bindings for the GlueX Calibration and Conditions Database (CCDB). The library performs read-only queries against SQLite snapshots, caches table metadata, and exposes ergonomic accessors for run-dependent payloads.
cargo add gluex-ccdb
use gluex_ccdb::prelude::*;
fn main() -> CCDBResult<()> {
let ccdb = CCDB::open("/path/to/ccdb.sqlite")?;
let ctx = Context::default().with_run_range(55_000..=55_010);
let tables = ccdb.fetch("/PHOTON_BEAM/pair_spectrometer/lumi/trig_live", &ctx)?;
for (run, dataset) in tables {
if let Some(livetime) = dataset.double(1, 0) {
println!("run {run}: livetime = {livetime:.3}");
}
}
Ok(())
}
Dual-licensed under Apache-2.0 or MIT.