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  UnscheduledConfigurator(const UnscheduledConfigurator&) = delete; // stop default
42  const UnscheduledConfigurator& operator=(const UnscheduledConfigurator&) = delete; // stop default
43 
44  // ---------- const member functions ---------------------
45  Worker* findWorker(std::string const& iLabel) const {
46  auto itFound = m_labelToWorker.find(iLabel);
47  if (itFound != m_labelToWorker.end()) {
48  return itFound->second;
49  }
50  return nullptr;
51  }
52 
53  UnscheduledAuxiliary const* auxiliary() const { return m_aux; }
54 
55  private:
56  // ---------- member data --------------------------------
57  std::unordered_map<std::string, Worker*> m_labelToWorker;
59  };
60 } // namespace edm
61 
62 #endif
Worker * findWorker(std::string const &iLabel) const
const UnscheduledConfigurator & operator=(const UnscheduledConfigurator &)=delete
UnscheduledConfigurator(IT iBegin, IT iEnd, UnscheduledAuxiliary const *iAux)
std::vector< LinkConnSpec >::const_iterator IT
UnscheduledAuxiliary const * m_aux
HLT enums.
std::unordered_map< std::string, Worker * > m_labelToWorker
UnscheduledAuxiliary const * auxiliary() const