CMS 3D CMS Logo

UnscheduledConfigurator.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_UnscheduledConfigurator_h
2 #define FWCore_Framework_UnscheduledConfigurator_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : UnscheduledConfigurator
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Wed, 13 Apr 2016 18:57:55 GMT
19 //
20 
21 // system include files
22 #include <unordered_map>
23 
24 // user include files
25 
26 // forward declarations
27 
28 namespace edm {
29  class Worker;
31 
33  public:
34  template <typename IT>
35  UnscheduledConfigurator(IT iBegin, IT iEnd, UnscheduledAuxiliary const* iAux) : m_aux(iAux) {
36  for (auto it = iBegin; it != iEnd; ++it) {
37  m_labelToWorker.emplace((*it)->description().moduleLabel(), *it);
38  }
39  }
40 
41  // ---------- const member functions ---------------------
42  Worker* findWorker(std::string const& iLabel) const {
43  auto itFound = m_labelToWorker.find(iLabel);
44  if (itFound != m_labelToWorker.end()) {
45  return itFound->second;
46  }
47  return nullptr;
48  }
49 
50  UnscheduledAuxiliary const* auxiliary() const { return m_aux; }
51 
52  private:
53  UnscheduledConfigurator(const UnscheduledConfigurator&) = delete; // stop default
54 
55  const UnscheduledConfigurator& operator=(const UnscheduledConfigurator&) = delete; // stop default
56 
57  // ---------- member data --------------------------------
58  std::unordered_map<std::string, Worker*> m_labelToWorker;
60  };
61 } // namespace edm
62 
63 #endif
const UnscheduledConfigurator & operator=(const UnscheduledConfigurator &)=delete
UnscheduledConfigurator(IT iBegin, IT iEnd, UnscheduledAuxiliary const *iAux)
std::vector< LinkConnSpec >::const_iterator IT
UnscheduledAuxiliary const * m_aux
UnscheduledAuxiliary const * auxiliary() const
HLT enums.
Worker * findWorker(std::string const &iLabel) const
std::unordered_map< std::string, Worker * > m_labelToWorker