CMS 3D CMS Logo

ParameterDescription.h

Go to the documentation of this file.
00001 #ifndef FWCore_ParameterSet_ParameterDescription_h
00002 #define FWCore_ParameterSet_ParameterDescription_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     ParameterSet
00006 // Class  :     ParameterDescription
00007 // 
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Thu Aug  2 15:33:46 EDT 2007
00019 // $Id: ParameterDescription.h,v 1.2 2008/03/12 19:55:51 wmtan Exp $
00020 //
00021 
00022 // system include files
00023 #include <string>
00024 
00025 // user include files
00026 
00027 // forward declarations
00028 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
00029 
00030 namespace edm {
00031   enum ParameterTypes {
00032     k_uint32,    k_vuint32,
00033     k_int32,     k_vint32,
00034     k_uint64,    k_vuint64,
00035     k_int64,     k_vint64,
00036     k_string,    k_vstring,
00037     k_bool,      k_vbool,
00038     k_double,    k_vdouble,
00039     k_PSet,      k_VPSet,
00040     k_FileInPath,
00041     k_InputTag,  k_VInputTag,
00042     k_EventID,   k_VEventID,
00043     k_LuminosityBlockID,   k_VLuminosityBlockID,
00044     k_numParameterTypes
00045   };
00046   std::string parameterTypeEnumToString(ParameterTypes);
00047   
00048     struct ParameterTypeToEnum {
00049       template <class T>
00050       static ParameterTypes toEnum();
00051     };
00052   
00053 class ParameterDescription
00054 {
00055 
00056    public:
00057       virtual ~ParameterDescription();
00058 
00059       // ---------- const member functions ---------------------
00060       virtual void validate(const ParameterSet&) const = 0;
00061   
00062       const std::string& label() const {
00063         return label_;
00064       }
00065 
00066       ParameterTypes type() const {
00067         return type_;
00068       }
00069       
00070       bool isTracked() const {
00071         return isTracked_;
00072       }
00073       // ---------- static member functions --------------------
00074 
00075       // ---------- member functions ---------------------------
00076 
00077   protected:
00078       ParameterDescription(const std::string& iLabel,
00079                            bool isTracked,
00080                            ParameterTypes iType);
00081 
00082    private:
00083       ParameterDescription(const ParameterDescription&); // stop default
00084 
00085       const ParameterDescription& operator=(const ParameterDescription&); // stop default
00086 
00087       // ---------- member data --------------------------------
00088       std::string label_;
00089       ParameterTypes type_;
00090       bool isTracked_;
00091 };
00092 
00093 }
00094 #endif

Generated on Tue Jun 9 17:36:26 2009 for CMSSW by  doxygen 1.5.4