CMS 3D CMS Logo

WorkFlow.py
Go to the documentation of this file.
1 
2 import re
3 
4 # ================================================================================
5 
6 class WorkFlow(object):
7 
8  def __init__(self, num, nameID, inputInfo=None, commands=None, stepList=None):
9 
10  self.numId = num
11  self.nameId = nameID
12  self.cmds = []
13 
14  if commands:
15  for (i,c) in enumerate(commands):
16  nToRun=10 + (i!=0)*90
17  self.check(c,nToRun)
18  self.stepList = stepList
19  if commands and stepList:
20  assert(len(commands)==len(stepList))
21 
22  # run on real data requested:
23  self.input = inputInfo
24 
25  return
26 
27  def check(self, cmd=None, nEvtDefault=10):
28  if not cmd : return None
29 
30  if (isinstance(cmd,str)) and ( ' -n ' not in cmd):
31  cmd+=' -n '+str(nEvtDefault)+' '
32 
33  self.cmds.append(cmd)
34  return cmd
35 
36 
38  def __init__(self):
39  self.moduleName=''
40  self.tier=''
41  self.fileName=''
42 
44  def __init__(self, name,cmdDict):
45  self.nameId = name
46  self.command = ''#made from the cmdDict
47 
48 
49  self.ins=None
50  self.outs=None
51 
52  def getProcess(self):
53  #get ConfigBuilder to give a process back
54  return None
55 
assert(be >=bs)
def __init__(self, name, cmdDict)
Definition: WorkFlow.py:44
ins
I/O of the block.
Definition: WorkFlow.py:49
def __init__(self, num, nameID, inputInfo=None, commands=None, stepList=None)
Definition: WorkFlow.py:8
def check(self, cmd=None, nEvtDefault=10)
Definition: WorkFlow.py:27
def getProcess(self)
Definition: WorkFlow.py:52
#define str(s)