File indexing completed on 2024-09-12 04:16:28
0001 #include "FWCore/Framework/interface/NoProductResolverException.h"
0002
0003 #include <cstring>
0004
0005 namespace edm {
0006 namespace eventsetup {
0007
0008 NoProductResolverException::NoProductResolverException(const EventSetupRecordKey& key,
0009 const char* iClassName,
0010 const char* productLabel,
0011 bool moduleLabelDoesNotMatch)
0012 : cms::Exception("NoProductResolverException") {
0013 append("Cannot find EventSetup module to produce data of type \"");
0014 append(iClassName);
0015 append("\" in\nrecord \"");
0016 append(key.name());
0017 if (std::strncmp(productLabel, "@mayConsume", 11) == 0) {
0018
0019
0020 append("\", which is being consumed via a call to setMayConsume.\n");
0021 } else {
0022 append("\" with product label \"");
0023 append(productLabel);
0024 append("\".\n");
0025 }
0026 if (moduleLabelDoesNotMatch) {
0027
0028
0029
0030
0031
0032
0033
0034
0035 append(
0036 "An ESSource or ESProducer is configured to produce this data, but the\n"
0037 "ESInputTag in the configuration also requires a specific module label.\n"
0038 "The preferred module to produce this data in the configuration has a\n"
0039 "different module label.\n");
0040 append(
0041 "Please ensure that there is an ESSource or ESProducer configured with\n"
0042 "the requested module label that both produces this data and is selected\n"
0043 "as the preferred provider for this data. If there is more than one such\n"
0044 "ESSource or ESProducer you may need to use an ESPrefer directive in the\n"
0045 "configuration.");
0046 } else {
0047 append("Please add an ESSource or ESProducer to your job which can deliver this data.\n");
0048 }
0049 }
0050 }
0051 }