CMS 3D CMS Logo

L1TMuonBarrelParamsWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
7 
10 
16 
19 
21 private:
23 
24 public:
25  void analyze(const edm::Event&, const edm::EventSetup&) override;
26 
28  isO2Opayload = pset.getUntrackedParameter<bool>("isO2Opayload", false);
29  }
30  ~L1TMuonBarrelParamsWriter(void) override {}
31 };
32 
36 
37  if (isO2Opayload)
38  evSetup.get<L1TMuonBarrelParamsO2ORcd>().get(handle1);
39  else {
40  evSetup.get<L1TMuonBarrelParamsRcd>().get(handle1);
41  evSetup.get<L1TMuonBarrelKalmanParamsRcd>().get(handle2);
42  }
43 
44  std::shared_ptr<L1TMuonBarrelParams> ptr1(new L1TMuonBarrelParams(*(handle1.product())));
45  std::shared_ptr<L1TMuonBarrelKalmanParams> ptr2(new L1TMuonBarrelKalmanParams(*(handle2.product())));
46 
48  if (poolDb.isAvailable()) {
49  cond::Time_t firstSinceTime = poolDb->beginOfTime();
50  poolDb->writeOne(
51  ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd"));
52  if (not isO2Opayload)
53  poolDb->writeOne(ptr2.get(), firstSinceTime, ("L1TMuonBarrelKalmanParamsRcd"));
54  }
55 }
56 
60 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TMuonBarrelParamsWriter::L1TMuonBarrelParamsWriter
L1TMuonBarrelParamsWriter(const edm::ParameterSet &pset)
Definition: L1TMuonBarrelParamsWriter.cc:27
L1TMuonBarrelParamsWriter::isO2Opayload
bool isO2Opayload
Definition: L1TMuonBarrelParamsWriter.cc:22
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:28
EDAnalyzer.h
L1TMuonBarrelParamsO2ORcd
Definition: L1TMuonBarrelParamsO2ORcd.h:15
L1TMuonBarrelParamsWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonBarrelParamsWriter.cc:33
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
L1TMuonBarrelKalmanParams
Definition: L1TMuonBarrelKalmanParams.h:21
MakerMacros.h
PoolDBOutputService.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
L1TMuonBarrelParamsWriter
Definition: L1TMuonBarrelParamsWriter.cc:20
edm::ESHandle< L1TMuonBarrelParams >
L1TMuonBarrelKalmanParams.h
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
L1TMuonBarrelKalmanParamsRcd
Definition: L1TMuonBarrelKalmanParamsRcd.h:13
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
ModuleFactory.h
L1TMuonBarrelKalmanParamsRcd.h
L1TMuonBarrelParamsWriter::~L1TMuonBarrelParamsWriter
~L1TMuonBarrelParamsWriter(void) override
Definition: L1TMuonBarrelParamsWriter.cc:30
EventSetup.h
L1TMuonBarrelParams
Definition: L1TMuonBarrelParams.h:23
ParameterSet.h
edm::Event
Definition: Event.h:73
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:14
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27