1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "DataFormats/Common/interface/CommonExceptions.h"
#include "DataFormats/Provenance/interface/ProductID.h"
#include "FWCore/Utilities/interface/EDMException.h"
namespace edm {
void checkForWrongProduct(ProductID const& keyID, ProductID const& refID) {
if (keyID != refID) {
throw Exception(errors::InvalidReference)
<< "AssociationVector: trying to use [] operator passing a reference\n"
<< " with the wrong product id (i.e.: pointing to the wrong collection)\n"
<< " keyRef.id = " << keyID << ", ref.id = " << refID << "\n";
}
}
} // namespace edm
|