def setupFilters( self, kernel): """ attach all filters to the kernel """ import DDG4 setOfFilters = set() for name, filt in self.filters.iteritems(): setOfFilters.add(name) ddFilt = DDG4.Filter(kernel,filt['name']) for para, value in filt['parameter'].iteritems(): setattr( ddFilt, para, value ) kernel.registerGlobalFilter(ddFilt) filt['filter'] = ddFilt from itertools import chain listOfFilters = [] for val in self.mapDetFilter.values(): listOfFilters += ConfigHelper.makeList(val) requestedFilter = set(chain( ConfigHelper.makeList(self.tracker), ConfigHelper.makeList(self.calo), listOfFilters)) print "ReqFilt",requestedFilter if requestedFilter - setOfFilters: raise RuntimeError(" Filter(s) '%s' are not registered!" % str(requestedFilter - setOfFilters) )
def __makeMapDetList(self): """ create the values of the mapDetFilters a list of filters """ for pattern, filters in self._mapDetFilter.iteritems(): self._mapDetFilter[pattern] = ConfigHelper.makeList(filters)
def __makeMapDetList( self ): """ create the values of the mapDetFilters a list of filters """ for pattern, filters in self._mapDetFilter.iteritems(): self._mapDetFilter[pattern] = ConfigHelper.makeList(filters)
def saveProcesses(self, stringVal): self._saveProcesses = ConfigHelper.makeList(stringVal)
def trackerSDTypes(self, val): self._trackerSDTypes = ConfigHelper.makeList(val)
def calorimeterSDTypes(self, val): self._calorimeterSDTypes = ConfigHelper.makeList(val)
def saveProcesses(self, stringVal): self._saveProcesses = ConfigHelper.makeList( stringVal )