L1Trigger
L1TCalorimeter
plugins
CaloConfigWriter.cc
Go to the documentation of this file.
1
// CaloConfigWriter
2
//
3
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
#include "
FWCore/Framework/interface/ESHandle.h
"
9
10
#include "
CondFormats/DataRecord/interface/L1TCaloConfigRcd.h
"
11
#include "
CondFormats/L1TObjects/interface/CaloConfig.h
"
12
13
#include "
FWCore/ServiceRegistry/interface/Service.h
"
14
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
15
#include "
CondTools/L1Trigger/interface/DataWriter.h
"
16
17
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
18
#include "
FWCore/MessageLogger/interface/MessageDrop.h
"
19
20
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
21
#include "
FWCore/Framework/interface/MakerMacros.h
"
22
23
#include <iostream>
24
25
#include <iostream>
26
27
//
28
// class declaration
29
//
30
31
class
CaloConfigWriter
:
public
edm::one::EDAnalyzer
<> {
32
public
:
33
explicit
CaloConfigWriter
(
const
edm::ParameterSet
&) {}
34
~CaloConfigWriter
()
override
{}
35
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
36
};
37
38
void
CaloConfigWriter::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup) {
39
l1t::DataWriter
dataWriter;
40
std::string
token
= dataWriter.
writePayload
(evSetup,
"L1TCaloConfigRcd@CaloConfig"
);
41
if
(dataWriter.
updateIOV
(
"L1TCaloConfigRcd"
,
token
, 1,
false
))
42
std::cout
<<
"IOV updated!"
<< std::endl;
43
std::cout
<<
"Payload token = "
<<
token
<< std::endl;
44
}
45
46
DEFINE_FWK_MODULE
(
CaloConfigWriter
);
CaloConfig.h
MessageLogger.h
Event.h
EventSetup.h
CaloConfigWriter::CaloConfigWriter
CaloConfigWriter(const edm::ParameterSet &)
Definition:
CaloConfigWriter.cc:33
L1TCaloConfigRcd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
MessageDrop.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
CaloConfigWriter
Definition:
CaloConfigWriter.cc:31
PoolDBOutputService.h
l1t::DataWriter::writePayload
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
Definition:
DataWriter.cc:15
ESHandle.h
Service.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::EventSetup
Definition:
EventSetup.h:56
DataWriter.h
EDAnalyzer.h
CaloConfigWriter::~CaloConfigWriter
~CaloConfigWriter() override
Definition:
CaloConfigWriter.cc:34
CaloConfigWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
CaloConfigWriter.cc:38
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:73
ModuleDef.h
l1t::DataWriter::updateIOV
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
Definition:
DataWriter.cc:72
MakerMacros.h
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
l1t::DataWriter
Definition:
DataWriter.h:35
unpackBuffers-CaloStage2.token
token
Definition:
unpackBuffers-CaloStage2.py:316
Generated for CMSSW Reference Manual by
1.8.14