|
def | __delattr__ (self, name) |
|
def | __init__ (self, name, Mods) |
|
def | __setattr__ (self, name, value) |
|
def | __setstate__ (self, pkldict) |
|
def | add_ (self, value) |
|
def | addSubProcess (self, mod) |
|
def | aliases_ (self) |
|
def | analyzerNames (self) |
|
def | analyzers_ (self) |
|
def | dumpConfig (self, options=PrintOptions()) |
|
def | dumpPython (self, options=PrintOptions()) |
|
def | endpaths_ (self) |
|
def | es_prefers_ (self) |
|
def | es_producers_ (self) |
|
def | es_sources_ (self) |
|
def | extend (self, other, items=()) |
|
def | fillProcessDesc (self, processPSet) |
|
def | filterNames (self) |
|
def | filters_ (self) |
|
def | globalReplace (self, label, new) |
|
def | isUsingModifier (self, mod) |
|
def | load (self, moduleName) |
|
def | looper_ (self) |
|
def | name_ (self) |
|
def | outputModules_ (self) |
|
def | pathNames (self) |
|
def | paths_ (self) |
|
def | prefer (self, esmodule, args, kargs) |
|
def | producerNames (self) |
|
def | producers_ (self) |
|
def | prune (self, verbose=False, keepUnresolvedSequencePlaceholders=False) |
|
def | psets_ (self) |
|
def | resolve (self, keepUnresolvedSequencePlaceholders=False) |
|
def | schedule_ (self) |
|
def | sequences_ (self) |
|
def | services_ (self) |
|
def | setLooper_ (self, lpr) |
|
def | setName_ (self, name) |
|
def | setPartialSchedule_ (self, sch, label) |
|
def | setSchedule_ (self, sch) |
|
def | setSource_ (self, src) |
|
def | setStrict (self, value) |
|
def | source_ (self) |
|
def | splitPython (self, options=PrintOptions()) |
|
def | subProcesses_ (self) |
|
def | switchProducerNames (self) |
|
def | switchProducers_ (self) |
|
def | tasks_ (self) |
|
def | validate (self) |
|
def | vpsets_ (self) |
|
|
| aliases = property(aliases_,doc="dictionary containing the aliases for the process") |
|
| analyzers = property(analyzers_,doc="dictionary containing the analyzers for the process") |
|
| endpaths = property(endpaths_,doc="dictionary containing the endpaths for the process") |
|
| es_prefers = property(es_prefers_,doc="dictionary containing the es_prefers for the process") |
|
| es_producers = property(es_producers_,doc="dictionary containing the es_producers for the process") |
|
| es_sources = property(es_sources_,doc="dictionary containing the es_sources for the process") |
|
| filters = property(filters_, doc="dictionary containing the filters for the process") |
|
| looper = property(looper_,setLooper_,doc='the main looper or None if not set') |
|
| outputModules = property(outputModules_,doc="dictionary containing the output_modules for the process") |
|
| paths = property(paths_,doc="dictionary containing the paths for the process") |
|
| process = property(name_,setName_, doc="name of the process") |
|
| producers = property(producers_,doc="dictionary containing the producers for the process") |
|
| psets = property(psets_,doc="dictionary containing the PSets for the process") |
|
| schedule = property(schedule_,setSchedule_,doc='the schedule or None if not set') |
|
| sequences = property(sequences_,doc="dictionary containing the sequences for the process") |
|
| services = property(services_,doc="dictionary containing the services for the process") |
|
| source = property(source_,setSource_,doc='the main source or None if not set') |
|
| subProcesses = property(subProcesses_,doc='the SubProcesses that have been added to the Process') |
|
| switchProducers = property(switchProducers_,doc="dictionary containing the SwitchProducers for the process") |
|
| tasks = property(tasks_,doc="dictionary containing the tasks for the process") |
|
| vpsets = property(vpsets_,doc="dictionary containing the PSets for the process") |
|
|
def | __findFirstUsingModule (self, seqsOrTasks, mod) |
|
def | __setObjectLabel (self, object, newLabel) |
|
def | __updateMaxEvents (self, ps) |
|
def | __updateOptions (self, opt) |
|
def | _delattrFromSetattr (self, name) |
|
def | _delHelper (self, name) |
|
def | _dumpConfigESPrefers (self, options) |
|
def | _dumpConfigNamedList (self, items, typeName, options) |
|
def | _dumpConfigOptionallyNamedList (self, items, typeName, options) |
|
def | _dumpConfigUnnamedList (self, items, typeName, options) |
|
def | _dumpPython (self, d, options) |
|
def | _dumpPythonList (self, d, options) |
|
def | _dumpPythonSubProcesses (self, l, options) |
|
def | _findPreferred (self, esname, d, args, kargs) |
|
def | _insertInto (self, parameterSet, itemDict) |
|
def | _insertManyInto (self, parameterSet, label, itemDict, tracked) |
|
def | _insertOneInto (self, parameterSet, label, item, tracked) |
|
def | _insertPaths (self, processPSet, nodeVisitor) |
|
def | _insertSubProcessesInto (self, parameterSet, label, itemList, tracked) |
|
def | _insertSwitchProducersInto (self, parameterSet, labelModules, labelAliases, itemDict, tracked) |
|
def | _itemsInDependencyOrder (self, processDictionaryOfItems) |
|
def | _okToPlace (self, name, mod, d) |
|
def | _place (self, name, mod, d) |
|
def | _placeAlias (self, name, mod) |
|
def | _placeAnalyzer (self, name, mod) |
|
def | _placeEndPath (self, name, mod) |
|
def | _placeESPrefer (self, name, mod) |
|
def | _placeESProducer (self, name, mod) |
|
def | _placeESSource (self, name, mod) |
|
def | _placeFilter (self, name, mod) |
|
def | _placeLooper (self, name, mod) |
|
def | _placeOutputModule (self, name, mod) |
|
def | _placePath (self, name, mod) |
|
def | _placeProducer (self, name, mod) |
|
def | _placePSet (self, name, mod) |
|
def | _placeSequence (self, name, mod) |
|
def | _placeService (self, typeName, mod) |
|
def | _placeSource (self, name, mod) |
|
def | _placeSubProcess (self, name, mod) |
|
def | _placeSwitchProducer (self, name, mod) |
|
def | _placeTask (self, name, task) |
|
def | _placeVPSet (self, name, mod) |
|
def | _pruneModules (self, d, scheduledNames) |
|
def | _replaceInSchedule (self, label, new) |
|
def | _replaceInSequences (self, label, new) |
|
def | _replaceInTasks (self, label, new) |
|
def | _splitPython (self, subfolder, d, options) |
|
def | _splitPythonList (self, subfolder, d, options) |
|
def | _validateSequence (self, sequence, label) |
|
def | _validateTask (self, task, label) |
|
Root class for a CMS configuration process
Definition at line 102 of file Config.py.
def Config.Process.__setattr__ |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
Definition at line 376 of file Config.py.
References Config.Process.__findFirstUsingModule(), Config.Process.__isStrict, Config.Process.__setObjectLabel(), Config.Process.__updateMaxEvents(), Config.Process.__updateOptions(), Config.Process._delattrFromSetattr(), Config.Process._okToPlace(), Config.Process._replaceInSchedule(), Config.Process._replaceInSequences(), Config.Process._replaceInTasks(), Config.Process.add_(), Config.Process.endpaths, triggerObjects_cff.id, cms::DDSpecPar.paths, Config.Process.paths, Config.Process.sequences, str, and Config.Process.tasks.
Referenced by Config.Process._findPreferred(), Config.Process.extend(), and GenObject.GenObject.setValue().
378 if not name.replace(
'_',
'').isalnum():
379 raise ValueError(
'The label '+name+
' contains forbiden characters')
381 if name ==
'options':
383 if name ==
'maxEvents':
387 if name.startswith(
'_Process__'):
388 self.__dict__[name]=value
390 if not isinstance(value,_ConfigureComponent):
391 raise TypeError(
"can only assign labels to an object that inherits from '_ConfigureComponent'\n" 392 +
"an instance of "+
str(type(value))+
" will not work - requested label is "+name)
393 if not isinstance(value,_Labelable)
and not isinstance(value,Source)
and not isinstance(value,Looper)
and not isinstance(value,Schedule):
394 if name == value.type_():
399 raise TypeError(
"an instance of "+
str(type(value))+
" can not be assigned the label '"+name+
"'.\n"+
400 "Please either use the label '"+value.type_()+
" or use the 'add_' method instead.")
403 newValue =value.copy()
405 newValue._filename = value._filename
411 if not self.
_okToPlace(name, value, self.__dict__):
412 newFile=
'top level config' 413 if hasattr(value,
'_filename'):
414 newFile = value._filename
415 oldFile=
'top level config' 416 oldValue = getattr(self,name)
417 if hasattr(oldValue,
'_filename'):
418 oldFile = oldValue._filename
419 msg =
"Trying to override definition of process."+name
420 msg +=
"\n new object defined in: "+newFile
421 msg +=
"\n existing object defined in: "+oldFile
422 raise ValueError(msg)
424 if hasattr(self,name)
and not (getattr(self,name)==newValue):
428 if newValue._isTaskComponent():
429 if not self.__InExtendCall:
433 if not isinstance(newValue, Task):
435 newFile=
'top level config' 436 if hasattr(value,
'_filename'):
437 newFile = value._filename
438 oldFile=
'top level config' 439 oldValue = getattr(self,name)
440 if hasattr(oldValue,
'_filename'):
441 oldFile = oldValue._filename
442 msg1 =
"Trying to override definition of "+name+
" while it is used by the task " 443 msg2 =
"\n new object defined in: "+newFile
444 msg2 +=
"\n existing object defined in: "+oldFile
447 raise ValueError(msg1+s.label_()+msg2)
449 if isinstance(newValue, _Sequenceable)
or newValue._isTaskComponent():
450 if not self.__InExtendCall:
454 newFile=
'top level config' 455 if hasattr(value,
'_filename'):
456 newFile = value._filename
457 oldFile=
'top level config' 458 oldValue = getattr(self,name)
459 if hasattr(oldValue,
'_filename'):
460 oldFile = oldValue._filename
461 msg1 =
"Trying to override definition of "+name+
" while it is used by the " 462 msg2 =
"\n new object defined in: "+newFile
463 msg2 +=
"\n existing object defined in: "+oldFile
466 raise ValueError(msg1+
"sequence "+s.label_()+msg2)
469 raise ValueError(msg1+
"path "+s.label_()+msg2)
472 raise ValueError(msg1+
"endpath "+s.label_()+msg2)
475 if isinstance(newValue, EDAlias):
476 oldValue = getattr(self, name)
478 newFile=
'top level config' 479 if hasattr(value,
'_filename'):
480 newFile = value._filename
481 oldFile=
'top level config' 482 if hasattr(oldValue,
'_filename'):
483 oldFile = oldValue._filename
484 msg1 =
"Trying to override definition of "+name+
" with an EDAlias while it is used by the " 485 msg2 =
"\n new object defined in: "+newFile
486 msg2 +=
"\n existing object defined in: "+oldFile
489 raise ValueError(msg1+
"task "+s.label_()+msg2)
492 raise ValueError(msg1+
"sequence "+s.label_()+msg2)
495 raise ValueError(msg1+
"path "+s.label_()+msg2)
498 raise ValueError(msg1+
"endpath "+s.label_()+msg2)
501 self.__dict__[name]=newValue
502 if isinstance(newValue,_Labelable):
504 self._cloneToObjectDict[
id(value)] = newValue
505 self._cloneToObjectDict[
id(newValue)] = newValue
507 newValue._place(name,self)
def __findFirstUsingModule(self, seqsOrTasks, mod)
def __updateMaxEvents(self, ps)
def __updateOptions(self, opt)
def _okToPlace(self, name, mod, d)
def _replaceInTasks(self, label, new)
def __setattr__(self, name, value)
def __setObjectLabel(self, object, newLabel)
def _replaceInSequences(self, label, new)
def _delattrFromSetattr(self, name)
def _replaceInSchedule(self, label, new)
return a string containing the equivalent process defined using the old configuration language
Definition at line 759 of file Config.py.
References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._dumpConfigESPrefers(), Config.Process._dumpConfigNamedList(), Config.Process._dumpConfigOptionallyNamedList(), Config.Process._dumpConfigUnnamedList(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, cms::DDFilteredView.filters_, Config.Process.filters_(), FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, ConfigBuilder.ConfigBuilder.schedule, Config.Process.schedule, Config.Process.sequences_(), edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), and Config.Process.vpsets.
Referenced by Types.SecSource.configValue().
760 """return a string containing the equivalent process defined using the old configuration language""" 761 config =
"process "+self.__name+
" = {\n" 810 for name,item
in six.iteritems(self.
psets):
811 config +=options.indentation()+item.configTypeName()+
' '+name+
' = '+item.configValue(options)
812 for name,item
in six.iteritems(self.
vpsets):
813 config +=options.indentation()+
'VPSet '+name+
' = '+item.configValue(options)
815 pathNames = [p.label_()
for p
in self.
schedule]
816 config +=options.indentation()+
'schedule = {'+
','.
join(pathNames)+
'}\n' def _dumpConfigOptionallyNamedList(self, items, typeName, options)
def _dumpConfigUnnamedList(self, items, typeName, options)
def _dumpConfigESPrefers(self, options)
static std::string join(char **cmd)
def _dumpConfigNamedList(self, items, typeName, options)
def dumpConfig(self, options=PrintOptions())
def switchProducers_(self)
return a string containing the equivalent process defined using python
Definition at line 955 of file Config.py.
References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._dumpPython(), Config.Process._dumpPythonList(), Config.Process._dumpPythonSubProcesses(), Config.Process._itemsInDependencyOrder(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_prefers_(), Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, cms::DDFilteredView.filters_, Config.Process.filters_(), FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, edm::test::TestProcessor.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets.
Referenced by Modules.SwitchProducer.__addParameter(), Types._AllowedParameterTypes.__init__(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), Mixins._Parameterizable.__setattr__(), Modules.SwitchProducer.__setattr__(), SequenceTypes.Schedule.__str__(), and Config.Process.splitPython().
956 """return a string containing the equivalent process defined using python""" 957 specialImportRegistry._reset()
958 header =
"import FWCore.ParameterSet.Config as cms" 959 result =
"process = cms.Process(\""+self.__name+
"\")\n\n" 982 result +=
'process.schedule = ' + self.schedule.dumpPython(options)
983 imports = specialImportRegistry.getSpecialImports()
985 header +=
"\n" +
"\n".
join(imports)
def _itemsInDependencyOrder(self, processDictionaryOfItems)
def _dumpPythonSubProcesses(self, l, options)
static std::string join(char **cmd)
def dumpPython(self, options=PrintOptions())
def switchProducers_(self)
def _dumpPythonList(self, d, options)
def _dumpPython(self, d, options)
def Config.Process.extend |
( |
|
self, |
|
|
|
other, |
|
|
|
items = () |
|
) |
| |
Look in other and find types that we can use
Definition at line 685 of file Config.py.
References psClasses.BuildTreeNode.__setattr__(), Config.Process.__setattr__(), Config.FilteredStream.__setattr__, Config.Process.__setObjectLabel(), Config.Process.add_(), DeadROC_duringRun.dir, svgfig.SVG.extend(), Config.Process.extend(), and triggerObjects_cff.id.
Referenced by MatrixUtil.WF.__init__(), Config.Process.extend(), Config.Process.load(), and Mixins._ValidatingParameterListBase.setValue().
686 """Look in other and find types that we can use""" 688 self.__dict__[
'_Process__InExtendCall'] =
True 691 tasksToAttach = dict()
693 for name
in dir(other):
695 if name.startswith(
'_'):
697 item = getattr(other,name)
698 if name ==
"source" or name ==
"looper":
702 elif isinstance(item,_ModuleSequenceType):
704 elif isinstance(item,Task):
705 tasksToAttach[name] = item
706 elif isinstance(item,_Labelable):
708 if not item.hasLabel_() :
710 elif isinstance(item,Schedule):
712 elif isinstance(item,_Unlabelable):
714 elif isinstance(item,ProcessModifier):
716 elif isinstance(item,ProcessFragment):
720 for name,seq
in six.iteritems(seqs):
721 if id(seq)
not in self._cloneToObjectDict:
724 newSeq = self._cloneToObjectDict[
id(seq)]
725 self.__dict__[name]=newSeq
728 newSeq._place(name,self)
730 for name, task
in six.iteritems(tasksToAttach):
737 self.__dict__[
'_Process__InExtendCall'] =
False
def extend(self, other, items=())
def __setattr__(self, name, value)
def __setObjectLabel(self, object, newLabel)
def Config.Process.prefer |
( |
|
self, |
|
|
|
esmodule, |
|
|
|
args, |
|
|
|
kargs |
|
) |
| |
Prefer this ES source or producer. The argument can
either be an object label, e.g.,
process.prefer(process.juicerProducer) (not supported yet)
or a name of an ESSource or ESProducer
process.prefer("juicer")
or a type of unnamed ESSource or ESProducer
process.prefer("JuicerProducer")
In addition, you can pass as a labelled arguments the name of the Record you wish to
prefer where the type passed is a cms.vstring and that vstring can contain the
name of the C++ types in the Record that are being preferred, e.g.,
#prefer all data in record 'OrangeRecord' from 'juicer'
process.prefer("juicer", OrangeRecord=cms.vstring())
or
#prefer only "Orange" data in "OrangeRecord" from "juicer"
process.prefer("juicer", OrangeRecord=cms.vstring("Orange"))
or
#prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer"
ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp"))
Definition at line 1349 of file Config.py.
1350 """Prefer this ES source or producer. The argument can 1351 either be an object label, e.g., 1352 process.prefer(process.juicerProducer) (not supported yet) 1353 or a name of an ESSource or ESProducer 1354 process.prefer("juicer") 1355 or a type of unnamed ESSource or ESProducer 1356 process.prefer("JuicerProducer") 1357 In addition, you can pass as a labelled arguments the name of the Record you wish to 1358 prefer where the type passed is a cms.vstring and that vstring can contain the 1359 name of the C++ types in the Record that are being preferred, e.g., 1360 #prefer all data in record 'OrangeRecord' from 'juicer' 1361 process.prefer("juicer", OrangeRecord=cms.vstring()) 1363 #prefer only "Orange" data in "OrangeRecord" from "juicer" 1364 process.prefer("juicer", OrangeRecord=cms.vstring("Orange")) 1366 #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer" 1367 ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp")) 1370 if isinstance(esmodule, ESSource)
or isinstance(esmodule, ESProducer):
1371 raise RuntimeError(
"Syntax of process.prefer(process.esmodule) not supported yet")
1376 raise RuntimeError(
"Cannot resolve prefer for "+repr(esmodule))
def _findPreferred(self, esname, d, args, kargs)
def prefer(self, esmodule, args, kargs)
def Config.Process.prune |
( |
|
self, |
|
|
|
verbose = False , |
|
|
|
keepUnresolvedSequencePlaceholders = False |
|
) |
| |
Remove clutter from the process that we think is unnecessary:
tracked PSets, VPSets and unused modules and sequences. If a Schedule has been set, then Paths and EndPaths
not in the schedule will also be removed, along with an modules and sequences used only by
those removed Paths and EndPaths. The keepUnresolvedSequencePlaceholders keeps also unresolved TaskPlaceholders.
Definition at line 1190 of file Config.py.
References Config.Process._pruneModules(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths, pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, cms::DDFilteredView.filters_, Config.Process.filters_(), FilterSelection.filters_, FilterSelections.filters_, join(), list(), cms::DDSpecPar.paths, Config.Process.paths, edm.print(), pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Json::Path.resolve(), Config.Process.resolve(), EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, edm::test::TestProcessor.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets_().
Referenced by dirstructure.Directory.prune().
1190 def prune(self,verbose=False,keepUnresolvedSequencePlaceholders=False):
1191 """ Remove clutter from the process that we think is unnecessary: 1192 tracked PSets, VPSets and unused modules and sequences. If a Schedule has been set, then Paths and EndPaths 1193 not in the schedule will also be removed, along with an modules and sequences used only by 1194 those removed Paths and EndPaths. The keepUnresolvedSequencePlaceholders keeps also unresolved TaskPlaceholders.""" 1203 self.
resolve(keepUnresolvedSequencePlaceholders)
1205 unneededPaths = set()
1209 usedModules=set(self.
schedule_().moduleNames())
1211 schedNames = set(( x.label_()
for x
in self.
schedule_()))
1212 names = set(self.
paths)
1214 unneededPaths = names - schedNames
1215 for n
in unneededPaths:
1223 pths.extend(six.itervalues(self.
endpaths))
1225 usedModules=set(temp.moduleNames())
1233 for p
in six.itervalues(self.
paths):
1236 for p
in six.itervalues(self.
endpaths):
1239 def removeUnneeded(seqOrTasks, allSequencesOrTasks):
1240 _keepSet = set(( s
for s
in seqOrTasks
if s.hasLabel_()))
1241 _availableSet = set(six.itervalues(allSequencesOrTasks))
1242 _unneededSet = _availableSet-_keepSet
1243 _unneededLabels = []
1244 for s
in _unneededSet:
1245 _unneededLabels.append(s.label_())
1246 delattr(self,s.label_())
1247 return _unneededLabels
1248 unneededSeqLabels = removeUnneeded(seqs, self.
sequences)
1249 unneededTaskLabels = removeUnneeded(tasks, self.
tasks)
1251 print(
"prune removed the following:")
1252 print(
" modules:"+
",".
join(unneededModules))
1253 print(
" tasks:"+
",".
join(unneededTaskLabels))
1254 print(
" sequences:"+
",".
join(unneededSeqLabels))
1255 print(
" paths/endpaths:"+
",".
join(unneededPaths))
def _pruneModules(self, d, scheduledNames)
S & print(S &os, JobReport::InputFile const &f)
def resolve(self, keepUnresolvedSequencePlaceholders=False)
static std::string join(char **cmd)
def switchProducers_(self)
def prune(self, verbose=False, keepUnresolvedSequencePlaceholders=False)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
return a map of file names to python configuration fragments
Definition at line 989 of file Config.py.
References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._itemsInDependencyOrder(), Config.Process._splitPython(), Config.Process._splitPythonList(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.dumpPython(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_prefers_(), Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, cms::DDFilteredView.filters_, Config.Process.filters_(), FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, edm::test::TestProcessor.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets.
990 """return a map of file names to python configuration fragments""" 991 specialImportRegistry._reset()
993 options.isCfg =
False 994 header =
"import FWCore.ParameterSet.Config as cms" 999 result =
'process = cms.Process("' + self.__name +
'")\n\n' 1012 sys.stderr.write(
"error: subprocesses are not supported yet\n\n")
1028 if options.targetDirectory
is not None:
1029 files[options.targetDirectory +
'/__init__.py'] =
'' 1031 if options.useSubdirectories:
1032 for sub
in 'psets',
'modules',
'services',
'eventsetup',
'tasks',
'sequences',
'paths':
1033 if options.targetDirectory
is not None:
1034 sub = options.targetDirectory +
'/' + sub
1035 files[sub +
'/__init__.py'] =
'' 1037 for (name, (subfolder, code))
in six.iteritems(parts):
1038 filename = name +
'_cfi' 1039 if options.useSubdirectories
and subfolder:
1040 filename = subfolder +
'/' + filename
1041 if options.targetDirectory
is not None:
1042 filename = options.targetDirectory +
'/' + filename
1043 result +=
'process.load("%s")\n' % filename
1044 files[filename +
'.py'] = header +
'\n\n' + code
1047 options.isCfg =
True 1048 result +=
'process.schedule = ' + self.schedule.dumpPython(options)
1050 imports = specialImportRegistry.getSpecialImports()
1051 if len(imports) > 0:
1052 header +=
'\n' +
'\n'.
join(imports)
1053 files[
'-'] = header +
'\n\n' + result
def _splitPythonList(self, subfolder, d, options)
def _itemsInDependencyOrder(self, processDictionaryOfItems)
static std::string join(char **cmd)
def _splitPython(self, subfolder, d, options)
def dumpPython(self, options=PrintOptions())
def switchProducers_(self)
def splitPython(self, options=PrintOptions())