Main Page
Namespaces
Classes
Package Documentation
L1TriggerConfig
Utilities
src
L1TMuonGlobalParamsWriter.cc
Go to the documentation of this file.
1
#include <iomanip>
2
#include <iostream>
3
4
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
5
#include "
FWCore/Framework/interface/Event.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
8
#include "
FWCore/Framework/interface/EventSetup.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
11
#include "
CondFormats/DataRecord/interface/L1TMuonGlobalParamsO2ORcd.h
"
12
#include "
CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h
"
13
14
#include "
FWCore/ServiceRegistry/interface/Service.h
"
15
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
16
17
class
L1TMuonGlobalParamsWriter
:
public
edm::EDAnalyzer
{
18
public
:
19
virtual
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&);
20
21
explicit
L1TMuonGlobalParamsWriter
(
const
edm::ParameterSet
&) :
edm
::
EDAnalyzer
(){}
22
virtual
~L1TMuonGlobalParamsWriter
(
void
){}
23
};
24
25
void
L1TMuonGlobalParamsWriter::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup){
26
edm::ESHandle<L1TMuonGlobalParams>
handle1;
27
evSetup.
get
<
L1TMuonGlobalParamsO2ORcd
>().
get
( handle1 ) ;
28
boost::shared_ptr<L1TMuonGlobalParams> ptr1(
new
L1TMuonGlobalParams
(*(handle1.
product
())));
29
30
edm::Service<cond::service::PoolDBOutputService>
poolDb;
31
if
( poolDb.isAvailable() ){
32
cond::Time_t
firstSinceTime = poolDb->
beginOfTime
();
33
poolDb->writeOne(ptr1.get(),firstSinceTime,
"L1TMuonGlobalParamsO2ORcd"
);
34
}
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
(
L1TMuonGlobalParamsWriter
);
43
L1TMuonGlobalParamsWriter
Definition:
L1TMuonGlobalParamsWriter.cc:17
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition:
EDAnalyzer.cc:26
edm::Service< cond::service::PoolDBOutputService >
L1TMuonGlobalParams
Definition:
L1TMuonGlobalParams.h:21
L1TMuonGlobalParamsWriter::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
L1TMuonGlobalParamsWriter.cc:25
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EventSetup.h
L1TMuonGlobalParamsWriter::L1TMuonGlobalParamsWriter
L1TMuonGlobalParamsWriter(const edm::ParameterSet &)
Definition:
L1TMuonGlobalParamsWriter.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
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:45
edm::EDAnalyzer
Definition:
EDAnalyzer.h:27
EDAnalyzer.h
L1TMuonGlobalParams.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:56
edm
HLT enums.
Definition:
AlignableModifier.h:17
L1TMuonGlobalParamsO2ORcd
Definition:
L1TMuonGlobalParamsO2ORcd.h:26
L1TMuonGlobalParamsWriter::~L1TMuonGlobalParamsWriter
virtual ~L1TMuonGlobalParamsWriter(void)
Definition:
L1TMuonGlobalParamsWriter.cc:22
L1TMuonGlobalParamsO2ORcd.h
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
edm::Event
Definition:
Event.h:66
ModuleDef.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
Generated for CMSSW Reference Manual by
1.8.11