CMS 3D CMS Logo

L1TMuonEndCapParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
5 
8 
11 
15 
18 
20 private:
22 
23 public:
24  void analyze(const edm::Event&, const edm::EventSetup&) override;
25 
27  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
28  }
29  ~L1TMuonEndCapParamsWriter(void) override {}
30 };
31 
34 
35  if (isO2Opayload)
36  evSetup.get<L1TMuonEndCapParamsO2ORcd>().get(handle1);
37  else
38  evSetup.get<L1TMuonEndCapParamsRcd>().get(handle1);
39 
40  std::shared_ptr<L1TMuonEndCapParams> ptr1(new L1TMuonEndCapParams(*(handle1.product())));
41 
43  if (poolDb.isAvailable()) {
44  cond::Time_t firstSinceTime = poolDb->beginOfTime();
45  poolDb->writeOne(
46  ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonEndCapParamsO2ORcd" : "L1TMuonEndCapParamsRcd"));
47  }
48 }
49 
53 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TMuonEndCapParamsWriter::isO2Opayload
bool isO2Opayload
Definition: L1TMuonEndCapParamsWriter.cc:21
L1TMuonEndCapParamsWriter
Definition: L1TMuonEndCapParamsWriter.cc:19
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
ESHandle.h
L1TMuonEndCapParamsWriter::~L1TMuonEndCapParamsWriter
~L1TMuonEndCapParamsWriter(void) override
Definition: L1TMuonEndCapParamsWriter.cc:29
L1TMuonEndCapParamsO2ORcd
Definition: L1TMuonEndCapParamsO2ORcd.h:16
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TMuonEndCapParams.h
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition: EDAnalyzer.cc:28
EDAnalyzer.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
PoolDBOutputService.h
L1TMuonEndCapParamsO2ORcd.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
edm::ESHandle< L1TMuonEndCapParams >
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
L1TMuonEndCapParamsRcd
Definition: L1TMuonEndCapParamsRcd.h:11
ModuleDef.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
L1TMuonEndCapParams
Definition: L1TMuonEndCapParams.h:15
L1TMuonEndCapParamsRcd.h
ModuleFactory.h
L1TMuonEndCapParamsWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonEndCapParamsWriter.cc:32
L1TMuonEndCapParamsWriter::L1TMuonEndCapParamsWriter
L1TMuonEndCapParamsWriter(const edm::ParameterSet &pset)
Definition: L1TMuonEndCapParamsWriter.cc:26
EventSetup.h
ParameterSet.h
edm::Event
Definition: Event.h:73
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27