A special provider allows direct access to datasets in PROOF - listing, examining, and creating. Access to this data is implemented as a PowerShell drive. This means that common cmdlets like Get-Item, Get-Children, etc. all will work about how you’d expect them (see below).

Initialization

In each 32-bit PowerShell session you must load the provider. Do this by entering the PowerShell command Add-PSSnapin:

image

What datasets are available?

You have to first tell PowerShell what PROOF server you want to connect to. In this case, this involves mounting a drive with New-PSDrive:

image

The first argument, pf, is what you’ll call the drive while you use it in PowerShell (e.g. pf:/MyDatasetName). It can be pretty much anything. The second argument is the name of the provider and must always be PROOFDS. The third argument is the server (mymachine.washington.edu, for example). That text is passed directly to TProof::Open. The resulting text is the conversation with the PROOF server that occurs during the connection opening.

You’ll have to do the above each time you start a new PowerShell session. You can change your log-in file if you want to add these commands to it so you get them every startup.

Now we can get the listing of datasets:

image

Or, in a nicer format:

image

For those of you not familiar with PowerShell, pipe-line items are full fledged objects, rather than lines of text as you might expect from working with pipes on Linux, so you can also do something link Get-ChildItem pf: | % {$_.Name} to get a simple listing of all the dataset names.

What Files Are In A Dataset?

We know about the HV_ggH_mH120_mVPI20 dataset, and want to know what files are in it. All we do is the Get-Content command:

image

Basically, the full TFileInfo object comes back – so a lot of information gets dumped to the screen – hence selecting out the Url component of that information. If you want to see everything just let it go without that filters. Smile

Creating A New Dataset

Last edited Apr 29, 2012 at 12:53 PM by gwatts, version 4

Comments

No comments yet.