1 #ifndef PhysicsTools_UtilAlgos_interface_EDFilterObjectWrapper_h 2 #define PhysicsTools_UtilAlgos_interface_EDFilterObjectWrapper_h 44 #include <boost/shared_ptr.hpp> 48 template<
class T,
class C>
60 if ( cfg.
exists(
"filter") ) {
72 auto objsToPut = std::make_unique<C>();
75 event.getByToken(
src_, h_c );
77 for (
typename C::const_iterator ibegin = h_c->begin(), iend = h_c->end(),
i = ibegin;
i != iend; ++
i ){
79 objsToPut->push_back( *
i );
83 bool pass = !objsToPut->empty();
bool doFilter_
whether or not to filter based on size
~FilterObjectWrapper() override
default destructor
T getParameter(std::string const &) const
C::iterator iterator
some convenient typedefs. Recall that C is a container class.
C::const_iterator const_iterator
FilterObjectWrapper(const edm::ParameterSet &cfg)
default contructor. Declares the output (type "C") and the filter (of type T, operates on C::value_ty...
boost::shared_ptr< T > filter_
shared pointer to analysis class of type BasicAnalyzer
bool exists(std::string const ¶meterName) const
checks if a parameter exists
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< C > src_
InputTag of the input source.
bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override
everything which has to be done during the event loop. NOTE: We can't use the eventSetup in FWLite so...