30 class ModuleCallingContext;
61 one::OutputModule<>(iPSet),
63 verbose_(iPSet.getUntrackedParameter<
bool>(
"verbose")) {}
87 for (
auto const& product : iProducts) {
106 <<
"While processing " <<
id <<
" getByToken request for " << branchDescription->
moduleLabel() <<
" '" 108 <<
"\n should have returned BranchID " << branchDescription->
branchID() <<
" but returned BranchID " 115 if (iOriginal.empty()) {
118 if (iOriginal.back() ==
'.') {
119 return iOriginal.substr(0, iOriginal.size() - 1);
125 std::ostringstream
str;
131 auto bn = canonicalName(kp.first->branchName());
132 auto found = expectedProducts.find(bn);
133 if (
found == expectedProducts.end()) {
134 throw cms::Exception(
"CrosscheckFailed") <<
"unexpected kept product " << bn;
136 expectedProducts.erase(bn);
138 if (not expectedProducts.empty()) {
140 e <<
"Did not find the expected products:\n";
141 for (
auto const&
p : expectedProducts) {
149 std::ostringstream
str;
154 std::ostringstream
str;
170 desc.addUntracked<std::vector<std::string>>(
"crosscheck", {})
171 ->setComment(
"Branch names that should be in the event. If empty no check done.");
172 desc.addUntracked<
bool>(
"verbose",
false);
173 descriptions.
add(
"productChecker",
desc);
const std::vector< std::string > crosscheck_
BranchID const & branchID() const
TypeID unwrappedTypeID() const
std::string const & processName() const
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
std::string const & productInstanceName() const
#define DEFINE_FWK_MODULE(type)
BranchDescription const & branchDescription() const
bool isValid() const noexcept(true)
Log< level::Info, false > LogInfo
void writeRun(RunForOutput const &) override
SelectedProductsForBranchType const & keptProducts() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
static void check(T const &p, std::string const &id, SelectedProducts const &iProducts, bool iVerbose)
~GetProductCheckerOutputModule() override
void writeLuminosityBlock(LuminosityBlockForOutput const &) override
GetProductCheckerOutputModule(ParameterSet const &pset)
Provenance const * provenance() const noexcept(true)
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
std::string const & moduleLabel() const
void write(EventForOutput const &e) override