CP3-llbb Framework
|
Base class for Framework producers. More...
#include <Producer.h>
Public Member Functions | |
Producer (const std::string &name, const ROOT::TreeGroup &tree_, const edm::ParameterSet &config) | |
Base constructor. More... | |
virtual void | produce (edm::Event &event, const edm::EventSetup &setup)=0 |
Main method of the producer, called for each event. More... | |
virtual void | doConsumes (const edm::ParameterSet &pset, edm::ConsumesCollector &&collector) |
Hook for the CMSSW consumes interface. More... | |
virtual void | beginJob (MetadataManager &manager) |
Called once at the beginning of the job. More... | |
virtual void | endJob (MetadataManager &manager) |
Called once at the end of the job. More... | |
virtual void | beginRun (const edm::Run &run, const edm::EventSetup &setup) |
Called at the beginning of a new run. More... | |
virtual void | endRun (const edm::Run &run, const edm::EventSetup &setup) |
Called at the end of a run. More... | |
virtual void | beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup) |
Called at the beginning of a new luminosity section. More... | |
virtual void | endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup) |
Called at the end of a luminosity section. More... | |
Producer (const Producer &)=delete | |
Producer & | operator= (const Producer &)=delete |
Protected Member Functions | |
bool | doingSystematics () const |
Protected Attributes | |
std::string | m_name |
ROOT::TreeGroup | tree |
Access point to output tree. More... | |
Friends | |
class | ::ExTreeMaker |
Base class for Framework producers.
A producer is a simple module producing quantities from an event. A lot of producers are included in the framework, one for each high-level object (jets, muons, electrons, ...). These producers usually only convert CMS PAT objet into a plain ROOT tree representation.
Machinery for IDs and scale-factors is also included.
When creating a new producer, you must inherit from this pure-virtual class, and implement the produce method. You'll also need to register your producer into the plugin factory. See content of the file Producers.cc for an example of how to do so.
|
inline |
Base constructor.
name | The name of the producer |
tree_ | Abstraction of the output tree. Use this to create new branches |
config | A link to the python configuration |
|
inlinevirtual |
Called once at the beginning of the job.
manager | The MetadataManager of the framework. Use this to store metadata to the output file |
|
inlinevirtual |
Called at the beginning of a new luminosity section.
You have direct access to the luminosity block via the CMSSW interface with the lumi
and setup
parameters.
run | The CMSSW luminosity block |
setup | The CMSSW event setup |
|
inlinevirtual |
Called at the beginning of a new run.
You have direct access to the run via the CMSSW interface with the run
and setup
parameters.
run | The CMSSW run |
setup | The CMSSW event setup |
|
inlinevirtual |
Hook for the CMSSW consumes interface.
Override this method to register your tokens into the CMSSW framework via the collector
interface
pset | A link to the python configuration |
collector | The consumes collector. Use it to register your tokens. |
Reimplemented in VerticesProducer, TausProducer, MuonsProducer, METProducer, LeptonsProducer< T >, LeptonsProducer< pat::Muon >, LeptonsProducer< pat::Electron >, JetsProducer, HLTProducer, GenParticlesProducer, FatJetsProducer, EventProducer, and ElectronsProducer.
|
inlinevirtual |
Called once at the end of the job.
manager | The MetadataManager of the framework. Use this to store metadata to the output file |
|
inlinevirtual |
Called at the end of a luminosity section.
You have direct access to the luminosity block via the CMSSW interface with the lumi
and setup
parameters.
run | The CMSSW luminosity block |
setup | The CMSSW event setup |
|
inlinevirtual |
Called at the end of a run.
You have direct access to the run via the CMSSW interface with the run
and setup
parameters.
run | The CMSSW run |
setup | The CMSSW event setup |
|
pure virtual |
Main method of the producer, called for each event.
You have direct access to the event via the CMSSW interface with the event
and setup
parameters.
event | The CMSSW event |
setup | The CMSSW event setup |
Implemented in VerticesProducer, TausProducer, MuonsProducer, METProducer, JetsProducer, HLTProducer, GenParticlesProducer, FatJetsProducer, EventProducer, and ElectronsProducer.
|
protected |
Access point to output tree.
Use this variable to create new branches.