CMS 3D CMS Logo

Filter.py
Go to the documentation of this file.
1 from PhysicsTools.HeppyCore.framework.analyzer import Analyzer
2 
3 class Filter(Analyzer):
4 
5  def process(self, event):
6  input_collection = getattr(event, self.cfg_ana.input_objects)
7  output_collection = [obj for obj in input_collection \
8  if self.cfg_ana.filter_func(obj)]
9  setattr(event, self.instance_label, output_collection)
def process(self, event)
Definition: Filter.py:5