|
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 | 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 | _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 | _validateSequence (self, sequence, label) |
|
def | _validateTask (self, task, label) |
|
Root class for a CMS configuration process
Definition at line 101 of file Config.py.
def Config.Process.__setattr__ |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
Definition at line 320 of file Config.py.
References Config.Process.__findFirstUsingModule(), Config.Process.__isStrict, Config.Process.__setObjectLabel(), 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().
322 if not name.replace(
'_',
'').isalnum():
323 raise ValueError(
'The label '+name+
' contains forbiden characters')
326 if name.startswith(
'_Process__'):
327 self.__dict__[name]=value
329 if not isinstance(value,_ConfigureComponent):
330 raise TypeError(
"can only assign labels to an object that inherits from '_ConfigureComponent'\n" 331 +
"an instance of "+
str(type(value))+
" will not work - requested label is "+name)
332 if not isinstance(value,_Labelable)
and not isinstance(value,Source)
and not isinstance(value,Looper)
and not isinstance(value,Schedule):
333 if name == value.type_():
338 raise TypeError(
"an instance of "+
str(type(value))+
" can not be assigned the label '"+name+
"'.\n"+
339 "Please either use the label '"+value.type_()+
" or use the 'add_' method instead.")
342 newValue =value.copy()
344 newValue._filename = value._filename
350 if not self.
_okToPlace(name, value, self.__dict__):
351 newFile=
'top level config' 352 if hasattr(value,
'_filename'):
353 newFile = value._filename
354 oldFile=
'top level config' 355 oldValue = getattr(self,name)
356 if hasattr(oldValue,
'_filename'):
357 oldFile = oldValue._filename
358 msg =
"Trying to override definition of process."+name
359 msg +=
"\n new object defined in: "+newFile
360 msg +=
"\n existing object defined in: "+oldFile
361 raise ValueError(msg)
363 if hasattr(self,name)
and not (getattr(self,name)==newValue):
367 if newValue._isTaskComponent():
368 if not self.__InExtendCall:
372 if not isinstance(newValue, Task):
374 newFile=
'top level config' 375 if hasattr(value,
'_filename'):
376 newFile = value._filename
377 oldFile=
'top level config' 378 oldValue = getattr(self,name)
379 if hasattr(oldValue,
'_filename'):
380 oldFile = oldValue._filename
381 msg1 =
"Trying to override definition of "+name+
" while it is used by the task " 382 msg2 =
"\n new object defined in: "+newFile
383 msg2 +=
"\n existing object defined in: "+oldFile
386 raise ValueError(msg1+s.label_()+msg2)
388 if isinstance(newValue, _Sequenceable)
or newValue._isTaskComponent():
389 if not self.__InExtendCall:
393 newFile=
'top level config' 394 if hasattr(value,
'_filename'):
395 newFile = value._filename
396 oldFile=
'top level config' 397 oldValue = getattr(self,name)
398 if hasattr(oldValue,
'_filename'):
399 oldFile = oldValue._filename
400 msg1 =
"Trying to override definition of "+name+
" while it is used by the " 401 msg2 =
"\n new object defined in: "+newFile
402 msg2 +=
"\n existing object defined in: "+oldFile
405 raise ValueError(msg1+
"sequence "+s.label_()+msg2)
408 raise ValueError(msg1+
"path "+s.label_()+msg2)
411 raise ValueError(msg1+
"endpath "+s.label_()+msg2)
413 self.__dict__[name]=newValue
414 if isinstance(newValue,_Labelable):
416 self._cloneToObjectDict[
id(value)] = newValue
417 self._cloneToObjectDict[
id(newValue)] = newValue
419 newValue._place(name,self)
def __findFirstUsingModule(self, seqsOrTasks, mod)
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)
def Config.Process._insertPaths |
( |
|
self, |
|
|
|
processPSet, |
|
|
|
nodeVisitor |
|
) |
| |
|
private |
Definition at line 927 of file Config.py.
References Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, 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_, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, and edm::EventProcessor.schedule_.
933 for name
in self.
paths_():
934 scheduledPaths.append(name)
935 triggerPaths.append(name)
937 scheduledPaths.append(name)
938 endpaths.append(name)
941 pathname = path.label_()
942 scheduledPaths.append(pathname)
944 endpaths.append(pathname)
946 triggerPaths.append(pathname)
948 task.resolve(self.__dict__)
950 task.visit(scheduleTaskValidator)
951 task.visit(nodeVisitor)
952 processPSet.addVString(
True,
"@end_paths", endpaths)
953 processPSet.addVString(
True,
"@paths", scheduledPaths)
955 p = processPSet.newPSet()
956 p.addVString(
True,
"@trigger_paths", triggerPaths)
957 processPSet.addPSet(
True,
"@trigger_paths", p)
964 endpathCompositeVisitor =
CompositeVisitor(endpathValidator, nodeVisitor, lister)
965 for triggername
in triggerPaths:
966 iPath = self.
paths_()[triggername]
967 iPath.resolve(self.__dict__)
968 pathValidator.setLabel(triggername)
970 iPath.visit(pathCompositeVisitor)
971 iPath.insertInto(processPSet, triggername, decoratedList)
972 for endpathname
in endpaths:
974 iEndPath.resolve(self.__dict__)
975 endpathValidator.setLabel(endpathname)
977 iEndPath.visit(endpathCompositeVisitor)
978 iEndPath.insertInto(processPSet, endpathname, decoratedList)
979 processPSet.addVString(
False,
"@filters_on_endpaths", endpathValidator.filtersOnEndpaths)
def _insertPaths(self, processPSet, nodeVisitor)
return a string containing the equivalent process defined using the old configuration language
Definition at line 668 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_, cms::DDFilteredView.filters_, FilterOR.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().
669 """return a string containing the equivalent process defined using the old configuration language""" 670 config =
"process "+self.__name+
" = {\n" 719 for name,item
in six.iteritems(self.
psets):
720 config +=options.indentation()+item.configTypeName()+
' '+name+
' = '+item.configValue(options)
721 for name,item
in six.iteritems(self.
vpsets):
722 config +=options.indentation()+
'VPSet '+name+
' = '+item.configValue(options)
724 pathNames = [p.label_()
for p
in self.
schedule]
725 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 829 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_, cms::DDFilteredView.filters_, FilterOR.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_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.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 Mixins._Parameterizable.__addParameter(), Modules.SwitchProducer.__addParameter(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), Mixins._Parameterizable.__setattr__(), Modules.SwitchProducer.__setattr__(), and SequenceTypes.Schedule.__str__().
830 """return a string containing the equivalent process defined using python""" 831 specialImportRegistry._reset()
832 header =
"import FWCore.ParameterSet.Config as cms" 833 result =
"process = cms.Process(\""+self.__name+
"\")\n\n" 856 result +=
'process.schedule = ' + self.schedule.dumpPython(options)
857 imports = specialImportRegistry.getSpecialImports()
859 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 597 of file Config.py.
References psClasses.BuildTreeNode.__setattr__(), Config.Process.__setattr__(), Config.Process.__setObjectLabel(), Config.Process.add_(), cmsPerfStripChart.dict, 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().
598 """Look in other and find types that we can use""" 600 self.__dict__[
'_Process__InExtendCall'] =
True 603 tasksToAttach =
dict()
605 for name
in dir(other):
607 if name.startswith(
'_'):
609 item = getattr(other,name)
610 if name ==
"source" or name ==
"looper":
614 elif isinstance(item,_ModuleSequenceType):
616 elif isinstance(item,Task):
617 tasksToAttach[name] = item
618 elif isinstance(item,_Labelable):
620 if not item.hasLabel_() :
622 elif isinstance(item,Schedule):
624 elif isinstance(item,_Unlabelable):
626 elif isinstance(item,ProcessModifier):
628 elif isinstance(item,ProcessFragment):
632 for name,seq
in six.iteritems(seqs):
633 if id(seq)
not in self._cloneToObjectDict:
636 newSeq = self._cloneToObjectDict[
id(seq)]
637 self.__dict__[name]=newSeq
640 newSeq._place(name,self)
642 for name, task
in six.iteritems(tasksToAttach):
649 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 1136 of file Config.py.
1137 """Prefer this ES source or producer. The argument can 1138 either be an object label, e.g., 1139 process.prefer(process.juicerProducer) (not supported yet) 1140 or a name of an ESSource or ESProducer 1141 process.prefer("juicer") 1142 or a type of unnamed ESSource or ESProducer 1143 process.prefer("JuicerProducer") 1144 In addition, you can pass as a labelled arguments the name of the Record you wish to 1145 prefer where the type passed is a cms.vstring and that vstring can contain the 1146 name of the C++ types in the Record that are being preferred, e.g., 1147 #prefer all data in record 'OrangeRecord' from 'juicer' 1148 process.prefer("juicer", OrangeRecord=cms.vstring()) 1150 #prefer only "Orange" data in "OrangeRecord" from "juicer" 1151 process.prefer("juicer", OrangeRecord=cms.vstring("Orange")) 1153 #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer" 1154 ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp")) 1157 if isinstance(esmodule, ESSource)
or isinstance(esmodule, ESProducer):
1158 raise RuntimeError(
"Syntax of process.prefer(process.esmodule) not supported yet")
1163 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.
Definition at line 990 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_, cms::DDFilteredView.filters_, FilterOR.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_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, Config.Process.switchProducers_(), and Config.Process.vpsets_().
Referenced by dirstructure.Directory.prune().
990 def prune(self,verbose=False,keepUnresolvedSequencePlaceholders=False):
991 """ Remove clutter from the process that we think is unnecessary: 992 tracked PSets, VPSets and unused modules and sequences. If a Schedule has been set, then Paths and EndPaths 993 not in the schedule will also be removed, along with an modules and sequences used only by 994 those removed Paths and EndPaths.""" 1003 self.
resolve(keepUnresolvedSequencePlaceholders)
1005 unneededPaths = set()
1007 usedModules=set(self.
schedule_().moduleNames())
1009 schedNames = set(( x.label_()
for x
in self.
schedule_()))
1010 names = set(self.
paths)
1012 unneededPaths = names - schedNames
1013 for n
in unneededPaths:
1017 pths.extend(six.itervalues(self.
endpaths))
1019 usedModules=set(temp.moduleNames())
1027 for p
in six.itervalues(self.
paths):
1029 for p
in six.itervalues(self.
endpaths):
1031 keepSeqSet = set(( s
for s
in seqs
if s.hasLabel_()))
1032 availableSeqs = set(six.itervalues(self.
sequences))
1033 unneededSeqs = availableSeqs-keepSeqSet
1034 unneededSeqLabels = []
1035 for s
in unneededSeqs:
1036 unneededSeqLabels.append(s.label_())
1037 delattr(self,s.label_())
1039 print(
"prune removed the following:")
1040 print(
" modules:"+
",".
join(unneededModules))
1041 print(
" sequences:"+
",".
join(unneededSeqLabels))
1042 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