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 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 
MessageLogger.h
edm::errors::LogicError
Definition: EDMException.h:37
edm::eventsetup::SourceMakerTraits::name
static std::string name()
Definition: SourceFactory.cc:28
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::eventsetup::EventSetupsController::putESSource
void putESSource(ParameterSet const &pset, std::shared_ptr< EventSetupRecordIntervalFinder > const &component, unsigned subProcessIndex)
Definition: EventSetupsController.cc:230
EventSetupsController.h
COMPONENTFACTORY_GET
#define COMPONENTFACTORY_GET(_type_)
Definition: ComponentFactory.h:120
EDMException.h
edm::eventsetup::EventSetupProvider
Definition: EventSetupProvider.h:49
edm::eventsetup::SourceMakerTraits::logInfoWhenSharing
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
Definition: SourceFactory.cc:47
edm::eventsetup::SourceMakerTraits::replaceExisting
static void replaceExisting(EventSetupProvider &iProvider, std::shared_ptr< EventSetupRecordIntervalFinder > iComponent)
Definition: SourceFactory.cc:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SourceFactory.h
edm::eventsetup::SourceMakerTraits
Definition: SourceFactory.h:53
edm::ParameterSet
Definition: ParameterSet.h:47
edm::eventsetup::EventSetupsController::indexOfNextProcess
unsigned indexOfNextProcess() const
Definition: EventSetupsController.h:133
edm::eventsetup::EventSetupsController
Definition: EventSetupsController.h:79
edm::eventsetup::SourceMakerTraits::putComponent
static void putComponent(EventSetupsController &esController, ParameterSet const &iConfiguration, std::shared_ptr< base_type > const &component)
Definition: SourceFactory.cc:41
edm::eventsetup::EventSetupsController::getESSourceAndRegisterProcess
std::shared_ptr< EventSetupRecordIntervalFinder > getESSourceAndRegisterProcess(ParameterSet const &pset, unsigned subProcessIndex)
Definition: EventSetupsController.cc:213
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::eventsetup::SourceMakerTraits::getComponentAndRegisterProcess
static std::shared_ptr< base_type > getComponentAndRegisterProcess(EventSetupsController &esController, ParameterSet const &iConfiguration)
Definition: SourceFactory.cc:36
ParameterSet.h
label
const char * label
Definition: PFTauDecayModeTools.cc:11