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
22 
23 //
24 // static member functions
25 //
26 namespace edm {
27  namespace eventsetup {
28 
29  std::string SourceMakerTraits::name() { return "CMS EDM Framework ESSource"; }
31 
32  void SourceMakerTraits::replaceExisting(EventSetupProvider&, std::shared_ptr<EventSetupRecordIntervalFinder>) {
33  throw edm::Exception(edm::errors::LogicError) << "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> SourceMakerTraits::getComponentAndRegisterProcess(
39  EventSetupsController& esController, ParameterSet const& iConfiguration) {
40  return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
41  }
42 
44  ParameterSet const& iConfiguration,
45  std::shared_ptr<base_type> const& component) {
46  esController.putESSource(iConfiguration, component, esController.indexOfNextProcess());
47  }
48 
50  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
51  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
52  std::string label = iConfiguration.getParameter<std::string>("@module_label");
53  edm::LogVerbatim("EventSetupSharing")
54  << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
55  }
56  } // namespace eventsetup
57 } // namespace edm
58 
Log< level::Info, true > LogVerbatim
std::shared_ptr< EventSetupRecordIntervalFinder > getESSourceAndRegisterProcess(ParameterSet const &pset, unsigned subProcessIndex)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static std::string const & baseType()
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)
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)