DBS Client Guide

User can access DBS in two ways now.

1. Web interface: CMS DAS

2. Command line client:

curl -ks  https://cmsweb.cern.ch/das/cli > das_client.py
chmod a+x das_client.py
./das_client.py --help

Some example query to get the dataset names

#find RAW datasets
./das_client.py --query="dataset=*cosmics*"

#find RECO datasets
./das_client.py --query="dataset=*cosmics*/RECO" --verbose=1 --limit=0

#find datasets containing events from run number 108741
das_client.py --query="dataset run=108741 | grep dataset.name" --limit=0

 

Some other example queries

#find latest 10 files from Express Reco
das_client.py --query="file dataset \
dataset=/MuOnia/Run2011B-PromptReco-v1/AOD | \
grep file.name, file.creation_time | \
sort `echo file.creation_time | awk -F ',' '{print $1}' | \
sed -e 's/\[u//'`" --limit=0  | tail -n 10

#find for a given dataset the files of a given Run:Lumi
das_client.py --query="file \
dataset=/HT/Run2011B-v1/RAW run=176304 lumi=80"

#find lumi for a given file
das_client.py --query="lumi file=\
/store/data/Run2011B/SingleElectron/RECO/PromptReco-v1/000\
/175/832/105D5EB3-A4DB-E011-BD6B-BCAEC5329716.root"