Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoBTag
PerformanceDB
plugins
BtagPerformanceESProducer.cc
Go to the documentation of this file.
1
#include "
RecoBTag/PerformanceDB/plugins/BtagPerformanceESProducer.h
"
2
3
#include "
FWCore/Framework/interface/EventSetup.h
"
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
#include "
FWCore/Framework/interface/ModuleFactory.h
"
6
#include "
FWCore/Framework/interface/ESProducer.h
"
7
8
9
#include <iostream>
10
#include <memory>
11
#include <string>
12
13
using namespace
edm;
14
15
BtagPerformanceESProducer::BtagPerformanceESProducer
(
const
edm::ParameterSet
&
p
)
16
{
17
std::string myname = p.
getParameter
<std::string>(
"ComponentName"
);
18
mypl = p.
getParameter
<std::string>(
"PayloadName"
);
19
mywp = p.
getParameter
<std::string>(
"WorkingPointName"
);
20
21
pset_ =
p
;
22
setWhatProduced(
this
,myname);
23
}
24
25
BtagPerformanceESProducer::~BtagPerformanceESProducer
() {}
26
27
boost::shared_ptr<BtagPerformance>
28
BtagPerformanceESProducer::produce
(
const
BTagPerformanceRecord
& iRecord){
29
ESHandle<PerformancePayload>
pl;
30
//ESHandle<PhysicsPerformancePayload> pl;
31
ESHandle<PerformanceWorkingPoint>
wp;
32
iRecord.
getRecord
<
PerformancePayloadRecord
>().
get
(mypl,pl);
33
34
std::cout
<<
"HERE "
<<std::endl;
35
iRecord.
getRecord
<
PerformanceWPRecord
>().
get
(mywp,wp);
36
std::cout
<<
"HERE "
<<std::endl;
37
38
std::cout
<<
" Got the payload, which is a "
<<
typeid
(*(pl.
product
())).name()<<std::endl;
39
40
// BtagWorkingPoint wp;
41
42
43
44
_perf = boost::shared_ptr<BtagPerformance>(
new
BtagPerformance
(*((pl.
product
())), *((wp.
product
()))));
45
// _perf = boost::shared_ptr<BtagPerformance>(new BtagPerformance(*((pl.product())), wp));
46
return
_perf;
47
}
48
49
50
DEFINE_FWK_EVENTSETUP_MODULE
(
BtagPerformanceESProducer
);
51
BtagPerformanceESProducer::~BtagPerformanceESProducer
virtual ~BtagPerformanceESProducer()
Definition:
BtagPerformanceESProducer.cc:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PerformancePayloadRecord
Definition:
PerformancePayloadRecord.h:6
EventSetup.h
BtagPerformanceESProducer::produce
boost::shared_ptr< BtagPerformance > produce(const BTagPerformanceRecord &)
Definition:
BtagPerformanceESProducer.cc:28
BTagPerformanceRecord
Definition:
BTagPerformanceRecord.h:11
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT & getRecord() const
Definition:
DependentRecordImplementation.h:46
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
BtagPerformance
Definition:
BtagPerformance.h:13
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:62
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:56
ESProducer.h
BtagPerformanceESProducer.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
BtagPerformanceESProducer::BtagPerformanceESProducer
BtagPerformanceESProducer(const edm::ParameterSet &p)
Definition:
BtagPerformanceESProducer.cc:15
BtagPerformanceESProducer
Definition:
BtagPerformanceESProducer.h:12
edm::ParameterSet
Definition:
ParameterSet.h:35
ModuleFactory.h
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
PerformanceWPRecord
Definition:
PerformanceWPRecord.h:6
Generated for CMSSW Reference Manual by
1.8.5