SimGeneral
MixingModule
plugins
Mixing2DB.cc
Go to the documentation of this file.
1
#include "
Mixing2DB.h
"
2
#include "
FWCore/ServiceRegistry/interface/Service.h
"
3
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
4
#include "
CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h
"
5
6
#include "
CondFormats/RunInfo/interface/MixingModuleConfig.h
"
7
8
//
9
// constants, enums and typedefs
10
//
11
12
//
13
// static data member definitions
14
//
15
16
//
17
// constructors and destructor
18
//
19
Mixing2DB::Mixing2DB
(
const
edm::ParameterSet
& iConfig) {
20
//cfi_=iConfig.getParameter<edm::ParameterSet>("input");
21
cfi_
= iConfig;
22
}
23
24
Mixing2DB::~Mixing2DB
() {
25
// do anything here that needs to be done at desctruction time
26
// (e.g. close files, deallocate resources etc.)
27
}
28
29
//
30
// member functions
31
//
32
33
// ------------ method called for each event ------------
34
void
Mixing2DB::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
35
using namespace
edm
;
36
37
#ifdef THIS_IS_AN_EVENT_EXAMPLE
38
Handle<ExampleData>
pIn;
39
iEvent
.getByLabel(
"example"
, pIn);
40
#endif
41
42
#ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
43
ESHandle<SetupData>
pSetup;
44
iSetup.
get
<SetupRecord>().
get
(pSetup);
45
#endif
46
}
47
48
// ------------ method called once each job just before starting event loop ------------
49
void
Mixing2DB::beginJob
() {}
50
51
// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
52
void
Mixing2DB::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
53
//The following says we do not know what parameters are allowed so do no validation
54
// Please change this to state exactly what you do use, even if it is no parameters
55
edm::ParameterSetDescription
desc
;
56
desc
.setUnknown();
57
descriptions.
addDefault
(
desc
);
58
}
59
60
// ------------ method called once each job just after ending the event loop ------------
61
void
Mixing2DB::endJob
() {
62
edm::Service<cond::service::PoolDBOutputService>
poolDbService;
63
MixingModuleConfig
*
config
=
new
MixingModuleConfig
();
64
config
->read(
cfi_
);
65
poolDbService->
writeOne
<
MixingModuleConfig
>(
config
, poolDbService->
currentTime
(),
"MixingRcd"
);
66
}
MixingModuleConfig.h
Mixing2DB::Mixing2DB
Mixing2DB(const edm::ParameterSet &)
Definition:
Mixing2DB.cc:19
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
SimBeamSpotObjects.h
Mixing2DB::beginJob
void beginJob() override
Definition:
Mixing2DB.cc:49
edm::Handle
Definition:
AssociativeIterator.h:50
config
Definition:
config.py:1
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:80
Service.h
submitPVResolutionJobs.config
config
parse the configuration file
Definition:
submitPVResolutionJobs.py:281
Mixing2DB::cfi_
edm::ParameterSet cfi_
Definition:
Mixing2DB.h:49
edm::ESHandle
Definition:
DTSurvey.h:22
Mixing2DB::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
Mixing2DB.cc:52
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
Mixing2DB::endJob
void endJob() override
Definition:
Mixing2DB.cc:61
edm::ParameterSet
Definition:
ParameterSet.h:47
Mixing2DB::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
Mixing2DB.cc:34
MixingModuleConfig
Definition:
MixingModuleConfig.h:71
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition:
PoolDBOutputService.h:63
Mixing2DB::~Mixing2DB
~Mixing2DB() override
Definition:
Mixing2DB.cc:24
edm::Event
Definition:
Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
Mixing2DB.h
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition:
PoolDBOutputService.cc:217
Generated for CMSSW Reference Manual by
1.8.16