CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 SourceMakerTraits::replaceExisting(EventSetupProvider&, std::shared_ptr<EventSetupRecordIntervalFinder>) {
31  throw edm::Exception(edm::errors::LogicError) << "SourceMakerTraits::replaceExisting\n"
32  << "This function is not implemented and should never be called.\n"
33  << "Please report this to a Framework Developer\n";
34  }
35 
36  std::shared_ptr<SourceMakerTraits::base_type> SourceMakerTraits::getComponentAndRegisterProcess(
37  EventSetupsController& esController, ParameterSet const& iConfiguration) {
38  return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
39  }
40 
42  ParameterSet const& iConfiguration,
43  std::shared_ptr<base_type> const& component) {
44  esController.putESSource(iConfiguration, component, esController.indexOfNextProcess());
45  }
46 
48  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
49  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
50  std::string label = iConfiguration.getParameter<std::string>("@module_label");
51  edm::LogVerbatim("EventSetupSharing")
52  << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
53  }
54  } // namespace eventsetup
55 } // namespace edm
56 
Log< level::Info, true > LogVerbatim
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_)
char const * label
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
static std::shared_ptr< base_type > getComponentAndRegisterProcess(EventSetupsController &esController, ParameterSet const &iConfiguration)
static void putComponent(EventSetupsController &esController, ParameterSet const &iConfiguration, std::shared_ptr< base_type > const &component)