CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:
15  : popcon::PopConAnalyzer<DTKeyedConfigHandler>(pset),
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 
size_t size() const
Number of keys based on container passed to setKeys.
Definition: KeyList.h:63
void setList(const cond::persistency::KeyList *list)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:128
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
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
Log< level::Info, false > LogInfo
DTKeyedConfigPopConAnalyzer(const edm::ParameterSet &pset)
PopConAnalyzer(const edm::ParameterSet &pset)
edm::ESGetToken< cond::persistency::KeyList, DTKeyedConfigListRcd > perskeylistToken_