Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:31

0001 from PhysicsTools.HeppyCore.framework.analyzer import Analyzer
0002 
0003 class Filter(Analyzer):
0004     
0005     def process(self, event):
0006         input_collection = getattr(event, self.cfg_ana.input_objects)
0007         output_collection = [obj for obj in input_collection \
0008                              if self.cfg_ana.filter_func(obj)]
0009         setattr(event, self.instance_label, output_collection)