Main Page
Namespaces
Classes
Package Documentation
L1TriggerConfig
Utilities
src
L1TCaloParamsUpdater.cc
Go to the documentation of this file.
1
#include <iomanip>
2
#include <fstream>
3
#include <iostream>
4
5
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
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/L1TCaloStage2ParamsRcd.h
"
13
#include "
CondFormats/L1TObjects/interface/CaloParams.h
"
14
#include "
L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h
"
15
16
#include "
FWCore/ServiceRegistry/interface/Service.h
"
17
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
18
19
class
L1TCaloParamsUpdater
:
public
edm::EDAnalyzer
{
20
public
:
21
virtual
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&);
22
23
explicit
L1TCaloParamsUpdater
(
const
edm::ParameterSet
&) :
edm
::
EDAnalyzer
(){}
24
virtual
~L1TCaloParamsUpdater
(
void
){}
25
};
26
27
void
L1TCaloParamsUpdater::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& evSetup){
28
29
edm::ESHandle<l1t::CaloParams>
handle1;
30
// evSetup.get<L1TCaloParamsRcd>().get( "l1conddb", handle1 ) ;
31
evSetup.
get
<
L1TCaloStage2ParamsRcd
>().
get
( handle1 ) ;
32
l1t::CaloParamsHelper
m_params_helper( *(handle1.
product
()));
33
34
// std::ifstream is("tauL1CalibLUT_V2.txt");
35
// l1t::LUT lut;
36
// std::cout<<"LUT read success: "<<lut.read(is)<<std::endl;
37
38
m_params_helper.
setIsoTauEtaMax
(28);
39
40
std::shared_ptr< l1t::CaloParams > ptr1 = std::make_shared< l1t::CaloParams >( m_params_helper ) ;
41
42
edm::Service<cond::service::PoolDBOutputService>
poolDb;
43
if
( poolDb.isAvailable() ){
44
cond::Time_t
firstSinceTime = poolDb->
beginOfTime
();
45
poolDb->writeOne(ptr1.get(),firstSinceTime,
"L1TCaloStage2ParamsTweakedRcd"
);
46
}
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
(
L1TCaloParamsUpdater
);
55
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition:
EDAnalyzer.cc:26
edm::Service< cond::service::PoolDBOutputService >
l1t::CaloParamsHelper::setIsoTauEtaMax
void setIsoTauEtaMax(int value)
Definition:
CaloParamsHelper.h:264
L1TCaloParamsUpdater::~L1TCaloParamsUpdater
virtual ~L1TCaloParamsUpdater(void)
Definition:
L1TCaloParamsUpdater.cc:24
L1TCaloStage2ParamsRcd
Definition:
L1TCaloStage2ParamsRcd.h:10
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
CaloParamsHelper.h
MakerMacros.h
EventSetup.h
L1TCaloParamsUpdater
Definition:
L1TCaloParamsUpdater.cc:19
L1TCaloStage2ParamsRcd.h
ParameterSet.h
l1t::CaloParamsHelper
Definition:
CaloParamsHelper.h:21
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:44
edm::EDAnalyzer
Definition:
EDAnalyzer.h:27
EDAnalyzer.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
edm
HLT enums.
Definition:
AlignableModifier.h:17
L1TCaloParamsUpdater::L1TCaloParamsUpdater
L1TCaloParamsUpdater(const edm::ParameterSet &)
Definition:
L1TCaloParamsUpdater.cc:23
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
CaloParams.h
edm::Event
Definition:
Event.h:66
ModuleDef.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
L1TCaloParamsUpdater::analyze
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition:
L1TCaloParamsUpdater.cc:27
Generated for CMSSW Reference Manual by
1.8.11