diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d67602baf..bbfa5d22b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,13 +150,10 @@ set(CMAKE_INSTALL_RPATH set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # Check and print what JANA2 is used -find_package(JANA 2.0.8 REQUIRED) +find_package(JANA REQUIRED) message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 CMake : ${JANA_DIR}") message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 includes: ${JANA_INCLUDE_DIR}") message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 library : ${JANA_LIBRARY}") -add_compile_definitions(HAVE_PODIO) -# TODO: NWB: Do this correctly in JANA via target_compile_definitions for v2.1.1 -# TODO: NWB: Maybe we want these to be prefixed, e.g. JANA2_HAVE_PODIO # Algorithms find_package(algorithms 1.0.0 REQUIRED Core) diff --git a/src/extensions/jana/JOmniFactory.h b/src/extensions/jana/JOmniFactory.h index ca018494da..873070d21b 100644 --- a/src/extensions/jana/JOmniFactory.h +++ b/src/extensions/jana/JOmniFactory.h @@ -473,7 +473,6 @@ class JOmniFactory : public JMultifactory { std::vector default_input_collection_names, std::vector default_output_collection_names ) { - // TODO: NWB: JMultiFactory::GetTag,SetTag are not currently usable m_prefix = (this->GetPluginName().empty()) ? tag : this->GetPluginName() + ":" + tag; // Obtain collection name overrides if provided. diff --git a/src/extensions/jana/JOmniFactoryGeneratorT.h b/src/extensions/jana/JOmniFactoryGeneratorT.h index 14ed7080b9..ff0ad25fe7 100644 --- a/src/extensions/jana/JOmniFactoryGeneratorT.h +++ b/src/extensions/jana/JOmniFactoryGeneratorT.h @@ -98,9 +98,6 @@ class JOmniFactoryGeneratorT : public JFactoryGenerator { factory->SetApplication(m_app); factory->SetPluginName(this->GetPluginName()); factory->SetFactoryName(JTypeInfo::demangle()); - // factory->SetTag(wiring.m_tag); - // We do NOT want to do this because JMF will use the tag to suffix the collection names - // TODO: NWB: Change this in JANA factory->config() = wiring.m_default_cfg; // Set up all of the wiring prereqs so that Init() can do its thing diff --git a/src/tests/omnifactory_test/JOmniFactoryTests.cc b/src/tests/omnifactory_test/JOmniFactoryTests.cc index 40680174d1..b9ca6b6b4e 100644 --- a/src/tests/omnifactory_test/JOmniFactoryTests.cc +++ b/src/tests/omnifactory_test/JOmniFactoryTests.cc @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,6 @@ struct BasicTestAlg : public JOmniFactory { m_process_call_count++; logger()->info("Calling BasicTestAlg::Process with bucket_count={}, threshold={}", config().bucket_count, config().threshold); // Provide empty collections (as opposed to nulls) so that PODIO doesn't crash - // TODO: NWB: I though multifactories already took care of this under the hood somewhere output_hits_left() = std::make_unique(); output_hits_right() = std::make_unique(); output_vechits().push_back(new edm4hep::SimCalorimeterHit()); @@ -64,7 +64,7 @@ struct BasicTestAlg : public JOmniFactory { template MultifactoryT* RetrieveMultifactory(JFactorySet* facset, std::string output_collection_name) { - auto fac = facset->GetFactory(output_collection_name); + auto fac = facset->GetFactory(JTypeInfo::demangle(), output_collection_name); REQUIRE(fac != nullptr); auto helper = dynamic_cast*>(fac); REQUIRE(helper != nullptr); @@ -180,10 +180,11 @@ TEST_CASE("JParameterManager correctly understands which values are defaulted an REQUIRE(b->config().threshold == 12.0); std::cout << "Showing the full table of config parameters" << std::endl; - app.GetJParameterManager()->PrintParameters(true, false, true); + app.GetJParameterManager()->PrintParameters(2, 1); // verbosity, strictness std::cout << "Showing only overridden config parameters" << std::endl; - app.GetJParameterManager()->PrintParameters(false, false, true); + app.GetJParameterManager()->PrintParameters(1, 1); // verbosity, strictness + } TEST_CASE("Wiring itself is correctly defaulted") { @@ -220,11 +221,11 @@ TEST_CASE("Wiring itself is correctly defaulted") { b->logger()->info("Showing the full table of config parameters"); - app.GetJParameterManager()->PrintParameters(true, false, true); + app.GetJParameterManager()->PrintParameters(2,1); // verbosity, strictness b->logger()->info("Showing only overridden config parameters"); // Should be empty because everything is defaulted - app.GetJParameterManager()->PrintParameters(false, false, true); + app.GetJParameterManager()->PrintParameters(1,1); // verbosity, strictness } struct VariadicTestAlg : public JOmniFactory {