Skip to content

Commit 5b531f0

Browse files
committed
Check that ProductRegistries are all consistent
Check that Event, LuminosityBlock and Run have consistent ProductRegistries.
1 parent b043e2f commit 5b531f0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

FWCore/Modules/src/ProvenanceCheckerOutputModule.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,19 @@ namespace edm {
172172
: "")
173173
<< (!missingFromReg.empty() ? " Have missing info from ProductRegistry.\n" : "");
174174
}
175+
176+
//check consistency with all Intervals
177+
if (e.productRegistry().cacheIdentifier() != e.getRun().productRegistry().cacheIdentifier()) {
178+
throw cms::Exception("ProvenanceError")
179+
<< "The registry cache id for Event ( " << e.productRegistry().cacheIdentifier()
180+
<< " ) does not match the one for Run ( " << e.getRun().productRegistry().cacheIdentifier() << " )";
181+
}
182+
if (e.productRegistry().cacheIdentifier() != e.getLuminosityBlock().productRegistry().cacheIdentifier()) {
183+
throw cms::Exception("ProvenanceError")
184+
<< "The registry cache id for Event ( " << e.productRegistry().cacheIdentifier()
185+
<< " ) does not match the one for LuminosityBlock ( "
186+
<< e.getLuminosityBlock().productRegistry().cacheIdentifier() << " )";
187+
}
175188
}
176189

177190
//

0 commit comments

Comments
 (0)