Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:52

0001 #ifndef FWCore_ParameterSet_ParameterSetDescriptionFillerPluginFactory_h
0002 #define FWCore_ParameterSet_ParameterSetDescriptionFillerPluginFactory_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     ParameterSet
0006 // Class  :     ParameterSetDescriptionFillerPluginFactory
0007 //
0008 /**\class ParameterSetDescriptionFillerPluginFactory ParameterSetDescriptionFillerPluginFactory.h FWCore/ParameterSet/interface/ParameterSetDescriptionFillerPluginFactory.h
0009 
0010  Description: Provides access to the ParameterSetDescription object of a plugin
0011 
0012  Usage:
0013     The Factory allows loading of plugins and querying them for their ParameterSetDescription.
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Wed Aug  1 16:47:01 EDT 2007
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/PluginManager/interface/PluginFactory.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSetDescriptionFiller.h"
0026 
0027 // forward declarations
0028 
0029 namespace edm {
0030   typedef edmplugin::PluginFactory<ParameterSetDescriptionFillerBase*(void)> ParameterSetDescriptionFillerPluginFactory;
0031 }
0032 
0033 #define DEFINE_FWK_PSET_DESC_FILLER_IMPL(type, name, postfix)                                                     \
0034   static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller<type> > \
0035   EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
0036 //NOTE: Can't do the below since this appears on the same line as another factory and w'ed have two variables with the same name
0037 //DEFINE_EDM_PLUGIN (edm::ParameterSetDescriptionFillerPluginFactory,type,#type)
0038 
0039 #define DEFINE_FWK_PSET_DESC_FILLER(type) DEFINE_FWK_PSET_DESC_FILLER_IMPL(type, #type, _0)
0040 
0041 // Define another analogous macro to handle the special case of services.
0042 
0043 #define DEFINE_DESC_FILLER_FOR_SERVICES(pluginName, serviceType)                                                        \
0044   static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForServices<serviceType> > \
0045   EDM_PLUGIN_SYM(s_filler, __LINE__)(#pluginName)
0046 
0047 #define DEFINE_DESC_FILLER_FOR_ESSOURCES_IMPL(type, name)                                                         \
0048   static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForESSources<type> > \
0049   EDM_PLUGIN_SYM(s_filler, __LINE__)(name)
0050 #define DEFINE_DESC_FILLER_FOR_ESSOURCES(type) DEFINE_DESC_FILLER_FOR_ESSOURCES_IMPL(type, #type)
0051 
0052 #define DEFINE_DESC_FILLER_FOR_ESPRODUCERS_IMPL(type, name, postfix)                                                \
0053   static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForESProducers<type> > \
0054   EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
0055 #define DEFINE_DESC_FILLER_FOR_ESPRODUCERS(type) DEFINE_DESC_FILLER_FOR_ESPRODUCERS_IMPL(type, #type, _0)
0056 
0057 #define DEFINE_DESC_FILLER_FOR_EDLOOPERS(type)                                                                    \
0058   static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForEDLoopers<type> > \
0059   EDM_PLUGIN_SYM(s_filler, __LINE__)(#type)
0060 
0061 #endif