Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:40

0001 
0002 import re
0003 
0004 # ================================================================================
0005 
0006 class WorkFlow(object):
0007 
0008     def __init__(self, num, nameID, inputInfo=None, commands=None, stepList=None):
0009 
0010         self.numId  = num
0011         self.nameId = nameID
0012         self.cmds = []
0013 
0014         if commands:
0015             for (i,c) in enumerate(commands):
0016                 nToRun=10 + (i!=0)*90
0017                 self.check(c,nToRun)
0018         self.stepList = stepList
0019         if commands and stepList:
0020             assert(len(commands)==len(stepList))
0021 
0022         # run on real data requested:
0023         self.input = inputInfo
0024 
0025         return
0026 
0027     def check(self, cmd=None, nEvtDefault=10):
0028         if not cmd : return None
0029 
0030         if (isinstance(cmd,str)) and ( ' -n ' not in cmd):
0031             cmd+=' -n '+str(nEvtDefault)+' '
0032 
0033         self.cmds.append(cmd)
0034         return cmd
0035 
0036 
0037 class WorkFlowConnector(object):
0038     def __init__(self):
0039         self.moduleName=''
0040         self.tier=''
0041         self.fileName=''
0042     
0043 class WorkFlowBlock(object):
0044     def __init__(self, name,cmdDict):
0045         self.nameId = name
0046         self.command = ''#made from the cmdDict
0047 
0048         ##I/O of the block
0049         self.ins=None
0050         self.outs=None
0051 
0052     def getProcess(self):
0053         #get ConfigBuilder to give a process back
0054         return None
0055