CMS 3D CMS Logo

SourceFactory.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Framework
4 // Class : SourceFactory
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Author: Chris Jones
10 // Created: Wed May 25 19:27:37 EDT 2005
11 //
12 
13 // system include files
14 
15 // user include files
21 
22 //
23 // static member functions
24 //
25 namespace edm {
26  namespace eventsetup {
27 
28  std::string SourceMakerTraits::name() { return "CMS EDM Framework ESSource"; }
29 
30  void
31  SourceMakerTraits::replaceExisting(EventSetupProvider&, std::shared_ptr<EventSetupRecordIntervalFinder> ) {
33  << "SourceMakerTraits::replaceExisting\n"
34  << "This function is not implemented and should never be called.\n"
35  << "Please report this to a Framework Developer\n";
36  }
37 
38  std::shared_ptr<SourceMakerTraits::base_type>
40  ParameterSet const& iConfiguration) {
41  return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
42  }
43 
45  ParameterSet const& iConfiguration,
46  std::shared_ptr<base_type> const& component) {
47  esController.putESSource(iConfiguration, component, esController.indexOfNextProcess());
48  }
49 
51 
52  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
53  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
54  std::string label = iConfiguration.getParameter<std::string>("@module_label");
55  edm::LogVerbatim("EventSetupSharing") << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
56  }
57  }
58 }
59 
T getParameter(std::string const &) const
std::shared_ptr< EventSetupRecordIntervalFinder > getESSourceAndRegisterProcess(ParameterSet const &pset, unsigned subProcessIndex)
void putESSource(ParameterSet const &pset, std::shared_ptr< EventSetupRecordIntervalFinder > const &component, unsigned subProcessIndex)
static void replaceExisting(EventSetupProvider &iProvider, std::shared_ptr< EventSetupRecordIntervalFinder > iComponent)
#define COMPONENTFACTORY_GET(_type_)
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
static std::shared_ptr< base_type > getComponentAndRegisterProcess(EventSetupsController &esController, ParameterSet const &iConfiguration)
HLT enums.
static void putComponent(EventSetupsController &esController, ParameterSet const &iConfiguration, std::shared_ptr< base_type > const &component)