Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary: abort if cutParser fails to find methods #44590

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CommonTools/Utils/src/MethodSetter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

#include <string>

//DEBUG THREADING PROBLEM
#include <cstdlib>

using namespace reco::parser;
using namespace std;

Expand Down Expand Up @@ -121,6 +124,8 @@ bool MethodSetter::push(const string& name, const vector<AnyMethodArgument>& arg
// Not a data member either, fatal error, throw.
switch (error) {
case reco::parser::kNameDoesNotExist: {
//DEBUG THREADING ISSUE
std::abort();
Exception ex(begin);
ex << "no method or data member named \"" << name << "\" found for type \"" << type.name() << "\"\n";
// The following information is for temporary debugging only, intended to be removed later
Expand Down
3 changes: 3 additions & 0 deletions CommonTools/Utils/test/testCutParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ void testCutParser::checkAll() {

// check handling of errors
// first those who are the same in lazy and non lazy parsing
//DEBUG FOR THREADING
/*
for (int lazy = 0; lazy <= 1; ++lazy) {
sel.reset();
CPPUNIT_ASSERT(!reco::parser::cutParser<reco::Track>("1abc", sel, lazy));
Expand Down Expand Up @@ -220,6 +222,7 @@ void testCutParser::checkAll() {

sel.reset();
CPPUNIT_ASSERT_THROW(reco::parser::cutParser<reco::Track>("quality('notAnEnum')", sel, false), edm::Exception);
*/ //DEBUG ENDING

// check hits (for re-implemented virtual functions and exception handling)
CPPUNIT_ASSERT(hitOk.hasPositionAndError());
Expand Down