Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
std::auto_ptr<int> toput(
new
int
(
flag_
));
27
evt.
put
(toput);
28
}
29
private
:
30
int
flag_
;
31
};
32
33
#include "
FWCore/Framework/interface/MakerMacros.h
"
34
DEFINE_FWK_MODULE
(
RecoTauEventFlagProducer
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
RecoTauEventFlagProducer::flag_
int flag_
Definition:
RecoTauEventFlagProducer.cc:30
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EventSetup.h
edm::EDProducer
Definition:
EDProducer.h:30
ParameterSet.h
RecoTauEventFlagProducer::produce
void produce(edm::Event &evt, const edm::EventSetup &es) override
Definition:
RecoTauEventFlagProducer.cc:25
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:116
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:35
RecoTauEventFlagProducer::~RecoTauEventFlagProducer
~RecoTauEventFlagProducer()
Definition:
RecoTauEventFlagProducer.cc:24
edm::Event
Definition:
Event.h:62
Generated for CMSSW Reference Manual by
1.8.5