babymaker  e95a6a9342d4604277fe7cc6149b6b5b24447d89
Classes | Functions | Variables
cache Namespace Reference

Classes

class  SignalError
 

Functions

def signalHandler (signum, frame)
 
def mkdirPermissions (path, mode)
 
def cacheUpToDate (cache_path, net_path)
 
def expand (files)
 
def isNetFile (path)
 
def cachePath (path)
 
def lastTime (path)
 
def mapFiles (command, file_map)
 
def netCopy (src, dst)
 
def removeOldCache (file_map)
 
def cacheCopy (src, dst, min_free, file_map, no_delete)
 
def syncCache (net_path, cache_path)
 
def execute (command, file_map, fragile)
 
def cacheRecurse (caches, file_map, command, fragile, min_free, no_delete)
 
def cacheRun (caches, command, fragile, abs_limit, rel_limit, no_delete)
 

Variables

tuple parser
 
string help = "Files that should be copied to cache or, if not already existing, created on the cache and moved to /net/cmsX/cmsXr0/babymaker upon completion."
 
tuple args = parser.parse_args()
 

Function Documentation

def cache.cacheCopy (   src,
  dst,
  min_free,
  file_map,
  no_delete 
)

Definition at line 152 of file cache.py.

References cacheUpToDate(), utilities.ePrint(), utilities.fullPath(), and removeOldCache().

Referenced by cacheRecurse().

def cache.cachePath (   path)

Definition at line 65 of file cache.py.

References utilities.fullPath().

Referenced by cacheRecurse(), and mapFiles().

def cache.cacheRecurse (   caches,
  file_map,
  command,
  fragile,
  min_free,
  no_delete 
)

Definition at line 241 of file cache.py.

References cacheCopy(), cachePath(), cacheUpToDate(), utilities.ePrint(), execute(), isNetFile(), and mkdirPermissions().

Referenced by cacheRun().

def cache.cacheRun (   caches,
  command,
  fragile,
  abs_limit,
  rel_limit,
  no_delete 
)

Definition at line 271 of file cache.py.

References cacheRecurse(), expand(), and utilities.fullPath().

def cache.cacheUpToDate (   cache_path,
  net_path 
)

Definition at line 38 of file cache.py.

Referenced by cacheCopy(), cacheRecurse(), mapFiles(), netCopy(), and syncCache().

def cache.execute (   command,
  file_map,
  fragile 
)

Definition at line 193 of file cache.py.

References utilities.ePrint(), utilities.flush(), mapFiles(), netCopy(), and syncCache().

Referenced by cacheRecurse().

def cache.expand (   files)

Definition at line 51 of file cache.py.

References utilities.fullPath().

Referenced by cacheRun().

def cache.isNetFile (   path)

Definition at line 62 of file cache.py.

Referenced by cacheRecurse(), and mapFiles().

def cache.lastTime (   path)

Definition at line 69 of file cache.py.

Referenced by removeOldCache().

def cache.mapFiles (   command,
  file_map 
)

Definition at line 73 of file cache.py.

References cachePath(), cacheUpToDate(), utilities.fullPath(), and isNetFile().

Referenced by execute().

def cache.mkdirPermissions (   path,
  mode 
)

Definition at line 27 of file cache.py.

Referenced by cacheRecurse().

def cache.netCopy (   src,
  dst 
)

Definition at line 105 of file cache.py.

References cacheUpToDate(), and utilities.ePrint().

Referenced by execute().

def cache.removeOldCache (   file_map)

Definition at line 121 of file cache.py.

References utilities.fullPath(), and lastTime().

Referenced by cacheCopy().

def cache.signalHandler (   signum,
  frame 
)

Definition at line 24 of file cache.py.

def cache.syncCache (   net_path,
  cache_path 
)

Definition at line 178 of file cache.py.

References cacheUpToDate(), and utilities.ePrint().

Referenced by execute().

Variable Documentation

tuple cache.args = parser.parse_args()

Definition at line 302 of file cache.py.

Referenced by anonymous_namespace{jet_met_tools.cc}.MakeUnique().

string cache.help = "Files that should be copied to cache or, if not already existing, created on the cache and moved to /net/cmsX/cmsXr0/babymaker upon completion."

Definition at line 291 of file cache.py.

tuple cache.parser
Initial value:
1 = argparse.ArgumentParser(description="Automatically creates and, if necessary, deletes local caches of files from /net/cmsX/cmsXr0/babymaker and remaps any files in the provided command to their cached version.",
2  formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Definition at line 288 of file cache.py.