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