L1TriggerConfig
Utilities
src
L1TMuonEndCapForestWriter.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/DataRecord/interface/L1TMuonEndCapForestO2ORcd.h"
13
#include "
CondFormats/DataRecord/interface/L1TMuonEndCapForestRcd.h
"
14
#include "
CondFormats/L1TObjects/interface/L1TMuonEndCapForest.h
"
15
16
#include "
FWCore/ServiceRegistry/interface/Service.h
"
17
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
18
19
class
L1TMuonEndCapForestWriter
:
public
edm::EDAnalyzer
{
20
private
:
21
bool
isO2Opayload
;
22
23
public
:
24
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
25
26
explicit
L1TMuonEndCapForestWriter
(
const
edm::ParameterSet
&
pset
) :
edm
::
EDAnalyzer
() {
27
isO2Opayload
=
pset
.getUntrackedParameter<
bool
>(
"isO2Opayload"
,
false
);
28
}
29
~L1TMuonEndCapForestWriter
(
void
)
override
{}
30
};
31
32
void
L1TMuonEndCapForestWriter::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup) {
33
edm::ESHandle<L1TMuonEndCapForest>
handle1;
34
35
// if( isO2Opayload )
36
// evSetup.get<L1TMuonEndCapForestO2ORcd>().get( handle1 ) ;
37
// else
38
evSetup.
get
<
L1TMuonEndCapForestRcd
>().
get
(handle1);
39
40
std::shared_ptr<L1TMuonEndCapForest> ptr1(
new
L1TMuonEndCapForest
(*(handle1.
product
())));
41
42
edm::Service<cond::service::PoolDBOutputService>
poolDb;
43
if
(poolDb.isAvailable()) {
44
cond::Time_t
firstSinceTime = poolDb->
beginOfTime
();
45
poolDb->writeOne(
46
ptr1.get(), firstSinceTime, (
isO2Opayload
?
"L1TMuonEndCapForestO2ORcd"
:
"L1TMuonEndCapForestRcd"
));
47
}
48
}
49
50
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
51
#include "
FWCore/Framework/interface/MakerMacros.h
"
52
#include "
FWCore/Framework/interface/ModuleFactory.h
"
53
54
DEFINE_FWK_MODULE
(
L1TMuonEndCapForestWriter
);
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
L1TMuonEndCapForestWriter
Definition:
L1TMuonEndCapForestWriter.cc:19
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
L1TMuonEndCapForestRcd.h
L1TMuonEndCapForestWriter::isO2Opayload
bool isO2Opayload
Definition:
L1TMuonEndCapForestWriter.cc:21
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
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
L1TMuonEndCapForestWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1TMuonEndCapForestWriter.cc:32
Service.h
edm::ESHandle< L1TMuonEndCapForest >
L1TMuonEndCapForestRcd
Definition:
L1TMuonEndCapForestRcd.h:11
L1TMuonEndCapForest.h
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
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
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
ModuleFactory.h
L1TMuonEndCapForest
Definition:
L1TMuonEndCapForest.h:15
L1TMuonEndCapForestWriter::L1TMuonEndCapForestWriter
L1TMuonEndCapForestWriter(const edm::ParameterSet &pset)
Definition:
L1TMuonEndCapForestWriter.cc:26
EventSetup.h
ParameterSet.h
L1TMuonEndCapForestWriter::~L1TMuonEndCapForestWriter
~L1TMuonEndCapForestWriter(void) override
Definition:
L1TMuonEndCapForestWriter.cc:29
edm::Event
Definition:
Event.h:73
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16