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
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::Worker
Definition: Worker.h:83
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::UnscheduledConfigurator::UnscheduledConfigurator
UnscheduledConfigurator(IT iBegin, IT iEnd, UnscheduledAuxiliary const *iAux)
Definition: UnscheduledConfigurator.h:35
UnscheduledAuxiliary
edm::UnscheduledConfigurator::findWorker
Worker * findWorker(std::string const &iLabel) const
Definition: UnscheduledConfigurator.h:42
edm::UnscheduledConfigurator
Definition: UnscheduledConfigurator.h:32
edm::UnscheduledAuxiliary
Definition: UnscheduledAuxiliary.h:33
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
edm::UnscheduledConfigurator::m_labelToWorker
std::unordered_map< std::string, Worker * > m_labelToWorker
Definition: UnscheduledConfigurator.h:58
edm::UnscheduledConfigurator::auxiliary
UnscheduledAuxiliary const * auxiliary() const
Definition: UnscheduledConfigurator.h:50
edm::UnscheduledConfigurator::m_aux
UnscheduledAuxiliary const * m_aux
Definition: UnscheduledConfigurator.h:59
edm::UnscheduledConfigurator::operator=
const UnscheduledConfigurator & operator=(const UnscheduledConfigurator &)=delete