CMS 3D CMS Logo

L1TMuonBarrelParamsWriter.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  ~L1TMuonBarrelParamsWriter(void) override {}
29 };
30 
33 
34  if (isO2Opayload)
35  evSetup.get<L1TMuonBarrelParamsO2ORcd>().get(handle1);
36  else
37  evSetup.get<L1TMuonBarrelParamsRcd>().get(handle1);
38 
39  std::shared_ptr<L1TMuonBarrelParams> ptr1(new L1TMuonBarrelParams(*(handle1.product())));
40 
42  if (poolDb.isAvailable()) {
43  cond::Time_t firstSinceTime = poolDb->beginOfTime();
44  poolDb->writeOne(
45  ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd"));
46  }
47 }
48 
52 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TMuonBarrelParamsWriter::L1TMuonBarrelParamsWriter
L1TMuonBarrelParamsWriter(const edm::ParameterSet &pset)
Definition: L1TMuonBarrelParamsWriter.cc:25
L1TMuonBarrelParamsWriter::isO2Opayload
bool isO2Opayload
Definition: L1TMuonBarrelParamsWriter.cc:20
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
ESHandle.h
L1TMuonBarrelParamsO2ORcd.h
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TMuonBarrelParams.h
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition: EDAnalyzer.cc:27
EDAnalyzer.h
L1TMuonBarrelParamsO2ORcd
Definition: L1TMuonBarrelParamsO2ORcd.h:15
L1TMuonBarrelParamsWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonBarrelParamsWriter.cc:31
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
L1TMuonBarrelParamsWriter
Definition: L1TMuonBarrelParamsWriter.cc:18
edm::ESHandle< L1TMuonBarrelParams >
L1TMuonBarrelParamsRcd.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.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
get
#define get
ModuleFactory.h
L1TMuonBarrelParamsWriter::~L1TMuonBarrelParamsWriter
~L1TMuonBarrelParamsWriter(void) override
Definition: L1TMuonBarrelParamsWriter.cc:28
EventSetup.h
L1TMuonBarrelParams
Definition: L1TMuonBarrelParams.h:23
ParameterSet.h
edm::Event
Definition: Event.h:73
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:13
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27