CMS 3D CMS Logo

RecoTauEventFlagProducer.cc
Go to the documentation of this file.
1 /*
2  * Produce an int in the event that specifies an event type.
3  *
4  * Takes one int parameter: flag, and puts it in the event
5  *
6  * Used to identify different samples in MVA training.
7  *
8  * Author: Evan K. Friis, UC Davis
9  *
10  */
11 
17 
19  public:
21  flag_ = pset.getParameter<int>("flag");
22  produces<int>();
23  }
25  void produce(edm::Event& evt, const edm::EventSetup &es) override {
26  evt.put(std::make_unique<int>(flag_));
27  }
28  private:
29  int flag_;
30 };
31 
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
void produce(edm::Event &evt, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
RecoTauEventFlagProducer(const edm::ParameterSet &pset)