IOPool
Streamer
plugins
ParameterSetBlobProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/global/EDProducer.h
"
2
#include "
FWCore/Framework/interface/Run.h
"
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
#include "
FWCore/ParameterSet/interface/Registry.h
"
5
#include "
FWCore/Utilities/interface/EDPutToken.h
"
6
7
#include "
DataFormats/Provenance/interface/ParameterSetID.h
"
8
#include "
DataFormats/Provenance/interface/ParameterSetBlob.h
"
9
10
class
ParameterSetBlobProducer
:
public
edm::global::EDProducer
<edm::BeginRunProducer> {
11
public
:
12
ParameterSetBlobProducer
(
edm::ParameterSet
const
&);
13
14
void
produce
(
edm::StreamID
,
edm::Event
&,
edm::EventSetup
const
&)
const
final
;
15
16
void
globalBeginRunProduce
(
edm::Run
&,
edm::EventSetup
const
&)
const
final
;
17
18
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
19
edm::ParameterSetDescription
desc
;
20
descriptions.
addWithDefaultLabel
(
desc
);
21
}
22
23
private
:
24
edm::EDPutTokenT<std::map<edm::ParameterSetID, edm::ParameterSetBlob>
>
const
token_
;
25
};
26
27
ParameterSetBlobProducer::ParameterSetBlobProducer
(
edm::ParameterSet
const
&)
28
: token_{produces<std::map<edm::ParameterSetID, edm::ParameterSetBlob>,
edm::Transition::BeginRun
>()} {}
29
30
void
ParameterSetBlobProducer::produce
(
edm::StreamID
,
edm::Event
&,
edm::EventSetup
const
&)
const
{}
31
32
void
ParameterSetBlobProducer::globalBeginRunProduce
(
edm::Run
& iRun,
edm::EventSetup
const
&)
const
{
33
std::map<edm::ParameterSetID, edm::ParameterSetBlob> psetMap;
34
edm::pset::Registry::instance
()->
fillMap
(psetMap);
35
36
iRun.
emplace
(
token_
,
std::move
(psetMap));
37
}
38
39
DEFINE_FWK_MODULE
(
ParameterSetBlobProducer
);
edm::pset::Registry::instance
static Registry * instance()
Definition:
Registry.cc:12
edm::StreamID
Definition:
StreamID.h:30
ParameterSetBlobProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
ParameterSetBlobProducer.cc:18
ParameterSetBlobProducer::globalBeginRunProduce
void globalBeginRunProduce(edm::Run &, edm::EventSetup const &) const final
Definition:
ParameterSetBlobProducer.cc:32
edm::Run
Definition:
Run.h:45
edm::EDPutTokenT
Definition:
EDPutToken.h:33
ParameterSetBlob.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Run.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::pset::Registry::fillMap
void fillMap(regmap_type &fillme) const
Definition:
Registry.cc:42
ParameterSetBlobProducer::produce
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const final
Definition:
ParameterSetBlobProducer.cc:30
edm::ParameterSet
Definition:
ParameterSet.h:47
EDPutToken.h
edm::EventSetup
Definition:
EventSetup.h:57
ParameterSetBlobProducer
Definition:
ParameterSetBlobProducer.cc:10
ParameterSetBlobProducer::token_
const edm::EDPutTokenT< std::map< edm::ParameterSetID, edm::ParameterSetBlob > > token_
Definition:
ParameterSetBlobProducer.cc:24
Registry.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
edm::Transition::BeginRun
edm::Run::emplace
void emplace(EDPutTokenT< PROD > token, Args &&... args)
puts a new product
Definition:
Run.h:246
ParameterSetID.h
EDProducer.h
ParameterSetBlobProducer::ParameterSetBlobProducer
ParameterSetBlobProducer(edm::ParameterSet const &)
Definition:
ParameterSetBlobProducer.cc:27
edm::Event
Definition:
Event.h:73
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:87
Generated for CMSSW Reference Manual by
1.8.16