CMS 3D CMS Logo

L1MenuWriter.cc
Go to the documentation of this file.
1 #include <iomanip>
2 #include <iostream>
3 
5 
8 
11 
15 
18 
19 class L1MenuWriter : public edm::EDAnalyzer {
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  ~L1MenuWriter(void) override {}
30 };
31 
34  if (isO2Opayload)
35  evSetup.get<L1TUtmTriggerMenuO2ORcd>().get(handle1);
36  else
37  evSetup.get<L1TUtmTriggerMenuRcd>().get(handle1);
38 
39  std::shared_ptr<L1TUtmTriggerMenu> ptr1(new L1TUtmTriggerMenu(*(handle1.product())));
40 
42  if (poolDb.isAvailable()) {
43  cond::Time_t firstSinceTime = poolDb->beginOfTime();
44  poolDb->writeOne(ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TUtmTriggerMenuO2ORcd" : "L1TUtmTriggerMenuRcd"));
45  }
46 }
47 
51 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TUtmTriggerMenuRcd.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
ESHandle.h
L1TUtmTriggerMenuRcd
Definition: L1TUtmTriggerMenuRcd.h:11
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TUtmTriggerMenuO2ORcd.h
edm::EDAnalyzer::EDAnalyzer
EDAnalyzer()
Definition: EDAnalyzer.cc:26
EDAnalyzer.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
L1TUtmTriggerMenu
Definition: L1TUtmTriggerMenu.h:36
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
edm::ESHandle
Definition: DTSurvey.h:22
L1MenuWriter::~L1MenuWriter
~L1MenuWriter(void) override
Definition: L1MenuWriter.cc:29
L1TUtmTriggerMenu.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
L1TUtmTriggerMenuO2ORcd
Definition: L1TUtmTriggerMenuO2ORcd.h:17
ModuleDef.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
L1MenuWriter::isO2Opayload
bool isO2Opayload
Definition: L1MenuWriter.cc:21
L1MenuWriter
Definition: L1MenuWriter.cc:19
ModuleFactory.h
EventSetup.h
ParameterSet.h
L1MenuWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: L1MenuWriter.cc:32
edm::Event
Definition: Event.h:73
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
L1MenuWriter::L1MenuWriter
L1MenuWriter(const edm::ParameterSet &pset)
Definition: L1MenuWriter.cc:26