Пример #1
0
  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) )
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 def saveProcesses(self, stringVal):
     self._saveProcesses = ConfigHelper.makeList(stringVal)
Пример #5
0
 def trackerSDTypes(self, val):
     self._trackerSDTypes = ConfigHelper.makeList(val)
Пример #6
0
 def calorimeterSDTypes(self, val):
     self._calorimeterSDTypes = ConfigHelper.makeList(val)
Пример #7
0
 def saveProcesses(self, stringVal):
   self._saveProcesses = ConfigHelper.makeList( stringVal )