CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
MatrixToProcess.MatrixToProcess Class Reference

Public Member Functions

def __init__ (self, what='standard', strict=True)
 
def getConfig (self, wfNumber, step)
 
def getKey (self, wfNumber, step)
 
def getProcess (self, wfNumber, step)
 
def identityTest (self, wfNumber, step)
 
def listAll (self)
 
def load (self, wfNumber, step)
 

Public Attributes

 configBuilders
 
 mrd
 
 processes
 
 strict
 

Detailed Description

Definition at line 4 of file MatrixToProcess.py.

Constructor & Destructor Documentation

def MatrixToProcess.MatrixToProcess.__init__ (   self,
  what = 'standard',
  strict = True 
)

Definition at line 6 of file MatrixToProcess.py.

6  def __init__(self,what='standard',strict=True):
7  from Configuration.PyReleaseValidation.MatrixReader import MatrixReader
8  self.mrd = MatrixReader(what,noRun=True)
9  self.mrd.prepare('all','',None)
11  self.processes={}
12  self.strict=strict
def __init__(self, what='standard', strict=True)

Member Function Documentation

def MatrixToProcess.MatrixToProcess.getConfig (   self,
  wfNumber,
  step 
)

Definition at line 51 of file MatrixToProcess.py.

References MatrixToProcess.MatrixToProcess.configBuilders, MatrixToProcess.MatrixToProcess.getKey(), TmModule.getKey(), DTCalibrationMap.getKey(), L1TUtmCut.getKey(), and MatrixToProcess.MatrixToProcess.getProcess().

51  def getConfig(self,wfNumber,step):
52  key=self.getKey(wfNumber,step)
53  if not key in self.configBuilders: self.getProcess(wfNumber,step)
54  if not key in self.configBuilders: return None
55  return self.configBuilders[key].pythonCfgCode
56 
def getConfig(self, wfNumber, step)
def getKey(self, wfNumber, step)
def getProcess(self, wfNumber, step)
def MatrixToProcess.MatrixToProcess.getKey (   self,
  wfNumber,
  step 
)

Definition at line 13 of file MatrixToProcess.py.

References str.

Referenced by MatrixToProcess.MatrixToProcess.getConfig(), MatrixToProcess.MatrixToProcess.getProcess(), MatrixToProcess.MatrixToProcess.identityTest(), and MatrixToProcess.MatrixToProcess.load().

13  def getKey(self,wfNumber,step):
14  return str(wfNumber)+':'+str(step)
15 
def getKey(self, wfNumber, step)
#define str(s)
def MatrixToProcess.MatrixToProcess.getProcess (   self,
  wfNumber,
  step 
)

Definition at line 16 of file MatrixToProcess.py.

References MatrixToProcess.MatrixToProcess.configBuilders, MatrixToProcess.MatrixToProcess.getKey(), TmModule.getKey(), DTCalibrationMap.getKey(), L1TUtmCut.getKey(), VisualizationOptions.load(), MatrixToProcess.MatrixToProcess.load(), BTagCalibrationReader::BTagCalibrationReaderImpl.load(), BTagCalibrationReader.load(), cond::persistency::KeyList.load(), cond::persistency::GTEditor.load(), cond::persistency::IOVEditor.load(), L1MuDTPhiLut.load(), L1MuDTPtaLut.load(), L1MuDTEtaPatternLut.load(), L1MuDTQualPatternLut.load(), PiecewiseScalingPolynomial.load(), L1MuDTExtLut.load(), cond::persistency::RunInfoProxy.load(), HcalIndexLookup.load(), HBHENegativeEFilter.load(), cond::persistency::GTProxy.load(), cond::persistency::IOVProxy.load(), HBHEChannelGroups.load(), TrackerMap.load(), OOTPileupCorrData.load(), ConfigBuilder.ConfigBuilder.load(), and mps_create_file_lists._DasCache.load().

Referenced by MatrixToProcess.MatrixToProcess.getConfig(), MatrixToProcess.MatrixToProcess.identityTest(), and MatrixToProcess.MatrixToProcess.listAll().

16  def getProcess(self,wfNumber,step):
17  key=self.getKey(wfNumber,step)
18  if not key in self.configBuilders:
19  self.load(wfNumber,step)
20  if not key in self.configBuilders:
21  return None
22  return self.configBuilders[key].process
23 
def getKey(self, wfNumber, step)
def getProcess(self, wfNumber, step)
def load(self, wfNumber, step)
def MatrixToProcess.MatrixToProcess.identityTest (   self,
  wfNumber,
  step 
)

Definition at line 57 of file MatrixToProcess.py.

References MatrixToProcess.MatrixToProcess.configBuilders, MatrixToProcess.MatrixToProcess.getKey(), TmModule.getKey(), DTCalibrationMap.getKey(), L1TUtmCut.getKey(), and MatrixToProcess.MatrixToProcess.getProcess().

57  def identityTest(self,wfNumber,step):
58  self.getProcess(wfNumber,step)
59  key=self.getKey(wfNumber,step)
60  if not key in self.configBuilders: return None
61 
62  cb=self.configBuilders[key]
63  #need to compare those two for identity
64  cb.process
65  cd.pythonCfgCode
66 
67 
def getKey(self, wfNumber, step)
def getProcess(self, wfNumber, step)
def identityTest(self, wfNumber, step)
def MatrixToProcess.MatrixToProcess.listAll (   self)

Definition at line 68 of file MatrixToProcess.py.

References objects.autophobj.float, MatrixToProcess.MatrixToProcess.getProcess(), join(), VisualizationOptions.load(), MatrixToProcess.MatrixToProcess.load(), BTagCalibrationReader::BTagCalibrationReaderImpl.load(), BTagCalibrationReader.load(), cond::persistency::KeyList.load(), cond::persistency::GTEditor.load(), cond::persistency::IOVEditor.load(), L1MuDTPtaLut.load(), L1MuDTPhiLut.load(), L1MuDTEtaPatternLut.load(), L1MuDTQualPatternLut.load(), PiecewiseScalingPolynomial.load(), L1MuDTExtLut.load(), cond::persistency::RunInfoProxy.load(), HcalIndexLookup.load(), HBHENegativeEFilter.load(), cond::persistency::GTProxy.load(), cond::persistency::IOVProxy.load(), HBHEChannelGroups.load(), TrackerMap.load(), OOTPileupCorrData.load(), ConfigBuilder.ConfigBuilder.load(), and mps_create_file_lists._DasCache.load().

68  def listAll(self):
69  for wf in self.mrd.workFlows:
70  step=1
71  print '---------------------'
72  print 'process workflow',wf.numId
73  print
74  while self.load(float(wf.numId),step):
75  p=self.getProcess(float(wf.numId),step)
76  print ', '.join(s.label() for s in p.schedule)
77  #print p.outputModules()
78  step+=1
79 
80 
def getProcess(self, wfNumber, step)
def load(self, wfNumber, step)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def MatrixToProcess.MatrixToProcess.load (   self,
  wfNumber,
  step 
)

Definition at line 24 of file MatrixToProcess.py.

References MatrixToProcess.MatrixToProcess.configBuilders, objects.autophobj.float, MatrixToProcess.MatrixToProcess.getKey(), TmModule.getKey(), DTCalibrationMap.getKey(), L1TUtmCut.getKey(), cmsDriverOptions.OptionsFromCommand(), and MatrixToProcess.MatrixToProcess.strict.

Referenced by MatrixToProcess.MatrixToProcess.getProcess(), and MatrixToProcess.MatrixToProcess.listAll().

24  def load(self,wfNumber,step):
25  from Configuration.Applications.ConfigBuilder import ConfigBuilder
26  from Configuration.Applications.cmsDriverOptions import OptionsFromCommand
27  import copy
28 
29  if len(self.configBuilders)!=0 and self.strict:
30  raise Exception('one should never be loading more than one process at a time due to python loading/altering feature')
31  key=self.getKey(wfNumber,step)
32  if key in self.configBuilders:
33  return True
34 
35  for wf in self.mrd.workFlows:
36  if float(wf.numId)!=wfNumber: continue
37 
38  if not hasattr(wf,'cmdStep%d'%(step)): continue
39  if not getattr(wf,'cmdStep%d'%(step)): continue
40 
41  command=getattr(wf,'cmdStep%d'%(step))
42  opt=OptionsFromCommand(command)
43  if opt:
44  cb = ConfigBuilder(opt,with_input=True,with_output=True)
45  cb.prepare()
46  self.configBuilders[key]=copy.copy(cb)
47  return True
48  print "could not satisfy the request for step",step,"of workflow",wfNumber
49  return False
50 
def OptionsFromCommand(command)
def getKey(self, wfNumber, step)
def load(self, wfNumber, step)

Member Data Documentation

MatrixToProcess.MatrixToProcess.mrd

Definition at line 8 of file MatrixToProcess.py.

MatrixToProcess.MatrixToProcess.processes

Definition at line 11 of file MatrixToProcess.py.

MatrixToProcess.MatrixToProcess.strict

Definition at line 12 of file MatrixToProcess.py.

Referenced by MatrixToProcess.MatrixToProcess.load().