Main Page
Namespaces
Classes
Package Documentation
RecoTauTag
TauTagTools
plugins
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
12
#include "
FWCore/Framework/interface/EDProducer.h
"
13
#include "
FWCore/Framework/interface/EventSetup.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
#include "
FWCore/Framework/interface/Event.h
"
16
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
17
18
class
RecoTauEventFlagProducer
:
public
edm::EDProducer
{
19
public
:
20
RecoTauEventFlagProducer
(
const
edm::ParameterSet
&
pset
) {
21
flag_
= pset.
getParameter
<
int
>(
"flag"
);
22
produces<int>();
23
}
24
~RecoTauEventFlagProducer
() {}
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
32
#include "
FWCore/Framework/interface/MakerMacros.h
"
33
DEFINE_FWK_MODULE
(
RecoTauEventFlagProducer
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:122
RecoTauEventFlagProducer::flag_
int flag_
Definition:
RecoTauEventFlagProducer.cc:29
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EventSetup.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
edm::EDProducer
Definition:
EDProducer.h:35
ParameterSet.h
RecoTauEventFlagProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition:
RecoTauEventFlagProducer.cc:25
RecoTauEventFlagProducer
Definition:
RecoTauEventFlagProducer.cc:18
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
RecoTauEventFlagProducer::RecoTauEventFlagProducer
RecoTauEventFlagProducer(const edm::ParameterSet &pset)
Definition:
RecoTauEventFlagProducer.cc:20
EDProducer.h
edm::ParameterSet
Definition:
ParameterSet.h:36
RecoTauEventFlagProducer::~RecoTauEventFlagProducer
~RecoTauEventFlagProducer()
Definition:
RecoTauEventFlagProducer.cc:24
edm::Event
Definition:
Event.h:66
Generated for CMSSW Reference Manual by
1.8.11