SAM
Revision as of 18:20, 13 January 2016 by BrettViren (talk | contribs)
SAM (Sequential Access via Metadata) is a system by and at Fermilab for providing a database that ties metadata to file locations, allows file set definition and query, and other features. See also Metadata.
Contents
SAM Web
SAM may be accessed via an HTTP API called SAM Web Services.
Some information resources about SAM Web
Sam Web Client
Access to SAM Web is made easier through the SAM Web Client client-side Python module and command line interface tool called samweb
.
Installation of sam-web-client package
- On fnal.gov machines, it should be available under UPS
- To install see these instructions
Using samweb
Command line help
samweb
Locate a file's URL:
$ samweb -e lbne get-file-access-url lbne_r006837_sr01_20160112T213253.root gsiftp://fndca1.fnal.gov:2811/pnfs/fnal.gov/usr/lbne/test-data/lbne/raw/00/18/90/51/lbne_r006837_sr01_20160112T213253.root
Locate a file:
$ samweb -e lbne locate-file lbne_r006837_sr01_20160112T213253.root enstore:/pnfs/lbne/test-data/lbne/raw/00/18/90/51(602@vpe776)
Access metadata:
$ samweb -e lbne get-metadata lbne_r006837_sr01_20160112T213253.root File Name: lbne_r006837_sr01_20160112T213253.root File Id: 189051 Create Date: 2016-01-12T22:09:17+00:00 User: dunepro Update Date: 2016-01-12T22:28:26+00:00 Update User: lbnepro File Type: test-data File Format: root File Size: 1762859968 Checksum: enstore:1713616759 Content Status: good Group: lbne Data Tier: raw Application: art daqag v00_00_01 Event Count: 280695 First Event: 1 Last Event: 280695 Start Time: 2016-01-12T21:32:16+00:00 End Time: 2016-01-12T21:55:46+00:00 lbne_data.detector_type: 35t:penn01:rce13:rce09:rce08:rce07:rce06:rce05:rce04:rce03:rce02:rce01:rce00:rce10:rce11:rce15:rce12:rce14 lbne_data.name: Test lbne_data.run_mode: rces_and_ssps_and_ptb Runs: 6837 (test)