CMS 3D CMS Logo

L1TMuonGlobalParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
7 
10 
14 
17 
19 private:
21 
22 public:
23  void analyze(const edm::Event&, const edm::EventSetup&) override;
24 
26  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
27  }
28  ~L1TMuonGlobalParamsWriter(void) override {}
29 };
30 
33 
34  if (isO2Opayload)
35  evSetup.get<L1TMuonGlobalParamsO2ORcd>().get(handle1);
36  else
37  evSetup.get<L1TMuonGlobalParamsRcd>().get(handle1);
38 
39  std::shared_ptr<L1TMuonGlobalParams> ptr1(new L1TMuonGlobalParams(*(handle1.product())));
40 
42  if (poolDb.isAvailable()) {
43  cond::Time_t firstSinceTime = poolDb->beginOfTime();
44  poolDb->writeOne(
45  ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonGlobalParamsO2ORcd" : "L1TMuonGlobalParamsRcd"));
46  }
47 }
48 
52 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TMuonGlobalParamsWriter::L1TMuonGlobalParamsWriter
L1TMuonGlobalParamsWriter(const edm::ParameterSet &pset)
Definition: L1TMuonGlobalParamsWriter.cc:25
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
ESHandle.h
L1TMuonGlobalParamsWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonGlobalParamsWriter.cc:31
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TMuonGlobalParamsWriter
Definition: L1TMuonGlobalParamsWriter.cc:18
L1TMuonGlobalParams
Definition: L1TMuonGlobalParams.h:21
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition: EDAnalyzer.cc:26
EDAnalyzer.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
L1TMuonGlobalParamsWriter::~L1TMuonGlobalParamsWriter
~L1TMuonGlobalParamsWriter(void) override
Definition: L1TMuonGlobalParamsWriter.cc:28
edm::ESHandle
Definition: DTSurvey.h:22
L1TMuonGlobalParamsO2ORcd.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
L1TMuonGlobalParams.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
edm::EventSetup
Definition: EventSetup.h:57
L1TMuonGlobalParamsWriter::isO2Opayload
bool isO2Opayload
Definition: L1TMuonGlobalParamsWriter.cc:20
get
#define get
L1TMuonGlobalParamsRcd
Definition: L1TMuonGlobalParamsRcd.h:23
ModuleFactory.h
L1TMuonGlobalParamsO2ORcd
Definition: L1TMuonGlobalParamsO2ORcd.h:26
EventSetup.h
ParameterSet.h
edm::Event
Definition: Event.h:73
L1TMuonGlobalParamsRcd.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27