HPS-MC
hpsmc.job_template Namespace Reference

Classes

class  JobData
 Very simple key-value object for storing data for each job. More...
 
class  MaxJobsException
 Exception if max jobs are reached. More...
 
class  JobTemplate
 Template engine for transforming input job template into JSON job store. More...
 

Functions

def basename (path)
 Filter to return a file base name stripped of dir and extension. More...
 
def extension (path)
 Filter to get file extension from string. More...
 
def dirname (path)
 Filter to get dir name from string. More...
 
def pad (num, npad=4)
 Filter to pad a number. More...
 
def uuid ()
 Function to get a uuid within a template. More...
 
def lcio_dumpevent_runnumber (path)
 Filter to get a run number by inspecting first event in slcio file. More...
 
def filenum (path)
 Filter to get the trailing number of a file. More...
 

Variables

 job_tmpl = JobTemplate()
 

Function Documentation

◆ basename()

def hpsmc.job_template.basename (   path)

Filter to return a file base name stripped of dir and extension.

Definition at line 18 of file job_template.py.

◆ dirname()

def hpsmc.job_template.dirname (   path)

Filter to get dir name from string.

Definition at line 28 of file job_template.py.

◆ extension()

def hpsmc.job_template.extension (   path)

Filter to get file extension from string.

Definition at line 23 of file job_template.py.

◆ filenum()

def hpsmc.job_template.filenum (   path)

Filter to get the trailing number of a file.

This will extract the number between the last underscore and the extension. For example 'file_name_is_number.root' will return 'number' if 'number' is actually a integer.

Definition at line 59 of file job_template.py.

◆ lcio_dumpevent_runnumber()

def hpsmc.job_template.lcio_dumpevent_runnumber (   path)

Filter to get a run number by inspecting first event in slcio file.

Definition at line 43 of file job_template.py.

◆ pad()

def hpsmc.job_template.pad (   num,
  npad = 4 
)

Filter to pad a number.

Definition at line 33 of file job_template.py.

◆ uuid()

def hpsmc.job_template.uuid ( )

Function to get a uuid within a template.

Definition at line 38 of file job_template.py.

Variable Documentation

◆ job_tmpl

job_tmpl = JobTemplate()

Definition at line 312 of file job_template.py.