CMS 3D CMS Logo

DTKeyedConfigPopConAnalyzer.cc
Go to the documentation of this file.
9 #include <memory>
10 
11 //typedef popcon::PopConAnalyzer<DTKeyedConfigHandler> DTKeyedConfigPopConAnalyzer;
12 class DTKeyedConfigPopConAnalyzer : public popcon::PopConAnalyzer<DTKeyedConfigHandler> {
13 public:
16  copyData(pset.getParameter<edm::ParameterSet>("Source").getUntrackedParameter<bool>("copyData", true)),
19  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override {
20  if (!copyData)
21  return;
22  edm::LogInfo("DTKeyedConfigPopConAnalyzer") << "got context" << std::endl;
24  for (size_t i = 0; i < kl.size(); i++) {
25  std::shared_ptr<DTKeyedConfig> kelem = kl.getUsingIndex<DTKeyedConfig>(i);
26  if (kelem.get())
27  edm::LogInfo("DTKeyedConfigPopConAnalyzer") << kelem->getId() << std::endl;
28  }
29  source().setList(&kl);
30  }
31 
32 private:
33  bool copyData;
35 };
36 
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void setList(const cond::persistency::KeyList *list)
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Info, false > LogInfo
size_t size() const
Number of keys based on container passed to setKeys.
Definition: KeyList.h:63
DTKeyedConfigPopConAnalyzer(const edm::ParameterSet &pset)
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
HLT enums.
PopConAnalyzer(const edm::ParameterSet &pset)
edm::ESGetToken< cond::persistency::KeyList, DTKeyedConfigListRcd > perskeylistToken_