CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
MatrixReader.MatrixReader Class Reference
Inheritance diagram for MatrixReader.MatrixReader:

Public Member Functions

def __init__ (self, opt)
 
def createWorkFlows (self, fileNameIn)
 
def makeCmd (self, step)
 
def makeStep (self, step, overrides)
 
def prepare (self, useInput=None, refRel='', fromScratch=None)
 
def readMatrix (self, fileNameIn, useInput=None, refRel=None, fromScratch=None)
 
def reset (self, what='all')
 
def show (self, selected=None, extended=True, cafVeto=True)
 
def showRaw (self, useInput, refRel=None, fromScratch=None, what='all', step1Only=False, selected=None)
 
def showWorkFlows (self, selected=None, extended=True, cafVeto=True)
 
def updateDB (self)
 
def workFlowsByLocation (self, cafVeto=True)
 

Public Attributes

 addCommand
 
 apply
 
 commandLineWf
 
 files
 
 filesDefault
 
 filesPrefMap
 
 nameList
 
 noRun
 
 overWrite
 
 relvalModule
 
 revertDqmio
 maybe we want too level deep input More...
 
 what
 
 wm
 
 workFlows
 
 workFlowSteps
 

Detailed Description

Definition at line 17 of file MatrixReader.py.

Constructor & Destructor Documentation

◆ __init__()

def MatrixReader.MatrixReader.__init__ (   self,
  opt 
)

Definition at line 19 of file MatrixReader.py.

19  def __init__(self, opt):
20 
21  self.reset(opt.what)
22 
23  self.wm=opt.wmcontrol
24  self.revertDqmio=opt.revertDqmio
25  self.addCommand=opt.command
26  self.apply=opt.apply
27  self.commandLineWf=opt.workflow
28  self.overWrite=opt.overWrite
29 
30  self.noRun = opt.noRun
31  return
32 

References PuppiAlgo.reset(), TPedResult.reset(), BinningPointByMap.reset(), AlcaBeamSpotManager.reset(), RPCFebConnector.reset(), EcalCondHeader.reset(), VEcalCalibBlock.reset(), ApvLatencyAnalysis.reset(), SiPixelStatusManager.reset(), SiStripMiscalibrate::Entry.reset(), MatrixReader.MatrixReader.reset(), IMACalibBlock.reset(), TB06Tree.reset(), SamplingAnalysis.reset(), FactorizedJetCorrectorCalculator::VariableValues.reset(), L3CalibBlock.reset(), pos::PixelROCStatus.reset(), FedTimingAnalysis.reset(), L1MuDTTFMasks.reset(), L1MuDTTFParameters.reset(), SiStripPI::Entry.reset(), L1MuDTPtaLut.reset(), RPCDCCLink.reset(), RPCAMCLink.reset(), L1MuDTPhiLut.reset(), FedCablingAnalysis.reset(), L1MuDTEtaPatternLut.reset(), L1MuDTQualPatternLut.reset(), PedsOnlyAnalysis.reset(), L1MuDTExtLut.reset(), TB06Reco.reset(), coral_bridge::AuthenticationCredentialSet.reset(), PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >.reset(), VpspScanAnalysis.reset(), PhysicsTools::Calibration::Histogram< Value_t, Axis_t >.reset(), NoiseAnalysis.reset(), PedestalsAnalysis.reset(), OptoScanAnalysis.reset(), CalibrationScanAnalysis.reset(), ApvTimingAnalysis.reset(), TB06TreeH2.reset(), DaqScopeModeAnalysis.reset(), cond::persistency::RunInfoProxy.reset(), FastFedCablingAnalysis.reset(), PhysicsTools::Calibration::Histogram3D< Value_t, AxisX_t, AxisY_t, AxisZ_t >.reset(), RPCLBLink.reset(), cond::persistency::GTProxy.reset(), AlignableBeamSpot.reset(), CalibrationAnalysis.reset(), PedsFullNoiseAnalysis.reset(), CommissioningAnalysis.reset(), TB06RecoH2.reset(), cond::XMLAuthenticationService::XMLAuthenticationService.reset(), cond::persistency::IOVProxy.reset(), TrackerMap.reset(), data_sources.json_list.reset(), DTTFBitArray< N >.reset(), LHCInfoImpl::LumiSectionFilter.reset(), and tkal_create_file_lists._DasCache.reset().

Member Function Documentation

◆ createWorkFlows()

def MatrixReader.MatrixReader.createWorkFlows (   self,
  fileNameIn 
)

Definition at line 462 of file MatrixReader.py.

462  def createWorkFlows(self, fileNameIn):
463 
464  prefixIn = self.filesPrefMap[fileNameIn]
465 
466  # get through the list of items and update the requested workflows only
467  keyList = self.workFlowSteps.keys()
468  ids = []
469  for item in keyList:
470  id, pref = item
471  if pref != prefixIn : continue
472  ids.append(id)
473  ids.sort()
474  for key in ids:
475  val = self.workFlowSteps[(key,prefixIn)]
476  num, name, commands, stepList = val
477  nameId = str(num)+'_'+name
478  if nameId in self.nameList:
479  print("==> duplicate name found for ", nameId)
480  print(' keeping : ', self.nameList[nameId])
481  print(' ignoring : ', val)
482  else:
483  self.nameList[nameId] = val
484 
485  self.workFlows.append(WorkFlow(num, name, commands=commands))
486 
487  return
488 

References mps_setup.append, MatrixReader.MatrixReader.filesPrefMap, relativeConstraints.keys, MatrixReader.MatrixReader.nameList, print(), str, MatrixReader.MatrixReader.workFlows, and MatrixReader.MatrixReader.workFlowSteps.

Referenced by MatrixReader.MatrixReader.prepare().

◆ makeCmd()

def MatrixReader.MatrixReader.makeCmd (   self,
  step 
)

Definition at line 91 of file MatrixReader.py.

91  def makeCmd(self, step):
92 
93  cmd = ''
94  cfg = None
95  input = None
96  for k,v in step.items():
97  if 'no_exec' in k : continue # we want to really run it ...
98  if k.lower() == 'cfg':
99  cfg = v
100  continue # do not append to cmd, return separately
101  if k.lower() == 'input':
102  input = v
103  continue # do not append to cmd, return separately
104 
105  #chain the configs
106  #if k.lower() == '--python':
107  # v = 'step%d_%s'%(index,v)
108  cmd += ' ' + k + ' ' + str(v)
109  return cfg, input, cmd
110 

References str.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ makeStep()

def MatrixReader.MatrixReader.makeStep (   self,
  step,
  overrides 
)

Definition at line 111 of file MatrixReader.py.

111  def makeStep(self,step,overrides):
113  if len(overrides) > 0:
114  copyStep=merge([overrides]+[step])
115  return copyStep
116  else:
117  return step
118 

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ prepare()

def MatrixReader.MatrixReader.prepare (   self,
  useInput = None,
  refRel = '',
  fromScratch = None 
)

Definition at line 489 of file MatrixReader.py.

489  def prepare(self, useInput=None, refRel='', fromScratch=None):
490 
491  for matrixFile in self.files:
492  if self.what != 'all' and self.what not in matrixFile:
493  print("ignoring non-requested file",matrixFile)
494  continue
495  if self.what == 'all' and not self.filesDefault[matrixFile]:
496  print("ignoring",matrixFile,"from default matrix")
497  continue
498 
499  try:
500  self.readMatrix(matrixFile, useInput, refRel, fromScratch)
501  except Exception as e:
502  print("ERROR reading file:", matrixFile, str(e))
503  raise
504 
505  try:
506  self.createWorkFlows(matrixFile)
507  except Exception as e:
508  print("ERROR creating workflows :", str(e))
509  raise
510 
511 

References MatrixReader.MatrixReader.createWorkFlows(), MatrixReader.MatrixReader.files, MatrixReader.MatrixReader.filesDefault, print(), MatrixReader.MatrixReader.readMatrix(), str, and MatrixReader.MatrixReader.what.

◆ readMatrix()

def MatrixReader.MatrixReader.readMatrix (   self,
  fileNameIn,
  useInput = None,
  refRel = None,
  fromScratch = None 
)

Definition at line 119 of file MatrixReader.py.

119  def readMatrix(self, fileNameIn, useInput=None, refRel=None, fromScratch=None):
120 
121  prefix = self.filesPrefMap[fileNameIn]
122 
123  print("processing", fileNameIn)
124 
125  try:
126  _tmpMod = __import__( 'Configuration.PyReleaseValidation.'+fileNameIn )
127  self.relvalModule = sys.modules['Configuration.PyReleaseValidation.'+fileNameIn]
128  except Exception as e:
129  print("ERROR importing file ", fileNameIn, str(e))
130  return
131 
132  if useInput is not None:
133  print("request for INPUT for ", useInput)
134 
135 
136  fromInput={}
137 
138  if useInput:
139  for i in useInput:
140  if ':' in i:
141  (ik,il)=i.split(':')
142  if ik=='all':
143  for k in self.relvalModule.workflows.keys():
144  fromInput[float(k)]=int(il)
145  else:
146  fromInput[float(ik)]=int(il)
147  else:
148  if i=='all':
149  for k in self.relvalModule.workflows.keys():
150  fromInput[float(k)]=0
151  else:
152  fromInput[float(i)]=0
153 
154  if fromScratch:
155  fromScratch=map(float,fromScratch)
156  for num in fromScratch:
157  if num in fromInput:
158  fromInput.pop(num)
159  #overwrite steps
160  if self.overWrite:
161  for p in self.overWrite:
162  self.relvalModule.steps.overwrite(p)
163 
164  #change the origin of dataset on the fly
165  if refRel:
166  if ',' in refRel:
167  refRels=refRel.split(',')
168  if len(refRels)!=len(self.relvalModule.baseDataSetRelease):
169  return
170  self.relvalModule.changeRefRelease(
171  self.relvalModule.steps,
172  list(zip(self.relvalModule.baseDataSetRelease,refRels))
173  )
174  else:
175  self.relvalModule.changeRefRelease(
176  self.relvalModule.steps,
177  [(x,refRel) for x in self.relvalModule.baseDataSetRelease]
178  )
179 
180 
181  for num, wfInfo in self.relvalModule.workflows.items():
182  commands=[]
183  wfName = wfInfo[0]
184  stepList = wfInfo[1]
185  stepOverrides=wfInfo.overrides
186  # upgrade case: workflow has basic name, key[, suffix (only special workflows)]
187  wfKey = ""
188  wfSuffix = ""
189  if isinstance(wfName, list) and len(wfName)>1:
190  if len(wfName)>2: wfSuffix = wfName[2]
191  wfKey = wfName[1]
192  wfName = wfName[0]
193  # if no explicit name given for the workflow, use the name of step1
194  if wfName.strip() == '': wfName = stepList[0]
195  # option to specialize the wf as the third item in the WF list
196  addTo=None
197  addCom=None
198  if len(wfInfo)>=3:
199  addCom=wfInfo[2]
200  if not isinstance(addCom, list): addCom=[addCom]
201  #print 'added dict',addCom
202  if len(wfInfo)>=4:
203  addTo=wfInfo[3]
204  #pad with 0
205  while len(addTo)!=len(stepList):
206  addTo.append(0)
207 
208  name=wfName
209  # separate suffixes by + because show() excludes first part of name
210  if len(wfKey)>0:
211  name = name+'+'+wfKey
212  if len(wfSuffix)>0: name = name+wfSuffix
213  stepIndex=0
214  ranStepList=[]
215 
216  #first resolve INPUT possibilities
217  if num in fromInput:
218  ilevel=fromInput[num]
219  #print num,ilevel
220  for (stepIr,step) in enumerate(reversed(stepList)):
221  stepName=step
222  stepI=(len(stepList)-stepIr)-1
223  #print stepIr,step,stepI,ilevel
224  if stepI>ilevel:
225  #print "ignoring"
226  continue
227  if stepI!=0:
228  testName='__'.join(stepList[0:stepI+1])+'INPUT'
229  else:
230  testName=step+'INPUT'
231  #print "JR",stepI,stepIr,testName,stepList
232  if testName in self.relvalModule.steps:
233  #print "JR",stepI,stepIr
234  stepList[stepI]=testName
235  #pop the rest in the list
236  #print "\tmod prepop",stepList
237  for p in range(stepI):
238  stepList.pop(0)
239  #print "\t\tmod",stepList
240  break
241 
242 
243  for (stepI,step) in enumerate(stepList):
244  stepName=step
245  if self.relvalModule.steps[stepName] is None:
246  continue
247  if self.wm:
248  #cannot put a certain number of things in wm
249  if stepName in ['SKIMD','SKIMCOSD','SKIMDreHLT']:
250  continue
251 
252  #replace stepName is needed
253  #if stepName in self.replaceStep
254  if len(name) > 0 : name += '+'
255  #any step can be mirrored with INPUT
256 
257  """
258  if num in fromInput:
259  if step+'INPUT' in self.relvalModule.steps.keys():
260  stepName = step+"INPUT"
261  stepList.remove(step)
262  stepList.insert(stepIndex,stepName)
263  """
264  stepNameTmp = stepName
265  if len(wfKey)>0: stepNameTmp = stepNameTmp.replace('_'+wfKey,"")
266  if len(wfSuffix)>0: stepNameTmp = stepNameTmp.replace(wfSuffix,"")
267  name += stepNameTmp
268  if addCom and (not addTo or addTo[stepIndex]==1):
270  copyStep=merge(addCom+[self.makeStep(self.relvalModule.steps[stepName],stepOverrides)])
271  cfg, input, opts = self.makeCmd(copyStep)
272  else:
273  cfg, input, opts = self.makeCmd(self.makeStep(self.relvalModule.steps[stepName],stepOverrides))
274 
275  if input and cfg :
276  msg = "FATAL ERROR: found both cfg and input for workflow "+str(num)+' step '+stepName
277  raise MatrixException(msg)
278 
279  if input:
280  cmd = input
281  if self.noRun:
282  cmd.run=[]
283  else:
284  if cfg:
285  cmd = 'cmsDriver.py '+cfg+' '+opts
286  else:
287  cmd = 'cmsDriver.py step'+str(stepIndex+1)+' '+opts
288  if self.wm:
289  cmd+=' --io %s.io --python %s.py'%(stepName,stepName)
290  if self.addCommand:
291  if self.apply:
292  if stepIndex in self.apply or stepName in self.apply:
293  cmd +=' '+self.addCommand
294  else:
295  cmd +=' '+self.addCommand
296  if self.wm and self.revertDqmio=='yes':
297  cmd=cmd.replace('DQMIO','DQM')
298  cmd=cmd.replace('--filetype DQM','')
299  commands.append(cmd)
300  ranStepList.append(stepName)
301  stepIndex+=1
302 
303  self.workFlowSteps[(num,prefix)] = (num, name, commands, ranStepList)
304 
305  return
306 
307 

References MatrixReader.MatrixReader.addCommand, MatrixReader.MatrixReader.apply, MatrixUtil.changeRefRelease(), MatrixReader.MatrixReader.filesPrefMap, dqmMemoryStats.float, createfilelist.int, join(), MatrixReader.MatrixReader.makeCmd(), MatrixReader.MatrixReader.makeStep(), genParticles_cff.map, MatrixReader.MatrixReader.noRun, MatrixReader.MatrixReader.overWrite, print(), FastTimerService_cff.range, MatrixReader.MatrixReader.relvalModule, MatrixReader.MatrixReader.revertDqmio, str, MatrixReader.MatrixReader.wm, MatrixReader.MatrixReader.workFlowSteps, and ComparisonHelper.zip().

Referenced by MatrixReader.MatrixReader.prepare(), and MatrixReader.MatrixReader.showRaw().

◆ reset()

def MatrixReader.MatrixReader.reset (   self,
  what = 'all' 
)

Definition at line 33 of file MatrixReader.py.

33  def reset(self, what='all'):
34 
35  self.what = what
36 
37  #a bunch of information, but not yet the WorkFlow object
38  self.workFlowSteps = {}
39  #the actual WorkFlow objects
40  self.workFlows = []
41  self.nameList = {}
42 
43  self.filesPrefMap = {'relval_standard' : 'std-' ,
44  'relval_highstats': 'hi-' ,
45  'relval_pileup': 'PU-' ,
46  'relval_generator': 'gen-',
47  'relval_extendedgen': 'genExt-',
48  'relval_production': 'prod-' ,
49  'relval_ged': 'ged-',
50  'relval_upgrade':'upg-',
51  'relval_2017':'2017-',
52  'relval_2026':'2026-',
53  'relval_identity':'id-',
54  'relval_machine': 'mach-',
55  'relval_premix': 'premix-'
56  }
57 
58  self.files = ['relval_standard' ,
59  'relval_highstats',
60  'relval_pileup',
61  'relval_generator',
62  'relval_extendedgen',
63  'relval_production',
64  'relval_ged',
65  'relval_upgrade',
66  'relval_2017',
67  'relval_2026',
68  'relval_identity',
69  'relval_machine',
70  'relval_premix'
71  ]
72  self.filesDefault = {'relval_standard':True ,
73  'relval_highstats':True ,
74  'relval_pileup':True,
75  'relval_generator':True,
76  'relval_extendedgen':True,
77  'relval_production':True,
78  'relval_ged':True,
79  'relval_upgrade':False,
80  'relval_2017':True,
81  'relval_2026':True,
82  'relval_identity':False,
83  'relval_machine':True,
84  'relval_premix':True
85  }
86 
87  self.relvalModule = None
88 
89  return
90 

Referenced by MatrixReader.MatrixReader.__init__(), and MatrixReader.MatrixReader.showRaw().

◆ show()

def MatrixReader.MatrixReader.show (   self,
  selected = None,
  extended = True,
  cafVeto = True 
)

Definition at line 512 of file MatrixReader.py.

512  def show(self, selected=None, extended=True, cafVeto=True):
513 
514  self.showWorkFlows(selected, extended, cafVeto)
515  print('\n','-'*80,'\n')
516 
517 

References print(), and MatrixReader.MatrixReader.showWorkFlows().

◆ showRaw()

def MatrixReader.MatrixReader.showRaw (   self,
  useInput,
  refRel = None,
  fromScratch = None,
  what = 'all',
  step1Only = False,
  selected = None 
)

Definition at line 308 of file MatrixReader.py.

308  def showRaw(self, useInput, refRel=None, fromScratch=None, what='all',step1Only=False,selected=None):
309 
310  if selected:
311  selected=map(float,selected)
312  for matrixFile in self.files:
313 
314  self.reset(what)
315 
316  if self.what != 'all' and self.what not in matrixFile:
317  print("ignoring non-requested file",matrixFile)
318  continue
319 
320  if self.what == 'all' and not self.filesDefault[matrixFile]:
321  print("ignoring file not used by default (enable with -w)",matrixFile)
322  continue
323 
324  try:
325  self.readMatrix(matrixFile, useInput, refRel, fromScratch)
326  except Exception as e:
327  print("ERROR reading file:", matrixFile, str(e))
328  raise
329 
330  if not self.workFlowSteps: continue
331 
332  dataFileName = matrixFile.replace('relval_', 'cmsDriver_')+'_hlt.txt'
333  outFile = open(dataFileName,'w')
334 
335  print("found ", len(self.workFlowSteps), ' workflows for ', dataFileName)
336  ids = sorted(self.workFlowSteps.keys())
337  indexAndSteps=[]
338 
339  writtenWF=0
340  for key in ids:
341  if selected and not (key[0] in selected):
342  continue
343  #trick to skip the HImix IB test
344  if key[0]==203.1 or key[0]==204.1 or key[0]==205.1 or key[0]==4.51 or key[0]==4.52: continue
345  num, name, commands, stepList = self.workFlowSteps[key]
346 
347  wfName,stepNames= name.split('+',1)
348 
349  stepNames=stepNames.replace('+SKIMCOSD','')
350  stepNames=stepNames.replace('+SKIMD','')
351  if 'HARVEST' in stepNames:
352  #find out automatically what to remove
353  exactb=stepNames.index('+HARVEST')
354  exacte=stepNames.index('+',exactb+1) if ('+' in stepNames[exactb+1:]) else (len(stepNames))
355  stepNames=stepNames.replace(stepNames[exactb:exacte],'')
356  otherSteps = None
357  if '+' in stepNames:
358  step1,otherSteps = stepNames.split('+',1)
359 
360  line = str(num) + ' ++ '+ wfName
361  if otherSteps and not step1Only:
362  line += ' ++ ' +otherSteps.replace('+',',')
363  else:
364  line += ' ++ none'
365  inputInfo=None
366  if not isinstance(commands[0],str):
367  inputInfo=commands[0]
368  if otherSteps:
369  for (i,c) in enumerate(otherSteps.split('+')):
370  #pad with set
371  for p in range(len(indexAndSteps),i+2):
372  indexAndSteps.append(set())
373  indexAndSteps[i+1].add((c,commands[i+1]))
374 
375  if inputInfo :
376  #skip the samples from INPUT when step1Only is on
377  if step1Only: continue
378  line += ' ++ REALDATA: '+inputInfo.dataSet
379  if inputInfo.run!=[]: line += ', RUN:'+'|'.join(map(str,inputInfo.run))
380  line += ', FILES: ' +str(inputInfo.files)
381  line += ', EVENTS: '+str(inputInfo.events)
382  if inputInfo.label!='':
383  line += ', LABEL: ' +inputInfo.label
384  line += ', LOCATION:'+inputInfo.location
385  line += ' @@@'
386  else:
387  line += ' @@@ '+commands[0]
388  if self.revertDqmio=='yes':
389  line=line.replace('DQMIO','DQM')
390  writtenWF+=1
391  outFile.write(line+'\n')
392 
393 
394  outFile.write('\n'+'\n')
395  if step1Only: continue
396 
397  for (index,s) in enumerate(indexAndSteps):
398  for (stepName,cmd) in s:
399  stepIndex=index+1
400  if 'dasquery.log' in cmd: continue
401  line = 'STEP%d ++ '%(stepIndex,) +stepName + ' @@@ '+cmd
402  if self.revertDqmio=='yes':
403  line=line.replace('DQMIO','DQM')
404  outFile.write(line+'\n')
405  outFile.write('\n'+'\n')
406  outFile.close()
407  print("wrote ",writtenWF, ' workflow'+('s' if (writtenWF!=1) else ''),' to ', outFile.name)
408  return
409 

References PVValHelper.add(), MatrixReader.MatrixReader.files, MatrixReader.MatrixReader.filesDefault, join(), relativeConstraints.keys, genParticles_cff.map, print(), FastTimerService_cff.range, MatrixReader.MatrixReader.readMatrix(), PuppiAlgo.reset(), TPedResult.reset(), BinningPointByMap.reset(), AlcaBeamSpotManager.reset(), RPCFebConnector.reset(), EcalCondHeader.reset(), VEcalCalibBlock.reset(), ApvLatencyAnalysis.reset(), SiPixelStatusManager.reset(), SiStripMiscalibrate::Entry.reset(), MatrixReader.MatrixReader.reset(), TB06Tree.reset(), IMACalibBlock.reset(), SamplingAnalysis.reset(), FactorizedJetCorrectorCalculator::VariableValues.reset(), L3CalibBlock.reset(), pos::PixelROCStatus.reset(), FedTimingAnalysis.reset(), L1MuDTTFMasks.reset(), L1MuDTTFParameters.reset(), SiStripPI::Entry.reset(), L1MuDTPtaLut.reset(), RPCAMCLink.reset(), RPCDCCLink.reset(), L1MuDTPhiLut.reset(), FedCablingAnalysis.reset(), L1MuDTEtaPatternLut.reset(), L1MuDTQualPatternLut.reset(), PedsOnlyAnalysis.reset(), L1MuDTExtLut.reset(), TB06Reco.reset(), VpspScanAnalysis.reset(), coral_bridge::AuthenticationCredentialSet.reset(), PhysicsTools::Calibration::Histogram2D< Value_t, AxisX_t, AxisY_t >.reset(), PhysicsTools::Calibration::Histogram< Value_t, Axis_t >.reset(), NoiseAnalysis.reset(), PedestalsAnalysis.reset(), OptoScanAnalysis.reset(), CalibrationScanAnalysis.reset(), ApvTimingAnalysis.reset(), TB06TreeH2.reset(), DaqScopeModeAnalysis.reset(), cond::persistency::RunInfoProxy.reset(), FastFedCablingAnalysis.reset(), RPCLBLink.reset(), PhysicsTools::Calibration::Histogram3D< Value_t, AxisX_t, AxisY_t, AxisZ_t >.reset(), cond::persistency::GTProxy.reset(), AlignableBeamSpot.reset(), PedsFullNoiseAnalysis.reset(), CalibrationAnalysis.reset(), CommissioningAnalysis.reset(), cond::XMLAuthenticationService::XMLAuthenticationService.reset(), TB06RecoH2.reset(), cond::persistency::IOVProxy.reset(), TrackerMap.reset(), data_sources.json_list.reset(), DTTFBitArray< N >.reset(), LHCInfoImpl::LumiSectionFilter.reset(), tkal_create_file_lists._DasCache.reset(), MatrixReader.MatrixReader.revertDqmio, str, MatrixReader.MatrixReader.what, and MatrixReader.MatrixReader.workFlowSteps.

◆ showWorkFlows()

def MatrixReader.MatrixReader.showWorkFlows (   self,
  selected = None,
  extended = True,
  cafVeto = True 
)

Definition at line 425 of file MatrixReader.py.

425  def showWorkFlows(self, selected=None, extended=True, cafVeto=True):
426  if selected: selected = list(map(float,selected))
427  wfs = self.workFlowsByLocation(cafVeto)
428  maxLen = 100 # for summary, limit width of output
429  fmt1 = "%-6s %-35s [1]: %s ..."
430  fmt2 = " %35s [%d]: %s ..."
431  print("\nfound a total of ", len(wfs), ' workflows:')
432  if selected:
433  print(" of which the following", len(selected), 'were selected:')
434  #-ap for now:
435  maxLen = -1 # for individual listing, no limit on width
436  fmt1 = "%-6s %-35s [1]: %s "
437  fmt2 = " %35s [%d]: %s"
438 
439  N=[]
440  for wf in wfs:
441  if selected and float(wf.numId) not in selected: continue
442  if extended: print('')
443  #pad with zeros
444  for i in range(len(N),len(wf.cmds)): N.append(0)
445  N[len(wf.cmds)-1]+=1
446  wfName, stepNames = wf.nameId.split('+',1)
447  for i,s in enumerate(wf.cmds):
448  if extended:
449  if i==0:
450  print(fmt1 % (wf.numId, stepNames, (str(s)+' ')[:maxLen]))
451  else:
452  print(fmt2 % ( ' ', i+1, (str(s)+' ')[:maxLen]))
453  else:
454  print("%-6s %-35s "% (wf.numId, stepNames))
455  break
456  print('')
457  for i,n in enumerate(N):
458  if n: print(n,'workflows with',i+1,'steps')
459 
460  return
461 

References dqmMemoryStats.float, genParticles_cff.map, print(), FastTimerService_cff.range, str, and MatrixReader.MatrixReader.workFlowsByLocation().

Referenced by MatrixReader.MatrixReader.show().

◆ updateDB()

def MatrixReader.MatrixReader.updateDB (   self)

Definition at line 518 of file MatrixReader.py.

518  def updateDB(self):
519 
520  import pickle
521  pickle.dump(self.workFlows, open('theMatrix.pkl', 'w') )
522 
523  return
524 

References MatrixReader.MatrixReader.workFlows.

◆ workFlowsByLocation()

def MatrixReader.MatrixReader.workFlowsByLocation (   self,
  cafVeto = True 
)

Definition at line 410 of file MatrixReader.py.

410  def workFlowsByLocation(self, cafVeto=True):
411  # Check if we are on CAF
412  onCAF = False
413  if 'cms/caf/cms' in os.environ['CMS_PATH']:
414  onCAF = True
415 
416  workflows = []
417  for workflow in self.workFlows:
418  if isinstance(workflow.cmds[0], InputInfo):
419  if cafVeto and (workflow.cmds[0].location == 'CAF' and not onCAF):
420  continue
421  workflows.append(workflow)
422 
423  return workflows
424 

References MatrixReader.MatrixReader.workFlows.

Referenced by MatrixReader.MatrixReader.showWorkFlows().

Member Data Documentation

◆ addCommand

MatrixReader.MatrixReader.addCommand

Definition at line 25 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ apply

MatrixReader.MatrixReader.apply

◆ commandLineWf

MatrixReader.MatrixReader.commandLineWf

Definition at line 27 of file MatrixReader.py.

◆ files

MatrixReader.MatrixReader.files

◆ filesDefault

MatrixReader.MatrixReader.filesDefault

◆ filesPrefMap

MatrixReader.MatrixReader.filesPrefMap

◆ nameList

MatrixReader.MatrixReader.nameList

Definition at line 41 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.createWorkFlows().

◆ noRun

MatrixReader.MatrixReader.noRun

Definition at line 30 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ overWrite

MatrixReader.MatrixReader.overWrite

Definition at line 28 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ relvalModule

MatrixReader.MatrixReader.relvalModule

Definition at line 87 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ revertDqmio

MatrixReader.MatrixReader.revertDqmio

maybe we want too level deep input

Definition at line 24 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix(), and MatrixReader.MatrixReader.showRaw().

◆ what

MatrixReader.MatrixReader.what

◆ wm

MatrixReader.MatrixReader.wm

Definition at line 23 of file MatrixReader.py.

Referenced by MatrixReader.MatrixReader.readMatrix().

◆ workFlows

MatrixReader.MatrixReader.workFlows

◆ workFlowSteps

MatrixReader.MatrixReader.workFlowSteps
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
relval_steps
submitPVValidationJobs.updateDB
def updateDB(run, runInfo)
Definition: submitPVValidationJobs.py:237
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
runTheMatrix.showRaw
def showRaw(opt)
Definition: runTheMatrix.py:11
str
#define str(s)
Definition: TestProcessor.cc:51
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
MatrixUtil.changeRefRelease
def changeRefRelease(steps, listOfPairs)
Definition: MatrixUtil.py:236
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
mps_setup.append
append
Definition: mps_setup.py:85
createfilelist.int
int
Definition: createfilelist.py:10
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:41
WorkFlow
Definition: WorkFlow.py:1
reset
void reset(double vett[256])
Definition: TPedValues.cc:11
genParticles_cff.map
map
Definition: genParticles_cff.py:11
merge
Definition: merge.py:1