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 std::auto_ptr<C> objsToPut(
new C() );
75 event.getByLabel(
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->size() > 0;
bool doFilter_
whether or not to filter based on size
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...
edm::InputTag src_
InputTag of the input source.
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual ~FilterObjectWrapper()
default destructor
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup)
everything which has to be done during the event loop. NOTE: We can't use the eventSetup in FWLite so...