Project

General

Profile

Basic SAM Functions

This page will serve as a list of useful samweb queries. If anyone does something useful with samweb, it might be a good idea to add it to this page. As this page grows organically, we can think about structuring its content into a more accessible quick-start guide.

Defining a dataset

Datasets are defined through something much like a database query. We have a tool to help define datasets: NOvA Dataset Definition Editor.

There are many ways to define a dataset, an example set of conditions is:
  • Detector: Online.Detector="fardet"
  • Trigger stream: Online.Stream=2 #cosmics trigger, t02
  • Run number: Online.RunNumber=11497
  • Processing tier: data_tier="raw"

Conditions can be combined with AND/OR and respect parentheses for order of operations. Continuing the example from above, the combination of those conditions would look like:

Online.Detector="fardet" AND Online.Stream=2 AND Online.RunNumber=11497  AND data_tier="raw" 

Counting the number of files that satisfy a query

To count files, use:

samweb -e nova count-files <query>

See Defining a dataset above for an example query.

Listing the files that satisfy a query

To list files, use:

samweb -e nova list-files <query>

See Defining a dataset above for an example query.

Creating a dataset

In order to do this you must first setup your certificate. Use:

kx509

Then you may create a dataset via:
samweb -e nova create-definition <your dataset name> <query>

ifdh_fetch doesn't work from the /nova/app area

- It fails because grid_ftp for files on DCACHE or tape won't write to the APP area.
- Discussed With Mark Mengel having a fallback operation that would just allow a copy of one or two files.
- Not a critical issue since doing this is more for convenience than production needs.

Stop a project

"samweb stop-project --station=nova <project_name>"