CMS 3D CMS Logo

DTUserKeyedConfigPopConAnalyzer.cc
Go to the documentation of this file.
9 #include <memory>
10 
11 //typedef popcon::PopConAnalyzer<DTUserKeyedConfigHandler> DTUserKeyedConfigPopConAnalyzer;
12 class DTUserKeyedConfigPopConAnalyzer : public popcon::PopConAnalyzer<DTUserKeyedConfigHandler> {
13 public:
17  void analyze(const edm::Event& e, const edm::EventSetup& s) override {
19  std::cout << "got eshandle" << std::endl;
20  s.get<DTKeyedConfigListRcd>().get(klh);
21  std::cout << "got context" << std::endl;
22  cond::persistency::KeyList const& kl = *klh.product();
23  for (size_t i = 0; i < kl.size(); i++) {
24  std::shared_ptr<DTKeyedConfig> kentry = kl.getUsingIndex<DTKeyedConfig>(i);
25  if (kentry.get())
26  std::cout << kentry->getId() << std::endl;
27  }
28  source().setList(&kl);
29  }
30 
31 private:
32 };
33 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
DTUserKeyedConfigPopConAnalyzer::~DTUserKeyedConfigPopConAnalyzer
~DTUserKeyedConfigPopConAnalyzer() override
Definition: DTUserKeyedConfigPopConAnalyzer.cc:16
DTUserKeyedConfigPopConAnalyzer
Definition: DTUserKeyedConfigPopConAnalyzer.cc:12
ESHandle.h
DTUserKeyedConfigHandler.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTKeyedConfigListRcd.h
popcon::PopConAnalyzer< DTUserKeyedConfigHandler >::source
SourceHandler & source()
Definition: PopConAnalyzer.h:27
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
DTKeyedConfigListRcd
Definition: DTKeyedConfigListRcd.h:5
edm::ESHandle
Definition: DTSurvey.h:22
cond::persistency::KeyList::getUsingIndex
std::shared_ptr< T > getUsingIndex(size_t n) const
Retrieves the pre-fetched data. The index is the same order as the keys used in setKeys.
Definition: KeyList.h:44
DTUserKeyedConfigPopConAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &s) override
Definition: DTUserKeyedConfigPopConAnalyzer.cc:17
edm::ParameterSet
Definition: ParameterSet.h:47
cond::persistency::KeyList::size
size_t size() const
Number of keys based on container passed to setKeys.
Definition: KeyList.h:63
DTKeyedConfig.h
DTKeyedConfig
Definition: DTKeyedConfig.h:35
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
popcon
Definition: Exception.h:6
KeyList.h
DTUserKeyedConfigHandler
Definition: DTUserKeyedConfigHandler.h:46
DTUserKeyedConfigHandler::setList
void setList(const cond::persistency::KeyList *list)
Definition: DTUserKeyedConfigHandler.cc:427
EventSetup.h
cond::persistency::KeyList
Definition: KeyList.h:33
edm::Event
Definition: Event.h:73
PopConAnalyzer.h
DTUserKeyedConfigPopConAnalyzer::DTUserKeyedConfigPopConAnalyzer
DTUserKeyedConfigPopConAnalyzer(const edm::ParameterSet &pset)
Definition: DTUserKeyedConfigPopConAnalyzer.cc:14
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
popcon::PopConAnalyzer< DTUserKeyedConfigHandler >::PopConAnalyzer
PopConAnalyzer(const edm::ParameterSet &pset)
Definition: PopConAnalyzer.h:21
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
popcon::PopConAnalyzer
Definition: PopConAnalyzer.h:17