test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NoDataException.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_NoDataException_h
2 #define FWCore_Framework_NoDataException_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Module: NoDataException
7 //
60 //
61 // Author: Chris D Jones
62 // Created: Tue Dec 7 09:10:34 EST 1999
63 //
64 
65 // system include files
66 #include <string>
67 
68 // user include files
73 
74 // forward declarations
75 namespace edm {
76  namespace eventsetup {
77 
79 {
80 public:
81  NoDataExceptionBase(const EventSetupRecordKey& iRecordKey,
82  const DataKey& iDataKey,
83  const char* category_name = "NoDataException") ;
84  virtual ~NoDataExceptionBase() throw();
85  const DataKey& dataKey() const;
86 protected:
88  static std::string noProxyMessage();
89  void constructMessage(const char* iClassName, const std::string& iExtraInfo);
90 private:
91  void beginDataTypeMessage(std::string&) const;
92  void endDataTypeMessage(std::string&) const;
93 
94  // ---------- Constructors and destructor ----------------
95  //NoDataExceptionBase(const NoDataExceptionBase&) ; //allow default
96  //const NoDataExceptionBase& operator=(const NoDataExceptionBase&); // allow default
97 
98  // ---------- data members -------------------------------
101 };
102 
103 template <class T>
105 {
106 public:
108  const DataKey& iDataKey,
109  const char* category_name = "NoDataException") :
110  NoDataExceptionBase(iRecordKey, iDataKey, category_name)
111  {
112  constructMessage(heterocontainer::className<T>(),
113  providerButNoDataMessage(iRecordKey));
114  }
115 
117  const DataKey& iDataKey,
118  const char* category_name ,
119  const std::string& iExtraInfo ) :
120  NoDataExceptionBase(iRecordKey, iDataKey, category_name)
121  {
122  constructMessage(heterocontainer::className<T>(),
123  iExtraInfo);
124  }
125 
126 };
127 
128  }
129 }
130 #endif
static std::string providerButNoDataMessage(const EventSetupRecordKey &iKey)
NoDataException(const EventSetupRecordKey &iRecordKey, const DataKey &iDataKey, const char *category_name="NoDataException")
NoDataExceptionBase(const EventSetupRecordKey &iRecordKey, const DataKey &iDataKey, const char *category_name="NoDataException")
void beginDataTypeMessage(std::string &) const
NoDataException(const EventSetupRecordKey &iRecordKey, const DataKey &iDataKey, const char *category_name, const std::string &iExtraInfo)
void endDataTypeMessage(std::string &) const
const DataKey & dataKey() const
void constructMessage(const char *iClassName, const std::string &iExtraInfo)