Skip to content
Snippets Groups Projects
Whitney Armstrong's avatar
Whitney Armstrong authored
	modified:   mongo/README.md
1974904a
History

mongodb container

Download and start the server

wget https://eicweb.phy.anl.gov/containers/image_recipes/-/jobs/artifacts/master/raw/build/Singularity.mongo.simg?job=mongo_singular -O mongodb.sif
mkdir data
singularity exec mongodb.sif mongod --dbpath data

Using from c++

In another terminal do the following.

Create new collection and fill with coin_run_list.json

root -b -q scripts/mongo_test.cxx

Connect to the database from c++ and read data

root -b -q scripts/mongo_read_test.cxx

Query the database from c++

root -b -q scripts/mongo_find_test.cxx