CMS 3D CMS Logo

NoDataException.cc
Go to the documentation of this file.
2 
3 namespace edm {
4  namespace eventsetup {
5 
7  const DataKey& iDataKey,
8  const char* category_name)
9  : cms::Exception(category_name), record_(iRecordKey), dataKey_(iDataKey) {}
10 
12 
13  const DataKey& NoDataExceptionBase::dataKey() const { return dataKey_; }
14 
16  return std::string(" A provider for this data exists, but it's unable to deliver the data for this \"") +
17  iKey.name() +
18  "\" record.\n Perhaps no valid data exists for this IOV? Please check the data's interval of validity.\n";
19  }
20 
22  return std::string("Please add an ESSource or ESProducer to your job which can deliver this data.\n");
23  }
24 
26  oString += std::string("No data of type \"");
27  }
28 
30  oString += "\" with label \"";
31  oString += this->dataKey_.name().value();
32  oString += "\" in record \"";
33  oString += this->record_.name();
34  oString += "\"";
35  }
36 
37  void NoDataExceptionBase::constructMessage(const char* iClassName, const std::string& iExtraInfo) {
39  beginDataTypeMessage(message);
40  message += iClassName;
41  endDataTypeMessage(message);
42  this->append(message + std::string("\n "));
43  this->append(iExtraInfo);
44  }
45 
46  } // namespace eventsetup
47 } // namespace edm
static std::string providerButNoDataMessage(const EventSetupRecordKey &iKey)
void append(Exception const &another)
Definition: Exception.cc:153
std::string message() const
Definition: Exception.cc:145
DataKey const & dataKey_
Definition: DataProxy.cc:115
NoDataExceptionBase(const EventSetupRecordKey &iRecordKey, const DataKey &iDataKey, const char *category_name="NoDataException")
Namespace of DDCMS conversion namespace.
void beginDataTypeMessage(std::string &) const
#define noexcept
void endDataTypeMessage(std::string &) const
const DataKey & dataKey() const
HLT enums.
const NameTag & name() const
Definition: DataKey.h:53
const char * value() const
Definition: DataKeyTags.h:39
void constructMessage(const char *iClassName, const std::string &iExtraInfo)