L1TriggerConfig
Utilities
src
L1KeyListWriter.cc
Go to the documentation of this file.
1
#include <iomanip>
2
#include <iostream>
3
4
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
5
6
#include "
FWCore/Framework/interface/Event.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
9
#include "
FWCore/Framework/interface/EventSetup.h
"
10
#include "
FWCore/Framework/interface/ESHandle.h
"
11
12
#include "
CondFormats/L1TObjects/interface/L1TriggerKeyListExt.h
"
13
#include "
CondFormats/DataRecord/interface/L1TriggerKeyListExtRcd.h
"
14
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
17
18
class
L1KeyListWriter
:
public
edm::EDAnalyzer
{
19
public
:
20
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
21
22
explicit
L1KeyListWriter
(
const
edm::ParameterSet
&) :
edm
::
EDAnalyzer
() {}
23
~L1KeyListWriter
(
void
)
override
{}
24
};
25
26
void
L1KeyListWriter::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup) {
27
edm::ESHandle<L1TriggerKeyListExt>
handle1;
28
evSetup.
get
<
L1TriggerKeyListExtRcd
>().
get
(handle1);
29
std::shared_ptr<L1TriggerKeyListExt> ptr1(
new
L1TriggerKeyListExt
(*(handle1.
product
())));
30
31
edm::Service<cond::service::PoolDBOutputService>
poolDb;
32
if
(poolDb.isAvailable()) {
33
cond::Time_t
firstSinceTime = poolDb->
beginOfTime
();
34
poolDb->writeOne(ptr1.get(), firstSinceTime,
"L1TriggerKeyListExtRcd"
);
35
}
36
}
37
38
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
39
#include "
FWCore/Framework/interface/MakerMacros.h
"
40
#include "
FWCore/Framework/interface/ModuleFactory.h
"
41
42
DEFINE_FWK_MODULE
(
L1KeyListWriter
);
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
L1TriggerKeyListExt
Definition:
L1TriggerKeyListExt.h:10
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:215
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition:
EDAnalyzer.cc:28
EDAnalyzer.h
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
L1KeyListWriter::L1KeyListWriter
L1KeyListWriter(const edm::ParameterSet &)
Definition:
L1KeyListWriter.cc:22
L1TriggerKeyListExtRcd.h
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Service.h
edm::ESHandle
Definition:
DTSurvey.h:22
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
L1KeyListWriter::~L1KeyListWriter
~L1KeyListWriter(void) override
Definition:
L1KeyListWriter.cc:23
L1TriggerKeyListExtRcd
Definition:
L1TriggerKeyListExtRcd.h:6
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:14
ModuleDef.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition:
GenABIO.cc:224
L1KeyListWriter
Definition:
L1KeyListWriter.cc:18
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
L1KeyListWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1KeyListWriter.cc:26
ModuleFactory.h
EventSetup.h
L1TriggerKeyListExt.h
ParameterSet.h
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16