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  virtual void analyze(const edm::Event&, const edm::EventSetup&);
22 
24  virtual ~L1TCaloParamsUpdater(void){}
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)
virtual ~L1TCaloParamsUpdater(void)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
int iEvent
Definition: GenABIO.cc:230
unsigned long long Time_t
Definition: Time.h:16
const T & get() const
Definition: EventSetup.h:56
HLT enums.
L1TCaloParamsUpdater(const edm::ParameterSet &)
T const * product() const
Definition: ESHandle.h:86
virtual void analyze(const edm::Event &, const edm::EventSetup &)