CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
23  explicit L1TCaloParamsUpdater(const edm::ParameterSet&) : edm::EDAnalyzer() {}
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->writeOneIOV(*ptr1, firstSinceTime, "L1TCaloStage2ParamsTweakedRcd");
45  }
46 }
47 
51 
void setIsoTauEtaMax(int value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
int iEvent
Definition: GenABIO.cc:224
unsigned long long Time_t
Definition: Time.h:14
~L1TCaloParamsUpdater(void) override
T const * product() const
Definition: ESHandle.h:86
T get() const
Definition: EventSetup.h:88
void analyze(const edm::Event &, const edm::EventSetup &) override
L1TCaloParamsUpdater(const edm::ParameterSet &)