Skip to content

Commit

Permalink
Merge branch 'release/v3_11_00'
Browse files Browse the repository at this point in the history
  • Loading branch information
knoepfel committed Mar 8, 2022
2 parents c876211 + 1d1c68f commit c186cc5
Show file tree
Hide file tree
Showing 199 changed files with 4,858 additions and 5,151 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

find_package(cetmodules 2.13.00 REQUIRED)
project(art VERSION 3.10.00 LANGUAGES CXX C)
project(art VERSION 3.11.00 LANGUAGES CXX C)

include(CetCMakeEnv)
cet_cmake_env()
Expand Down
124 changes: 124 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"configurePresets" : [
{
"cacheVariables" : {
"CMAKE_BUILD_TYPE" : {
"type" : "STRING",
"value" : "RelWithDebInfo"
},
"CMAKE_CXX_COMPILER" : {
"type" : "STRING",
"value" : "clang++"
},
"CMAKE_CXX_EXTENSIONS" : {
"type" : "BOOL",
"value" : "OFF"
},
"CMAKE_CXX_STANDARD" : {
"type" : "STRING",
"value" : "17"
},
"CMAKE_CXX_STANDARD_REQUIRED" : {
"type" : "BOOL",
"value" : "ON"
},
"CMAKE_C_COMPILER" : {
"type" : "STRING",
"value" : "clang"
},
"CMAKE_Fortran_COMPILER" : {
"type" : "STRING",
"value" : "gfortran"
},
"art_ADD_NOARCH_DIRS_INIT" : {
"type" : "INTERNAL",
"value" : "PERLLIB_DIR"
},
"art_FHICL_DIR_INIT" : {
"type" : "STRING",
"value" : ""
}
},
"description" : "Configuration settings translated from ups/product_deps",
"displayName" : "Configuration from product_deps",
"hidden" : true,
"name" : "from_product_deps"
},
{
"cacheVariables" : {
"UPS_CXX_COMPILER_ID" : {
"type" : "STRING",
"value" : "Clang"
},
"UPS_CXX_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "7.0.0"
},
"UPS_C_COMPILER_ID" : {
"type" : "STRING",
"value" : "Clang"
},
"UPS_C_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "7.0.0"
},
"UPS_Fortran_COMPILER_ID" : {
"type" : "STRING",
"value" : "GNU"
},
"UPS_Fortran_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "8.2.0"
},
"WANT_UPS" : {
"type" : "BOOL",
"value" : true
},
"art_EXEC_PREFIX_INIT" : {
"type" : "STRING",
"value" : "$env{CETPKG_FQ_DIR}"
},
"art_UPS_BUILD_ONLY_DEPENDENCIES_INIT" : {
"type" : "STRING",
"value" : "catch;cetmodules;range"
},
"art_UPS_PRODUCT_FLAVOR_INIT" : {
"type" : "STRING",
"value" : "$env{CETPKG_FLAVOR}"
},
"art_UPS_PRODUCT_NAME_INIT" : {
"type" : "STRING",
"value" : "art"
},
"art_UPS_QUALIFIER_STRING_INIT" : {
"type" : "STRING",
"value" : "$env{CETPKG_QUALSPEC}"
},
"art_UPS_USE_TIME_DEPENDENCIES_INIT" : {
"type" : "STRING",
"value" : "canvas"
}
},
"description" : "Extra configuration for UPS package generation",
"displayName" : "UPS extra configuration",
"hidden" : true,
"name" : "extra_for_UPS"
},
{
"description" : "Default configuration including settings from ups/product_deps",
"displayName" : "Default configuration",
"inherits" : "from_product_deps",
"name" : "default"
},
{
"description" : "Default configuration for UPS package generation",
"displayName" : "Default configuration for UPS",
"inherits" : [
"default",
"extra_for_UPS"
],
"name" : "for_UPS"
}
],
"version" : 3
}
2 changes: 1 addition & 1 deletion art/Framework/Art/BasicPostProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace art {
#include "art/Framework/Art/OptionsHandler.h"
#include "cetlib/filepath_maker.h"

class art::BasicPostProcessor : public art::OptionsHandler {
class art::BasicPostProcessor : public OptionsHandler {
private:
// Check selected options for consistency.
int doCheckOptions(bpo::variables_map const& vm) override;
Expand Down
1 change: 1 addition & 0 deletions art/Framework/Art/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cet_make_library(SOURCE
cetlib_except::cetlib_except
Boost::filesystem
TBB::tbb
range-v3::range-v3
)

# Build an art exec.
Expand Down
2 changes: 2 additions & 0 deletions art/Framework/Art/OptionsHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ namespace {
}
} // namespace

art::OptionsHandler::~OptionsHandler() = default;

int
art::OptionsHandler::checkOptions(bpo::variables_map const& vm)
{
Expand Down
2 changes: 1 addition & 1 deletion art/Framework/Art/OptionsHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace art {

class OptionsHandler {
public:
virtual ~OptionsHandler() = default;
virtual ~OptionsHandler();

int checkOptions(bpo::variables_map const& vm);
int processOptions(bpo::variables_map const& vm,
Expand Down
22 changes: 10 additions & 12 deletions art/Framework/Art/art.cc.in
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
// vim: set sw=2 expandtab :
#include "art/Framework/Art/artapp.h"
#include "art/Framework/Art/detail/info_success.h"

#include "messagefacility/MessageLogger/MessageLogger.h"

#include <iostream>
// Initialize ExitCodePrinter as early as possible, before other
// include files, to have its destructor called as late as possible.
#include "art/Framework/Art/detail/ExitCodePrinter.h"
namespace {
art::detail::ExitCodePrinter p;
}

using namespace std;
#include "art/Framework/Art/artapp.h"
#include "messagefacility/MessageLogger/MessageLogger.h"

int
main(int argc, char* argv[])
{
int result = artapp(argc, argv);
p = artapp(argc, argv);
mf::EndMessageFacility();
if (result == art::detail::info_success()) {
return 0;
}
cout << "Art has completed and will exit with status " << result << "." << endl;
return result;
return p.exitcode();
}

// Local Variables:
Expand Down
2 changes: 1 addition & 1 deletion art/Framework/Art/artapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

int artapp(int argc, char* argv[], bool report_unused = true);

#endif /* art_Framework_Art_@ART_MAIN_FUNC@_h */
#endif /* art_Framework_Art_artapp_h */

// Local Variables:
// mode: c++
Expand Down
40 changes: 40 additions & 0 deletions art/Framework/Art/detail/ExitCodePrinter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifndef art_Framework_Art_detail_ExitCodePrinter_h
#define art_Framework_Art_detail_ExitCodePrinter_h

#include "art/Framework/Art/detail/info_success.h"
#include <iostream>

namespace art::detail {
class ExitCodePrinter {
public:
ExitCodePrinter&
operator=(int exitcode) noexcept
{
code_ = exitcode;
return *this;
}

~ExitCodePrinter() noexcept
{
if (code_ != info_success()) {
std::cout << "Art has completed and will exit with status " << code_
<< "." << std::endl;
}
}

int
exitcode() const noexcept
{
return code_ == info_success() ? 0 : code_;
}

private:
int code_{};
};
}

#endif /* art_Framework_Art_detail_ExitCodePrinter_h */

// Local Variables:
// mode: c++
// End:
5 changes: 2 additions & 3 deletions art/Framework/Art/detail/get_LibraryInfoCollection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@ namespace {
std::size_t i{};
for (auto const& lib : libs) {
auto const& libspecs = lm.getSpecsByPath(lib);
std::string const& shortspec = libspecs.first;
std::string const& fullspec = libspecs.second;
auto const& [shortspec, fullspec] = libspecs;

result.emplace(lib,
std::make_pair(shortspec, fullspec),
libspecs,
getFilePath(lm, shortspec), // full specs may be empty
getAllowedConfiguration(
lm, shortspec, shortspec), // for user-defined servicxes
Expand Down
11 changes: 6 additions & 5 deletions art/Framework/Art/detail/print_config_summary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "art/Persistency/Provenance/PathSpec.h"
#include "cetlib/HorizontalRule.h"
#include "fhiclcpp/ParameterSet.h"
#include "range/v3/view.hpp"

#include <iomanip>
#include <iostream>
Expand Down Expand Up @@ -54,8 +55,8 @@ art::detail::print_path_names(EnabledModules const& enabled_modules)
std::string column_2{"Path size"};

auto column_1_width = size(column_1);
for (auto const& pr : trigger_paths) {
column_1_width = std::max(column_1_width, size(pr.first.name));
for (auto const& spec : trigger_paths | ranges::views::keys) {
column_1_width = std::max(column_1_width, size(spec.name));
}

std::cout << column_0 << " " << std::left << std::setw(column_1_width)
Expand Down Expand Up @@ -88,8 +89,8 @@ art::detail::print_path_names(EnabledModules const& enabled_modules)
std::string column_1{"Path name"};
std::string column_2{"Path size"};
auto column_1_width = size(column_1);
for (auto const& pr : end_paths) {
column_1_width = std::max(column_1_width, size(pr.first.name));
for (auto const& spec : end_paths | ranges::views::keys) {
column_1_width = std::max(column_1_width, size(spec.name));
}

std::cout << std::left << std::setw(column_1_width) << column_1 << " "
Expand Down Expand Up @@ -222,7 +223,7 @@ art::detail::print_config_summary(fhicl::ParameterSet const& pset,
print_path_names(enabled_modules);
return;
}
throw art::Exception{art::errors::Configuration}
throw Exception{errors::Configuration}
<< "Unrecognized configuration-summary verbosity level: '" << verbosity
<< "'\n";
}
Loading

0 comments on commit c186cc5

Please sign in to comment.