CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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),
10  record_(iRecordKey),
11  dataKey_(iDataKey)
12  {
13  }
14 
16 
17  const DataKey& NoDataExceptionBase::dataKey() const { return dataKey_; }
18 
20  return std::string(" A provider for this data exists, but it's unable to deliver the data for this \"")
21  +iKey.name()
22  +"\" record.\n Perhaps no valid data exists for this IOV? Please check the data's interval of validity.\n";
23  }
24 
26  return std::string("Please add an ESSource or ESProducer to your job which can deliver this data.\n");
27  }
28 
30  {
31  oString+= std::string("No data of type \"");
32  }
33 
35  {
36  oString += "\" with label \"";
37  oString += this->dataKey_.name().value();
38  oString += "\" in record \"";
39  oString += this->record_.name();
40  oString += "\"";
41  }
42 
43  void NoDataExceptionBase::constructMessage(const char* iClassName, const std::string& iExtraInfo)
44  {
46  beginDataTypeMessage(message);
47  message += iClassName;
48  endDataTypeMessage(message);
49  this->append(message+std::string("\n "));
50  this->append(iExtraInfo);
51  }
52 
53  }
54 }
static std::string providerButNoDataMessage(const EventSetupRecordKey &iKey)
void append(Exception const &another)
Definition: Exception.cc:203
std::string message() const
Definition: Exception.cc:187
NoDataExceptionBase(const EventSetupRecordKey &iRecordKey, const DataKey &iDataKey, const char *category_name="NoDataException")
void beginDataTypeMessage(std::string &) const
void endDataTypeMessage(std::string &) const
const DataKey & dataKey() const
const NameTag & name() const
Definition: DataKey.h:66
const char * value() const
Definition: DataKeyTags.h:39
void constructMessage(const char *iClassName, const std::string &iExtraInfo)