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 
28 
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 
43  if( poolDb.isAvailable() ){
44  cond::Time_t firstSinceTime = poolDb->beginOfTime();
45  poolDb->writeOne(ptr1.get(),firstSinceTime,"L1TCaloStage2ParamsTweakedRcd");
46  }
47 
48 }
49 
53 
55 
void setIsoTauEtaMax(int value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
int iEvent
Definition: GenABIO.cc:230
unsigned long long Time_t
Definition: Time.h:16
~L1TCaloParamsUpdater(void) override
const T & get() const
Definition: EventSetup.h:59
HLT enums.
void analyze(const edm::Event &, const edm::EventSetup &) override
L1TCaloParamsUpdater(const edm::ParameterSet &)
T const * product() const
Definition: ESHandle.h:86