Project

General

Profile

C++ Usage

Constructor

The constructor defaults to a url from getenv("IFDH_BASE_URI"), so if that environment variable is set

export IFDH_BASE_URI="http://samweb-minerva.fnal.gov:20004/sam/minerva/api"

you don't need to pass an argument to the contstructor.

#include <ifdh.h>
std::unique_ptr<ifdh> ifdhp(new ifdh()); 
std::unique_ptr<ifdh> ifdhp(new ifdh("http://samweb-minerva.fnal.gov:20004/sam/minerva/api")); 

Errors

Generally if things go wrong we throw std::logic_error, with a what() value that says what went wrong.

Methods

  • ifdhp->set_base_uri( baseuri )
    • set the base uri (if it wasn't given to the constructor, etc.)
  • ifdhp->cp( src, dest)
    • general file copy using cpn or srmcp
  • ifdhp->fetchInput( src_uri )
    • get input file to local scratch, return scratch location
  • ifdhp->addOutputFile( filename )
    • add output file to set
  • ifdhp->copyBackOutput( dest_dir)
    • copy output file set to destination with cpn or srmcp
  • ifdhp->log( message)
    • logging
  • ifdhp->enterState( state )
    • log entering/leaving states
  • ifdhp->leaveState( state )
    • log entering/leaving states
  • ifdhp->createDefinition( name, dims, user, group)
    • make a named dataset definition from a dimension string
  • ifdhp->deleteDefinition( name )
    • remove data set definition
  • ifdhp->describeDefinition( name )
    • describe a named dataset definition
  • ifdhp->translateConstraints( dims )
    • give file list for dimension string
  • ifdhp->locateFile( name )
    • locate a file
  • ifdhp->getMetadata( name )
    • get a files metadata
  • ifdhp->dumpStation( name, what )
    • give a dump of a SAM station status
  • ifdhp->startProject( name, station, defname_or_id, user, group )
    • start a new file delivery project
  • ifdhp->findProject( name, station )