Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-01-13 00:12:19

0001 #ifndef FWCore_ParameterSet_ParameterSetDescriptionFillerBase_h
0002 #define FWCore_ParameterSet_ParameterSetDescriptionFillerBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     ParameterSet
0006 // Class  :     ParameterSetDescriptionFillerBase
0007 //
0008 /**\class ParameterSetDescriptionFillerBase ParameterSetDescriptionFillerBase.h FWCore/ParameterSet/interface/ParameterSetDescriptionFillerBase.h
0009 
0010  Description: Base class for a component which can fill a ParameterSetDescription object
0011 
0012  Usage:
0013     This base class provides an abstract interface for filling a ParameterSetDescription object.  This allows one to used by the 
0014 ParameterSetDescriptionFillerPluginFactory to load a component of any type (e.g. cmsRun Source, cmsRun EDProducer or even a tracking plugin)
0015 and query the component for its allowed ParameterSetDescription.
0016 
0017 */
0018 //
0019 // Original Author:  Chris Jones
0020 //         Created:  Wed Aug  1 16:46:53 EDT 2007
0021 //
0022 
0023 // system include files
0024 
0025 // user include files
0026 
0027 // forward declarations
0028 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0029 
0030 #include <string>
0031 
0032 namespace edm {
0033 
0034   namespace one {
0035     class EDProducerBase;
0036     class EDFilterBase;
0037     class EDAnalyzerBase;
0038     class OutputModuleBase;
0039   }  // namespace one
0040 
0041   namespace stream {
0042     class EDProducerBase;
0043     class EDFilterBase;
0044     class EDAnalyzerBase;
0045   }  // namespace stream
0046 
0047   namespace global {
0048     class EDProducerBase;
0049     class EDFilterBase;
0050     class EDAnalyzerBase;
0051     class OutputModuleBase;
0052   }  // namespace global
0053 
0054   namespace limited {
0055     class EDProducerBase;
0056     class EDFilterBase;
0057     class EDAnalyzerBase;
0058     class OutputModuleBase;
0059   }  // namespace limited
0060 
0061   class ParameterSetDescriptionFillerBase {
0062   public:
0063     ParameterSetDescriptionFillerBase() {}
0064     ParameterSetDescriptionFillerBase(const ParameterSetDescriptionFillerBase&) = delete;  // stop default
0065     const ParameterSetDescriptionFillerBase& operator=(const ParameterSetDescriptionFillerBase&) =
0066         delete;  // stop default
0067     virtual ~ParameterSetDescriptionFillerBase();
0068 
0069     // ---------- const member functions ---------------------
0070     virtual void fill(ConfigurationDescriptions& descriptions) const = 0;
0071     virtual const std::string& baseType() const = 0;
0072     virtual const std::string& extendedBaseType() const = 0;
0073 
0074     // ---------- static member functions --------------------
0075 
0076     // ---------- member functions ---------------------------
0077 
0078     static const std::string kBaseForESSource;
0079     static const std::string kBaseForESProducer;
0080     static const std::string kBaseForEDLooper;
0081 
0082   protected:
0083     static const std::string kEmpty;
0084     static const std::string kBaseForService;
0085     static const std::string kExtendedBaseForEDAnalyzer;
0086     static const std::string kExtendedBaseForEDProducer;
0087     static const std::string kExtendedBaseForEDFilter;
0088     static const std::string kExtendedBaseForOneEDAnalyzer;
0089     static const std::string kExtendedBaseForOneEDProducer;
0090     static const std::string kExtendedBaseForOneEDFilter;
0091     static const std::string kExtendedBaseForOneOutputModule;
0092     static const std::string kExtendedBaseForStreamEDAnalyzer;
0093     static const std::string kExtendedBaseForStreamEDProducer;
0094     static const std::string kExtendedBaseForStreamEDFilter;
0095     static const std::string kExtendedBaseForGlobalEDAnalyzer;
0096     static const std::string kExtendedBaseForGlobalEDProducer;
0097     static const std::string kExtendedBaseForGlobalEDFilter;
0098     static const std::string kExtendedBaseForGlobalOutputModule;
0099     static const std::string kExtendedBaseForLimitedEDAnalyzer;
0100     static const std::string kExtendedBaseForLimitedEDProducer;
0101     static const std::string kExtendedBaseForLimitedEDFilter;
0102     static const std::string kExtendedBaseForLimitedOutputModule;
0103 
0104     static const std::string& extendedBaseType(one::EDAnalyzerBase const*) { return kExtendedBaseForOneEDAnalyzer; }
0105     static const std::string& extendedBaseType(one::EDProducerBase const*) { return kExtendedBaseForOneEDProducer; }
0106     static const std::string& extendedBaseType(one::EDFilterBase const*) { return kExtendedBaseForOneEDFilter; }
0107     static const std::string& extendedBaseType(one::OutputModuleBase const*) { return kExtendedBaseForOneOutputModule; }
0108     static const std::string& extendedBaseType(stream::EDAnalyzerBase const*) {
0109       return kExtendedBaseForStreamEDAnalyzer;
0110     }
0111     static const std::string& extendedBaseType(stream::EDProducerBase const*) {
0112       return kExtendedBaseForStreamEDProducer;
0113     }
0114     static const std::string& extendedBaseType(stream::EDFilterBase const*) { return kExtendedBaseForStreamEDFilter; }
0115     static const std::string& extendedBaseType(global::EDAnalyzerBase const*) {
0116       return kExtendedBaseForGlobalEDAnalyzer;
0117     }
0118     static const std::string& extendedBaseType(global::EDProducerBase const*) {
0119       return kExtendedBaseForGlobalEDProducer;
0120     }
0121     static const std::string& extendedBaseType(global::EDFilterBase const*) { return kExtendedBaseForGlobalEDFilter; }
0122     static const std::string& extendedBaseType(global::OutputModuleBase const*) {
0123       return kExtendedBaseForGlobalOutputModule;
0124     }
0125     static const std::string& extendedBaseType(limited::EDAnalyzerBase const*) {
0126       return kExtendedBaseForLimitedEDAnalyzer;
0127     }
0128     static const std::string& extendedBaseType(limited::EDProducerBase const*) {
0129       return kExtendedBaseForLimitedEDProducer;
0130     }
0131     static const std::string& extendedBaseType(limited::EDFilterBase const*) { return kExtendedBaseForLimitedEDFilter; }
0132     static const std::string& extendedBaseType(limited::OutputModuleBase const*) {
0133       return kExtendedBaseForLimitedOutputModule;
0134     }
0135     static const std::string& extendedBaseType(void const*) { return kEmpty; }
0136 
0137   private:
0138     // ---------- member data --------------------------------
0139   };
0140 
0141 }  // namespace edm
0142 #endif