3 #include <FWCore/PluginManager/interface/PluginFactory.h>
4 #include <FWCore/ParameterSet/interface/ParameterSet.h>
5 #include <FWCore/Framework/interface/Event.h>
6 #include <FWCore/Framework/interface/Run.h>
7 #include <FWCore/Framework/interface/LuminosityBlock.h>
8 #include <FWCore/Framework/interface/EventSetup.h>
9 #include <FWCore/Framework/interface/ConsumesCollector.h>
10 #include <FWCore/Utilities/interface/InputTag.h>
12 #include <cp3_llbb/TreeWrapper/interface/TreeWrapper.h>
13 #include <cp3_llbb/Framework/interface/MetadataManager.h>
15 #include <cp3_llbb/Framework/interface/Types.h>
34 friend class ::ExTreeMaker;
46 Producer(
const std::string& name,
const ROOT::TreeGroup& tree_,
const edm::ParameterSet& config):
49 m_systematics(config.getUntrackedParameter<bool>(
"systematics", false)) {
61 virtual void produce(edm::Event& event,
const edm::EventSetup& setup) = 0;
71 virtual void doConsumes(
const edm::ParameterSet& pset, edm::ConsumesCollector&& collector) {}
91 virtual void beginRun(
const edm::Run& run,
const edm::EventSetup& setup) {}
99 virtual void endRun(
const edm::Run& run,
const edm::EventSetup& setup) {}
134 inline bool doingSystematics()
const {
135 return m_systematics;
139 bool hasRun()
const {
143 void setRun(
bool run) {
156 typedef edmplugin::PluginFactory<
Framework::Producer* (
const std::string&,
const ROOT::TreeGroup&,
const edm::ParameterSet&)> ExTreeMakerProducerFactory;
Definition: Framework.h:21
Base class for Framework producers.
Definition: Producer.h:33
virtual void doConsumes(const edm::ParameterSet &pset, edm::ConsumesCollector &&collector)
Hook for the CMSSW consumes interface.
Definition: Producer.h:71
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
Called at the end of a luminosity section.
Definition: Producer.h:117
ROOT::TreeGroup tree
Access point to output tree.
Definition: Producer.h:132
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
Called at the beginning of a new luminosity section.
Definition: Producer.h:108
virtual void beginRun(const edm::Run &run, const edm::EventSetup &setup)
Called at the beginning of a new run.
Definition: Producer.h:91
virtual void endJob(MetadataManager &manager)
Called once at the end of the job.
Definition: Producer.h:82
virtual void produce(edm::Event &event, const edm::EventSetup &setup)=0
Main method of the producer, called for each event.
virtual void beginJob(MetadataManager &manager)
Called once at the beginning of the job.
Definition: Producer.h:77
virtual void endRun(const edm::Run &run, const edm::EventSetup &setup)
Called at the end of a run.
Definition: Producer.h:99
Producer(const std::string &name, const ROOT::TreeGroup &tree_, const edm::ParameterSet &config)
Base constructor.
Definition: Producer.h:46