Main Page
Namespaces
Classes
Package Documentation
L1TriggerConfig
Utilities
src
L1MenuWriter.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/L1TUtmTriggerMenu.h
"
13
#include "
CondFormats/DataRecord/interface/L1TUtmTriggerMenuRcd.h
"
14
#include "
CondFormats/DataRecord/interface/L1TUtmTriggerMenuO2ORcd.h
"
15
16
#include "
FWCore/ServiceRegistry/interface/Service.h
"
17
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
18
19
class
L1MenuWriter
:
public
edm::EDAnalyzer
{
20
private
:
21
bool
isO2Opayload
;
22
public
:
23
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
24
25
explicit
L1MenuWriter
(
const
edm::ParameterSet
&
pset
) :
edm
::
EDAnalyzer
(){
26
isO2Opayload = pset.
getUntrackedParameter
<
bool
>(
"isO2Opayload"
,
false
);
27
}
28
~L1MenuWriter
(
void
)
override
{}
29
};
30
31
void
L1MenuWriter::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup){
32
33
edm::ESHandle<L1TUtmTriggerMenu>
handle1;
34
if
(
isO2Opayload
)
35
evSetup.
get
<
L1TUtmTriggerMenuO2ORcd
>().
get
( handle1 ) ;
36
else
37
evSetup.
get
<
L1TUtmTriggerMenuRcd
>().
get
( handle1 ) ;
38
39
boost::shared_ptr<L1TUtmTriggerMenu> ptr1(
new
L1TUtmTriggerMenu
(*(handle1.
product
())));
40
41
edm::Service<cond::service::PoolDBOutputService>
poolDb;
42
if
( poolDb.isAvailable() ){
43
cond::Time_t
firstSinceTime = poolDb->
beginOfTime
();
44
poolDb->writeOne(ptr1.get(),firstSinceTime,(
isO2Opayload
?
"L1TUtmTriggerMenuO2ORcd"
:
"L1TUtmTriggerMenuRcd"
));
45
}
46
47
}
48
49
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
50
#include "
FWCore/Framework/interface/MakerMacros.h
"
51
#include "
FWCore/Framework/interface/ModuleFactory.h
"
52
53
DEFINE_FWK_MODULE
(
L1MenuWriter
);
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition:
EDAnalyzer.cc:26
edm::Service< cond::service::PoolDBOutputService >
L1TUtmTriggerMenuRcd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EventSetup.h
L1TUtmTriggerMenuO2ORcd.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
L1MenuWriter::L1MenuWriter
L1MenuWriter(const edm::ParameterSet &pset)
Definition:
L1MenuWriter.cc:25
L1MenuWriter::isO2Opayload
bool isO2Opayload
Definition:
L1MenuWriter.cc:21
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:230
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:16
PoolDBOutputService.h
L1TUtmTriggerMenuRcd
Definition:
L1TUtmTriggerMenuRcd.h:11
edm::ESHandle
Definition:
DTSurvey.h:22
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition:
PoolDBOutputService.cc:175
ESHandle.h
Service.h
edm::EventSetup
Definition:
EventSetup.h:52
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
EDAnalyzer.h
L1MenuWriter
Definition:
L1MenuWriter.cc:19
L1TUtmTriggerMenu.h
L1TUtmTriggerMenuO2ORcd
Definition:
L1TUtmTriggerMenuO2ORcd.h:17
L1MenuWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
L1MenuWriter.cc:31
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:63
L1TUtmTriggerMenu
Definition:
L1TUtmTriggerMenu.h:38
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
edm::Event
Definition:
Event.h:70
ModuleDef.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
L1MenuWriter::~L1MenuWriter
~L1MenuWriter(void) override
Definition:
L1MenuWriter.cc:28
Generated for CMSSW Reference Manual by
1.8.11