CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Configuration/PyReleaseValidation/python/WorkFlow.py

Go to the documentation of this file.
00001 
00002 import re
00003 
00004 # ================================================================================
00005 
00006 class WorkFlow(object):
00007 
00008     def __init__(self, num, nameID, inputInfo=None, commands=None):
00009 
00010         self.numId  = num
00011         self.nameId = nameID
00012         self.cmds = []
00013 
00014         if commands:
00015             for (i,c) in enumerate(commands):
00016                 nToRun=10 + (i!=0)*90
00017                 self.check(c,nToRun)
00018         
00019 
00020         # run on real data requested:
00021         self.input = inputInfo
00022 
00023         return
00024 
00025     def check(self, cmd=None, nEvtDefault=10):
00026         if not cmd : return None
00027 
00028         if (isinstance(cmd,str)) and ( ' -n ' not in cmd):
00029             cmd+=' -n '+str(nEvtDefault)+' '
00030 
00031         self.cmds.append(cmd)
00032         return cmd
00033 
00034 
00035 class WorkFlowConnector(object):
00036     def __init__(self):
00037         self.moduleName=''
00038         self.tier=''
00039         self.fileName=''
00040     
00041 class WorkFlowBlock(object):
00042     def __init__(self, name,cmdDict):
00043         self.nameId = name
00044         self.command = ''#made from the cmdDict
00045 
00046         ##I/O of the block
00047         self.ins=None
00048         self.outs=None
00049 
00050     def getProcess(self):
00051         #get ConfigBuilder to give a process back
00052         return None
00053