Difference between revisions of "SAM"

From DUNE
Jump to navigation Jump to search
(Created page with "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 ot...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
---
 +
----
 +
----
 +
----
 +
==<span style="background:yellow">This page has moved to the [https://wiki.dunescience.org/wiki/SAM DUNE wiki]</span>==
 +
----
 +
----
 +
----
 +
----
 +
 
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]].
 
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]].
  
Line 10: Line 20:
 
* [https://cdcvs.fnal.gov/redmine/projects/sam-web/wiki redmine wiki]
 
* [https://cdcvs.fnal.gov/redmine/projects/sam-web/wiki redmine wiki]
  
= Client =
+
== 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 <code>samweb</code>.
 
Access to SAM Web is made easier through the SAM Web Client client-side Python module and command line interface tool called <code>samweb</code>.
Line 17: Line 27:
 
* [https://cdcvs.fnal.gov/redmine/projects/sam-main/wiki/Sam_web_client_Command_Reference command ref]
 
* [https://cdcvs.fnal.gov/redmine/projects/sam-main/wiki/Sam_web_client_Command_Reference command ref]
  
== Installation ==
+
=== Installation of sam-web-client package ===
 +
 
 +
* On fnal.gov machines, it should be [https://cdcvs.fnal.gov/redmine/projects/sam/wiki/User_Guide_for_SAM#Setting-up-samweb-Tools available under UPS]
  
On fnal.gov machines, use UPS to set up your environment to use a centrally installed instance of the SAM Web Client "product".  For all other users, it needs to be installed.
+
* To install see [https://github.com/DUNE/sam-web-client/blob/master/README.md these instructions]
  
=== Via pip ===
+
=== Using <code>samweb</code> ===
  
To install into your current Python environment (eg, one created with [[Virtualenv]]) simply do:
+
Command line help
  
  pip install sam-web-client
+
  samweb
  
In your central user area add <code>--user</code>
+
Locate a file's URL:
  
  pip install --user sam-web-client
+
  $ 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
  
=== From source ===
+
Locate a file:
  
  git clone https://github.com/DUNE/sam-web-client.git
+
  $ samweb -e lbne locate-file lbne_r006837_sr01_20160112T213253.root
  cd sam-web-client
+
  enstore:/pnfs/lbne/test-data/lbne/raw/00/18/90/51(602@vpe776)
python setup.py install
 
  
=== For development ===
+
Access metadata:
  
  git clone git@github.com:DUNE/sam-web-client.git
+
  $ samweb -e lbne get-metadata lbne_r006837_sr01_20160112T213253.root
cd sam-web-client
+
              File Name: lbne_r006837_sr01_20160112T213253.root
  python setup.py develop
+
                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)

Latest revision as of 18:54, 8 December 2017

---




This page has moved to the DUNE wiki





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.

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

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)