Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:47

0001 #ifndef FWCore_Framework_ModuleChanger_h
0002 #define FWCore_Framework_ModuleChanger_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     ModuleChanger
0007 //
0008 /**\class ModuleChanger ModuleChanger.h FWCore/Framework/interface/ModuleChanger.h
0009 
0010  Description: Handles modifying a module after the job has started
0011 
0012  Usage:
0013     This class is used by an EDLooper at the end of a loop in order to modify the
0014  parameters of a module.
0015 
0016 */
0017 //
0018 // Original Author:  Chris Jones
0019 //         Created:  Thu Jul 15 15:05:17 EDT 2010
0020 //
0021 
0022 // system include files
0023 #include <string>
0024 
0025 // user include files
0026 #include "FWCore/Utilities/interface/propagate_const.h"
0027 #include "FWCore/Framework/interface/ESRecordsToProxyIndices.h"
0028 
0029 // forward declarations
0030 
0031 namespace edm {
0032   class ParameterSet;
0033   class Schedule;
0034   class ProductRegistry;
0035 
0036   class ModuleChanger {
0037   public:
0038     ModuleChanger(Schedule*, ProductRegistry const* iReg, eventsetup::ESRecordsToProxyIndices);
0039     ModuleChanger(const ModuleChanger&) = delete;                   // stop default
0040     const ModuleChanger& operator=(const ModuleChanger&) = delete;  // stop default
0041     virtual ~ModuleChanger();
0042 
0043     // ---------- const member functions ---------------------
0044 
0045     // ---------- static member functions --------------------
0046 
0047     // ---------- member functions ---------------------------
0048     bool changeModule(const std::string& iLabel, const ParameterSet& iPSet);
0049 
0050   private:
0051     // ---------- member data --------------------------------
0052     edm::propagate_const<Schedule*> schedule_;
0053     ProductRegistry const* registry_;
0054     eventsetup::ESRecordsToProxyIndices indices_;
0055   };
0056 }  // namespace edm
0057 #endif