CMS 3D CMS Logo

L1TCaloParamsUpdater.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <fstream>
3 #include <iostream>
4 
8 
11 
15 
18 
20 public:
21  void analyze(const edm::Event&, const edm::EventSetup&) override;
22 
24  ~L1TCaloParamsUpdater(void) override {}
25 };
26 
29  // evSetup.get<L1TCaloParamsRcd>().get( "l1conddb", handle1 ) ;
30  evSetup.get<L1TCaloStage2ParamsRcd>().get(handle1);
31  l1t::CaloParamsHelper m_params_helper(*(handle1.product()));
32 
33  // std::ifstream is("tauL1CalibLUT_V2.txt");
34  // l1t::LUT lut;
35  // std::cout<<"LUT read success: "<<lut.read(is)<<std::endl;
36 
37  m_params_helper.setIsoTauEtaMax(28);
38 
39  std::shared_ptr<l1t::CaloParams> ptr1 = std::make_shared<l1t::CaloParams>(m_params_helper);
40 
42  if (poolDb.isAvailable()) {
43  cond::Time_t firstSinceTime = poolDb->beginOfTime();
44  poolDb->writeOne(ptr1.get(), firstSinceTime, "L1TCaloStage2ParamsTweakedRcd");
45  }
46 }
47 
51 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
l1t::CaloParamsHelper::setIsoTauEtaMax
void setIsoTauEtaMax(int value)
Definition: CaloParamsHelper.h:339
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition: EDAnalyzer.cc:28
EDAnalyzer.h
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
CaloParams.h
edm::ESHandle
Definition: DTSurvey.h:22
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
ModuleDef.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TCaloParamsUpdater::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1TCaloParamsUpdater.cc:27
L1TCaloParamsUpdater::~L1TCaloParamsUpdater
~L1TCaloParamsUpdater(void) override
Definition: L1TCaloParamsUpdater.cc:24
edm::EventSetup
Definition: EventSetup.h:58
L1TCaloParamsUpdater
Definition: L1TCaloParamsUpdater.cc:19
get
#define get
l1t::CaloParamsHelper
Definition: CaloParamsHelper.h:21
ModuleFactory.h
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
EventSetup.h
CaloParamsHelper.h
L1TCaloParamsUpdater::L1TCaloParamsUpdater
L1TCaloParamsUpdater(const edm::ParameterSet &)
Definition: L1TCaloParamsUpdater.cc:23
ParameterSet.h
edm::Event
Definition: Event.h:73
L1TCaloStage2ParamsRcd
Definition: L1TCaloStage2ParamsRcd.h:10
L1TCaloStage2ParamsRcd.h