CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
Utils Namespace Reference

Classes

class  LoadPrerequisiteSource
 

Functions

def addMonitoring
 
def dictIO
 
def dqmIOSource
 
def dqmSeq
 
def gtNameAndConnect
 
def harvestingMode
 
def stepALCAPRODUCER
 
def validateProcess
 

Function Documentation

def Utils.addMonitoring (   process)
_addMonitoring_

Add the monitoring services to the process provided
in order to write out performance summaries to the framework job report

Definition at line 23 of file Utils.py.

Referenced by Reco.Reco.expressProcessing(), Impl.HeavyIons.HeavyIons.expressProcessing(), Impl.HeavyIons.HeavyIons.promptReco(), and Reco.Reco.promptReco().

23 
24 def addMonitoring(process):
25  """
26  _addMonitoring_
27 
28  Add the monitoring services to the process provided
29  in order to write out performance summaries to the framework job report
30  """
31  import FWCore.ParameterSet.Config as cms
32 
33  process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
34  jobReportOutputOnly = cms.untracked.bool(True)
35  )
36  process.Timing = cms.Service("Timing",
37  summaryOnly = cms.untracked.bool(True)
38  )
39 
40  return process
41 
def addMonitoring
Definition: Utils.py:23
def Utils.dictIO (   options,
  args 
)

Definition at line 108 of file Utils.py.

References TriggerAnalyzer.__str__(), and join().

Referenced by Reco.Reco.expressProcessing(), Impl.HeavyIons.HeavyIons.expressProcessing(), Impl.DataScouting.DataScouting.promptReco(), Impl.HeavyIons.HeavyIons.promptReco(), Impl.AlCa.AlCa.promptReco(), Reco.Reco.promptReco(), and Reco.Reco.visualizationProcessing().

109 def dictIO(options,args):
110  if args.has_key('outputs'):
111  options.outputDefinition = args['outputs'].__str__()
112  else:
113  writeTiers = args.get('writeTiers', [])
114  options.eventcontent = ','.join(writeTiers)
115  options.datatier = ','.join(writeTiers)
def dictIO
Definition: Utils.py:108
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def Utils.dqmIOSource (   args)

Definition at line 88 of file Utils.py.

Referenced by Impl.DataScouting.DataScouting.dqmHarvesting(), Impl.AlCa.AlCa.dqmHarvesting(), and Reco.Reco.dqmHarvesting().

88 
89 def dqmIOSource(args):
90  import FWCore.ParameterSet.Config as cms
91  if args.get('newDQMIO', False):
92  return cms.Source("DQMRootSource",
93  fileNames = cms.untracked(cms.vstring())
94  )
95  else:
96  return cms.Source("PoolSource",
97  fileNames = cms.untracked(cms.vstring())
98  )
def dqmIOSource
Definition: Utils.py:88
def Utils.dqmSeq (   args,
  default 
)

Definition at line 116 of file Utils.py.

References join().

Referenced by Impl.DataScouting.DataScouting.dqmHarvesting(), Reco.Reco.dqmHarvesting(), Reco.Reco.expressProcessing(), and Reco.Reco.promptReco().

117 def dqmSeq(args,default):
118  if 'dqmSeq' in args and len(args['dqmSeq'])!=0:
119  return ':'+('+'.join(args['dqmSeq']))
120  else:
121  return default
def dqmSeq
Definition: Utils.py:116
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def Utils.gtNameAndConnect (   globalTag,
  args 
)

Definition at line 122 of file Utils.py.

Referenced by Reco.Reco.alcaHarvesting(), Impl.DataScouting.DataScouting.dqmHarvesting(), Impl.AlCa.AlCa.dqmHarvesting(), Reco.Reco.dqmHarvesting(), Reco.Reco.expressProcessing(), Impl.DataScouting.DataScouting.promptReco(), Reco.Reco.promptReco(), Impl.AlCa.AlCa.promptReco(), Reco.Reco.skimming(), and Reco.Reco.visualizationProcessing().

123 def gtNameAndConnect(globalTag, args):
124  if args.has_key('globalTagConnect') and args['globalTagConnect'] != '':
125  return globalTag + ','+args['globalTagConnect']
126  return globalTag
def gtNameAndConnect
Definition: Utils.py:122
def Utils.harvestingMode (   process,
  datasetName,
  args,
  rANDl = True 
)

Definition at line 99 of file Utils.py.

Referenced by Impl.DataScouting.DataScouting.dqmHarvesting(), Impl.AlCa.AlCa.dqmHarvesting(), and Reco.Reco.dqmHarvesting().

99 
100 def harvestingMode(process, datasetName, args,rANDl=True):
101  import FWCore.ParameterSet.Config as cms
102  if rANDl and (not args.get('newDQMIO', False)):
103  process.source.processingMode = cms.untracked.string('RunsAndLumis')
104  process.dqmSaver.workflow = datasetName
105  process.dqmSaver.saveByLumiSection = 1
106  if args.has_key('referenceFile') and args.get('referenceFile', ''):
107  process.DQMStore.referenceFileName = cms.untracked.string(args['referenceFile'])
def harvestingMode
Definition: Utils.py:99
def Utils.stepALCAPRODUCER (   skims)
_stepALCAPRODUCER_

Creates and returns the configuration string for the ALCAPRODUCER step
starting from the list of AlcaReco path to be run.

Definition at line 9 of file Utils.py.

References join().

Referenced by Reco.Reco.expressProcessing(), Impl.HeavyIons.HeavyIons.expressProcessing(), Impl.HeavyIons.HeavyIons.promptReco(), Reco.Reco.promptReco(), and Impl.AlCa.AlCa.promptReco().

9 
10 def stepALCAPRODUCER(skims):
11  """
12  _stepALCAPRODUCER_
13 
14  Creates and returns the configuration string for the ALCAPRODUCER step
15  starting from the list of AlcaReco path to be run.
16 
17  """
18 
19  step = ''
20  if len(skims) >0:
21  step = ',ALCAPRODUCER:'+('+'.join(skims))
22  return step
def stepALCAPRODUCER
Definition: Utils.py:9
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def Utils.validateProcess (   process)
_validateProcess_

Check attributes of process are appropriate for production
This method returns nothing but will throw a RuntimeError for any issues it finds
likely to cause problems in the production system

Definition at line 42 of file Utils.py.

References relativeConstraints.keys.

42 
43 def validateProcess(process):
44  """
45  _validateProcess_
46 
47  Check attributes of process are appropriate for production
48  This method returns nothing but will throw a RuntimeError for any issues it finds
49  likely to cause problems in the production system
50 
51  """
52 
53  schedule=process.schedule_()
54  paths=process.paths_()
55  endpaths=process.endpaths_()
56 
57  # check output mods are in paths and have appropriate settings
58  for outputModName in process.outputModules_().keys():
59  outputMod = getattr(process, outputModName)
60  if not hasattr(outputMod, 'dataset'):
61  msg = "Process contains output module without dataset PSET: %s \n" % outputModName
62  msg += " You need to add this PSET to this module to set dataTier and filterName\n"
63  raise RuntimeError, msg
64  ds=getattr(outputMod,'dataset')
65  if not hasattr(ds, "dataTier"):
66  msg = "Process contains output module without dataTier parameter: %s \n" % outputModName
67  msg += " You need to add an untracked parameter to the dataset PSET of this module to set dataTier\n"
68  raise RuntimeError, msg
69 
70  # check module in path or whatever (not sure of exact syntax for endpath)
71  omRun=False
72 
73  if schedule==None:
74  for path in paths:
75  if outputModName in getattr(process,path).moduleNames():
76  omRun=True
77  for path in endpaths:
78  if outputModName in getattr(process,path).moduleNames():
79  omRun=True
80  else:
81  for path in schedule:
82  if outputModName in path.moduleNames():
83  omRun=True
84  if omRun==False:
85  msg = "Output Module %s not in endPath" % outputModName
86  raise RuntimeError, msg
87 
def validateProcess
Definition: Utils.py:42