00001 // -*- C++ -*- 00002 // 00003 // Package: ParameterSet 00004 // Class : ParameterDescription 00005 // 00006 // Implementation: 00007 // <Notes on implementation> 00008 // 00009 // Original Author: Chris Jones 00010 // Created: Thu Aug 2 15:35:43 EDT 2007 00011 // $Id: ParameterDescription.cc,v 1.2 2008/03/12 19:56:51 wmtan Exp $ 00012 // 00013 00014 // system include files 00015 00016 // user include files 00017 #include "FWCore/ParameterSet/interface/ParameterDescription.h" 00018 00019 00020 // 00021 // constants, enums and typedefs 00022 // 00023 #define TYPE_TO_NAME(type) case k_ ## type: return #type 00024 #define TYPE_TO_ENUM(type,e_val) template<> ParameterTypes ParameterTypeToEnum::toEnum<type >(){ return e_val; } 00025 00026 namespace edm { 00027 00028 TYPE_TO_ENUM(int,k_int32) 00029 TYPE_TO_ENUM(unsigned int,k_uint32) 00030 00031 std::string parameterTypeEnumToString(ParameterTypes iType){ 00032 switch(iType) { 00033 case k_uint32: 00034 return "uint32"; 00035 case k_vuint32: 00036 return "vuint32"; 00037 case k_int32: 00038 return "int32"; 00039 case k_vint32: 00040 return "vint32"; 00041 case k_uint64: 00042 return "uint64"; 00043 case k_vuint64: 00044 return "vuint64"; 00045 case k_int64: 00046 return "int64"; 00047 case k_vint64: 00048 return "vint64"; 00049 case k_string: 00050 return "string"; 00051 case k_vstring: 00052 return "vstring"; 00053 case k_bool: 00054 return "bool"; 00055 case k_vbool: 00056 return "vbool"; 00057 TYPE_TO_NAME(double); 00058 TYPE_TO_NAME(vdouble); 00059 TYPE_TO_NAME(PSet); 00060 TYPE_TO_NAME(VPSet); 00061 TYPE_TO_NAME(FileInPath); 00062 TYPE_TO_NAME(InputTag); 00063 TYPE_TO_NAME(VInputTag); 00064 TYPE_TO_NAME(EventID); 00065 TYPE_TO_NAME(VEventID); 00066 TYPE_TO_NAME(LuminosityBlockID); 00067 TYPE_TO_NAME(VLuminosityBlockID); 00068 default: 00069 assert(false); 00070 } 00071 return ""; 00072 } 00073 00074 // 00075 // static data member definitions 00076 // 00077 00078 // 00079 // constructors and destructor 00080 // 00081 ParameterDescription::ParameterDescription(const std::string& iLabel, 00082 bool iIsTracked, 00083 ParameterTypes iType) 00084 :label_(iLabel), 00085 type_(iType), 00086 isTracked_(iIsTracked) 00087 { 00088 } 00089 00090 // ParameterDescription::ParameterDescription(const ParameterDescription& rhs) 00091 // { 00092 // // do actual copying here; 00093 // } 00094 00095 ParameterDescription::~ParameterDescription() 00096 { 00097 } 00098 00099 // 00100 // assignment operators 00101 // 00102 // const ParameterDescription& ParameterDescription::operator=(const ParameterDescription& rhs) 00103 // { 00104 // //An exception safe implementation is 00105 // ParameterDescription temp(rhs); 00106 // swap(rhs); 00107 // 00108 // return *this; 00109 // } 00110 00111 // 00112 // member functions 00113 // 00114 00115 // 00116 // const member functions 00117 // 00118 00119 // 00120 // static member functions 00121 // 00122 }