CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CandCollectionExistFilter.cc
Go to the documentation of this file.
6 
7 using namespace edm;
8 using namespace reco;
9 
11 public:
13  srcToken_(consumes<CandidateView>(cfg.getParameter<InputTag>("src"))) { }
14 private:
15  bool filter(Event& evt, const EventSetup&) override {
17  bool exists = true;
18  evt.getByToken(srcToken_, src);
19  if(!src.isValid()) exists = false;
20  return exists;
21  }
23 };
24 
26 
28 
tuple cfg
Definition: looper.py:293
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
CandCollectionExistFilter(const ParameterSet &cfg)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
EDGetTokenT< CandidateView > srcToken_
bool filter(Event &evt, const EventSetup &) override
bool isValid() const
Definition: HandleBase.h:75