Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-18 22:30:20

0001 // -*- C++ -*-
0002 //
0003 // Package:     Framework
0004 // Class  :     ModuleFactory
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Author:      Chris Jones
0010 // Created:     Wed May 25 19:27:44 EDT 2005
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/Framework/interface/ModuleFactory.h"
0017 #include "FWCore/Framework/interface/EventSetupProvider.h"
0018 #include "FWCore/Framework/interface/EventSetupsController.h"
0019 
0020 //
0021 // constants, enums and typedefs
0022 //
0023 namespace edm {
0024   namespace eventsetup {
0025 
0026     //
0027     // static member functions
0028     //
0029     std::string ModuleMakerTraits::name() { return "CMS EDM Framework ESModule"; }
0030     void ModuleMakerTraits::addTo(EventSetupProvider& iProvider,
0031                                   std::shared_ptr<DataProxyProvider> iComponent,
0032                                   ParameterSet const&,
0033                                   bool) {
0034       iProvider.add(iComponent);
0035     }
0036 
0037     void ModuleMakerTraits::replaceExisting(EventSetupProvider& iProvider,
0038                                             std::shared_ptr<DataProxyProvider> iComponent) {
0039       iProvider.replaceExisting(iComponent);
0040     }
0041 
0042     std::shared_ptr<ModuleMakerTraits::base_type> ModuleMakerTraits::getComponentAndRegisterProcess(
0043         EventSetupsController& esController, ParameterSet const& iConfiguration) {
0044       return esController.getESProducerAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
0045     }
0046 
0047     void ModuleMakerTraits::putComponent(EventSetupsController& esController,
0048                                          ParameterSet const& iConfiguration,
0049                                          std::shared_ptr<base_type> const& component) {
0050       esController.putESProducer(iConfiguration, component, esController.indexOfNextProcess());
0051     }
0052   }  // namespace eventsetup
0053 }  // namespace edm
0054 COMPONENTFACTORY_GET(edm::eventsetup::ModuleMakerTraits);