Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
art::detail Namespace Reference

Namespaces

 FDS
 
 FTS
 

Classes

struct  AggregateTuple
 
struct  AggregateTuple< 0u >
 
class  Analyzer
 
struct  are_cv_compatible
 
struct  are_handles
 
class  AssnsBase
 
class  BcollHelper
 
struct  CanBeAggregated
 
struct  CanBeAggregated< cet::map_vector< T > >
 
struct  CanBeAggregated< CLHEP::Hep2Vector >
 
struct  CanBeAggregated< CLHEP::Hep3Vector >
 
struct  CanBeAggregated< CLHEP::HepLorentzVector >
 
struct  CanBeAggregated< CLHEP::HepMatrix >
 
struct  CanBeAggregated< CLHEP::HepSymMatrix >
 
struct  CanBeAggregated< CLHEP::HepVector >
 
struct  CanBeAggregated< std::array< T, N > >
 
struct  CanBeAggregated< std::deque< T > >
 
struct  CanBeAggregated< std::list< T > >
 
struct  CanBeAggregated< std::map< K, V > >
 
struct  CanBeAggregated< std::multimap< K, V > >
 
struct  CanBeAggregated< std::pair< K, V > >
 
struct  CanBeAggregated< std::set< T > >
 
struct  CanBeAggregated< std::string >
 
struct  CanBeAggregated< std::tuple< Args... > >
 
struct  CanBeAggregated< std::vector< T > >
 
struct  CanBeAggregated< T, std::enable_if_t< has_aggregate< T >::value > >
 
struct  CanBeAggregated< T, std::enable_if_t< std::is_arithmetic< T >::value > >
 
struct  CanBeAggregated< T, std::enable_if_t< std::is_base_of< TH1, T >::value > >
 
class  collected_exception
 
struct  config_impl
 
struct  config_impl< T, std::void_t< typename T::Parameters > >
 
class  DataCollHelper
 
struct  default_invocation
 
struct  default_invocation< R(ARGS...)>
 
struct  do_call_hasMoreData
 
struct  do_not_call_hasMoreData
 
class  EnabledModules
 
class  EngineCreator
 
struct  EnsurePointer
 
struct  EnsurePointer< TO, PFROM * >
 
struct  EnsurePointer< TO, Ptr< PTRVAL > >
 
class  ExceptionCollector
 
class  FileNameComponents
 
class  FileNamesHandler
 
class  FileNamesHandler< false >
 
class  FileNamesHandler< true >
 
class  FileServiceProxy
 
class  Filter
 
struct  get_helper
 
struct  GetProduct
 
struct  handle_allowed
 
struct  handle_allowed< T, std::enable_if_t<!T::service_handle_allowed > >
 
struct  has_aggregate
 
struct  has_aggregate< T, enable_if_function_exists_t< void(T::*)(T const &),&T::aggregate > >
 
struct  has_aggregate< T, enable_if_function_exists_t< void(T::*)(T),&T::aggregate > >
 
struct  has_beginRun
 
struct  has_beginRun< T, enable_if_function_exists_t< void(T::*)(Run const &),&T::beginRun > >
 
struct  has_beginSubRun
 
struct  has_beginSubRun< T, enable_if_function_exists_t< void(T::*)(SubRun const &),&T::beginSubRun > >
 
struct  has_endRun
 
struct  has_endRun< T, enable_if_function_exists_t< void(T::*)(Run &),&T::endRun > >
 
struct  has_endSubRun
 
struct  has_endSubRun< T, enable_if_function_exists_t< void(T::*)(SubRun &),&T::endSubRun > >
 
struct  has_eventsToSkip
 
struct  has_eventsToSkip< T, enable_if_function_exists_t< size_t(T::*)() const,&T::eventsToSkip > >
 
struct  has_eventsToSkip< T, enable_if_function_exists_t< size_t(T::*)(),&T::eventsToSkip > >
 
struct  has_finalizeEvent
 
struct  has_finalizeEvent< T, enable_if_function_exists_t< void(T::*)(Event &),&T::finalizeEvent > >
 
struct  has_hasMoreData
 
struct  has_hasMoreData< T, cet::enable_if_function_exists_t< bool(T::*)() const,&T::hasMoreData > >
 
struct  has_hasMoreData< T, cet::enable_if_function_exists_t< bool(T::*)(),&T::hasMoreData > >
 
struct  has_makePartner_member
 
struct  has_makePartner_member< T, enable_if_function_exists_t< std::unique_ptr< EDProduct >(T::*)( std::type_info const &) const, &T::makePartner > >
 
struct  has_processEventAuxiliaries
 
struct  has_processEventAuxiliaries< T, enable_if_function_exists_t< void(T::*)(EventAuxiliarySequence const &), &T::processEventAuxiliaries > >
 
struct  has_processEventIDs
 
struct  has_processEventIDs< T, enable_if_function_exists_t< void(T::*)(EventIDSequence const &), &T::processEventIDs > >
 
struct  has_respondToCloseInputFile
 
struct  has_respondToCloseInputFile< T, enable_if_function_exists_t< respond_to_file< T >, &T::respondToCloseInputFile > >
 
struct  has_respondToCloseOutputFiles
 
struct  has_respondToCloseOutputFiles< T, enable_if_function_exists_t< respond_to_file< T >, &T::respondToCloseOutputFiles > >
 
struct  has_respondToOpenInputFile
 
struct  has_respondToOpenInputFile< T, enable_if_function_exists_t< respond_to_file< T >, &T::respondToOpenInputFile > >
 
struct  has_respondToOpenOutputFiles
 
struct  has_respondToOpenOutputFiles< T, enable_if_function_exists_t< respond_to_file< T >, &T::respondToOpenOutputFiles > >
 
struct  has_size_member
 
struct  has_size_member< T, std::void_t< size_expression_t< T > > >
 
struct  has_startEvent
 
struct  has_startEvent< T, enable_if_function_exists_t< void(T::*)(Event const &),&T::startEvent > >
 
struct  has_three_arg_insert
 
struct  has_two_arg_insert
 
class  IPRHelper
 
class  IPRHelperDef
 
struct  is_handle
 
struct  is_handle< T, std::void_t< typename T::HandleTag > >
 
class  ItemGetter
 
class  ItemGetter< std::pair< cet::map_vector_key, T >, cet::map_vector< T > >
 
class  ItemGetter< T, cet::map_vector< T > >
 
class  LegacyModule
 
class  LibraryInfo
 
class  LibraryInfoMatch
 
class  LinuxMallInfo
 
struct  maybe_beginJob
 
struct  maybe_beginJob< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(),&DETAIL::beginJob > >
 
struct  maybe_endJob
 
struct  maybe_endJob< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(),&DETAIL::endJob > >
 
struct  maybe_has_Parameters
 
struct  maybe_has_Parameters< T, std::void_t< typename T::Parameters > >
 
struct  maybe_postProcessEvent
 
struct  maybe_postProcessEvent< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(), &DETAIL::postProcessEvent > >
 
struct  maybe_postProcessRun
 
struct  maybe_postProcessRun< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(), &DETAIL::postProcessRun > >
 
struct  maybe_postProcessSubRun
 
struct  maybe_postProcessSubRun< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(), &DETAIL::postProcessSubRun > >
 
struct  maybe_preProcessEvent
 
struct  maybe_preProcessEvent< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(), &DETAIL::preProcessEvent > >
 
struct  maybe_preProcessRun
 
struct  maybe_preProcessRun< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(),&DETAIL::preProcessRun > >
 
struct  maybe_preProcessSubRun
 
struct  maybe_preProcessSubRun< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(), &DETAIL::preProcessSubRun > >
 
struct  maybe_processEventPrincipal
 
struct  maybe_processEventPrincipal< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(Provenance const &), &DETAIL::processEventProvenance > >
 
struct  maybe_processRunPrincipal
 
struct  maybe_processRunPrincipal< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(Provenance const &), &DETAIL::processRunProvenance > >
 
struct  maybe_processSubRunPrincipal
 
struct  maybe_processSubRunPrincipal< DETAIL, enable_if_function_exists_t< void(DETAIL::*)(Provenance const &), &DETAIL::processSubRunProvenance > >
 
class  MessageAccumulator
 
class  MetadataCollector
 
class  MetadataCollectorFor
 
class  MetadataCollectorFor< suffix_type::mfPlugin >
 
class  MetadataCollectorFor< suffix_type::mfStatsPlugin >
 
class  MetadataCollectorFor< suffix_type::module >
 
class  MetadataCollectorFor< suffix_type::plugin >
 
class  MetadataCollectorFor< suffix_type::service >
 
class  MetadataCollectorFor< suffix_type::source >
 
class  MetadataCollectorFor< suffix_type::tool >
 
class  MetadataSummary
 
class  MetadataSummaryFor
 
class  MetadataSummaryFor< suffix_type::mfPlugin >
 
class  MetadataSummaryFor< suffix_type::mfStatsPlugin >
 
class  MetadataSummaryFor< suffix_type::module >
 
class  MetadataSummaryFor< suffix_type::plugin >
 
class  MetadataSummaryFor< suffix_type::service >
 
class  MetadataSummaryFor< suffix_type::source >
 
class  MetadataSummaryFor< suffix_type::tool >
 
struct  mix_offset
 
struct  mix_offset< cet::map_vector< P > >
 
struct  ModuleConfig
 
struct  ModuleConfigInfo
 
struct  ModuleGraphInfo
 
class  ModuleGraphInfoMap
 
struct  ModuleKeyAndType
 
struct  ModuleSpec
 
struct  ModuleThreadingTypeDeducer
 
struct  ModuleThreadingTypeDeducer< EDAnalyzer >
 
struct  ModuleThreadingTypeDeducer< EDFilter >
 
struct  ModuleThreadingTypeDeducer< EDProducer >
 
struct  ModuleThreadingTypeDeducer< OutputModule >
 
struct  ModuleThreadingTypeDeducer< ReplicatedAnalyzer >
 
struct  ModuleThreadingTypeDeducer< ReplicatedFilter >
 
struct  ModuleThreadingTypeDeducer< ReplicatedOutputModule >
 
struct  ModuleThreadingTypeDeducer< ReplicatedProducer >
 
struct  ModuleThreadingTypeDeducer< SharedAnalyzer >
 
struct  ModuleThreadingTypeDeducer< SharedFilter >
 
struct  ModuleThreadingTypeDeducer< SharedOutputModule >
 
struct  ModuleThreadingTypeDeducer< SharedProducer >
 
struct  ModuleTypeDeducer
 
struct  ModuleTypeDeducer< EDAnalyzer >
 
struct  ModuleTypeDeducer< EDFilter >
 
struct  ModuleTypeDeducer< EDProducer >
 
struct  ModuleTypeDeducer< OutputModule >
 
struct  ModuleTypeDeducer< ReplicatedAnalyzer >
 
struct  ModuleTypeDeducer< ReplicatedFilter >
 
struct  ModuleTypeDeducer< ReplicatedOutputModule >
 
struct  ModuleTypeDeducer< ReplicatedProducer >
 
struct  ModuleTypeDeducer< SharedAnalyzer >
 
struct  ModuleTypeDeducer< SharedFilter >
 
struct  ModuleTypeDeducer< SharedOutputModule >
 
struct  ModuleTypeDeducer< SharedProducer >
 
struct  OldToNew
 
struct  PluginConfig
 
class  PluginMetadata
 
class  PrincipalProcessor
 
class  ProcessAndEventSelector
 
class  ProcessAndEventSelectors
 
class  Producer
 
struct  ProductInfo
 
struct  ProductTypeIDs
 
struct  ProductTypeIDs< Assns< L, R, D > >
 
struct  ProductTypeIDs< Assns< L, R, void > >
 
class  ProvenanceDumperImpl
 
struct  respondToXXX_function
 
struct  safe_input_tag
 
struct  SafeFileNameConfig
 
class  ServiceCacheEntry
 
struct  ServiceHelper
 
struct  ServiceHelper< MyOtherService >
 
struct  ServiceHelper< MyService >
 
struct  ServiceHelper< YetAnotherService >
 
struct  ServiceHelperBase
 
struct  ServiceImplHelper
 
struct  ServiceInterfaceHelper
 
struct  ServiceInterfaceImplHelper
 
struct  ServiceLGMHelper
 
struct  ServiceLGRHelper
 
class  ServiceWrapper
 
class  ServiceWrapperBase
 
class  SharedModule
 
struct  SharedResource_t
 
class  SharedResources
 
struct  Summary
 
struct  three_arg_insert_func
 
struct  tool_type
 
struct  tool_type< T, std::enable_if_t< std::is_class< T >::value > >
 
struct  tool_type< T, std::enable_if_t< std::is_function< T >::value > >
 
struct  ToolConfig
 
struct  tuple_element
 
struct  tuple_element< 0, AssnsNode< L, R, D > >
 
struct  tuple_element< 1, AssnsNode< L, R, D > >
 
struct  tuple_element< 2, AssnsNode< L, R, D > >
 
struct  two_arg_insert_func
 
struct  TwoArgInsert
 
struct  TwoArgInsert< cet::map_vector< T > >
 
class  value_type_helper
 

Typedefs

using LibraryInfoCollection = std::multiset< LibraryInfo >
 
using Widths = std::vector< std::size_t >
 
using config_const_iterator = std::vector< WorkerInPath::ConfigInfo >::const_iterator
 
using path_name_t = std::string
 
using module_name_t = std::string
 
using names_t = std::vector< std::string >
 
using configs_t = std::vector< WorkerInPath::ConfigInfo >
 
using name_set_t = std::set< std::string >
 
using paths_to_modules_t = std::vector< std::pair< PathSpec, configs_t >>
 
using collection_map_t = std::map< module_name_t, ModuleGraphInfo >
 
using collection_t = std::vector< collection_map_t::value_type >
 
using distance_t = collection_t::difference_type
 
using vertex_property = boost::property< boost::vertex_name_t, std::string >
 
using edge_property = boost::property< boost::edge_index_t, int, boost::property< boost::edge_name_t, std::string >>
 
using graph_property = boost::property< boost::graph_name_t, std::string >
 
using Graph = boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, vertex_property, edge_property, graph_property >
 
using ModuleGraph = boost::subgraph< Graph >
 
using Edge = boost::graph_traits< ModuleGraph >::edge_descriptor
 
using Vertex = boost::graph_traits< ModuleGraph >::vertex_descriptor
 
using keytype_for_name_t = std::map< std::string, ModuleKeyAndType >
 
using module_entries_for_ordered_path_t = std::vector< std::pair< PathSpec, std::vector< ModuleSpec >>>
 
using module_entries_for_path_t = std::map< std::string, std::vector< ModuleSpec >>
 
using modules_for_path_t = std::map< std::string, std::vector< ModuleKeyAndType >>
 
using ModuleMaker_t = ModuleBase *(fhicl::ParameterSet const &, ProcessingFrame const &)
 
using WorkerFromModuleMaker_t = Worker *(std::shared_ptr< ModuleBase >, ModuleDescription const &, WorkerParams const &)
 
using WorkerMaker_t = Worker *(WorkerParams const &, ModuleDescription const &)
 
using ModuleTypeFunc_t) = ModuleType(
 
using ModuleThreadingTypeFunc_t) = ModuleThreadingType(
 
template<typename T >
using Config = typename config_impl< T >::type
 
template<typename T >
using respond_to_file = void(T::*)(FileBlock const &)
 
using ServiceCache = std::map< TypeID, ServiceCacheEntry >
 
typedef std::stack< WrapperBase_ptrServiceStack
 
using WrapperBase_ptr = std::shared_ptr< ServiceWrapperBase >
 
using new_t = std::string
 
using old_t = std::string
 
using entry_selector_t = std::function< bool(PathSpec const &)>
 
template<typename T >
using size_expression_t = decltype(std::declval< T const >().size())
 

Enumerations

enum  FilterAction { FilterAction::Normal = 0, FilterAction::Ignore = 1, FilterAction::Veto = 2 }
 
enum  SignalResponseType { SignalResponseType::FIFO, SignalResponseType::LIFO }
 

Functions

void print_available_plugins (std::string const &suffix, std::string const &spec, bool verbose)
 
void print_available_plugins (std::string const &suffix, bool const verbose)
 
bool supports_key (std::string const &suffix, std::string const &spec, std::string const &key)
 
void print_description (std::vector< PluginMetadata > const &matches)
 
void print_descriptions (std::vector< std::string > const &plugins)
 
std::tuple< RunNumber_t, SubRunNumber_t, EventNumber_tevent_start (std::string const &str_num)
 
bool exists_outside_prolog (fhicl::intermediate_table const &config, std::string const &key)
 
template<typename T >
std::enable_if_t< std::is_convertible_v< T, std::string >, std::stringfhicl_key (T const &name)
 
template<typename H , typename... T>
std::enable_if_t< std::is_convertible_v< H, std::string >, std::stringfhicl_key (H const &hname, T const &...tnames)
 
void fillSourceList (std::istream &ifs, std::vector< std::string > &source_list)
 
constexpr char const * dflt_spec_pattern ()
 
LibraryInfoCollection get_LibraryInfoCollection (std::string const &suffix, std::string const &pattern, bool verbose=false)
 
std::unique_ptr< MetadataCollectorget_MetadataCollector (std::string const &suffix)
 
std::unique_ptr< MetadataSummaryget_MetadataSummary (std::string const &suffix, LibraryInfoCollection const &coll)
 
constexpr int info_success ()
 
std::string describe (cet::exempt_ptr< fhicl::ConfigurationTable const > pb, std::string const &prefix)
 
std::string print_header (LibraryInfo const &li, std::string const &type_spec)
 
std::string print_allowed_configuration (LibraryInfo const &li, std::string const &prefix, std::string const &type_spec)
 
std::regex regex_for_spec (std::string const &)
 
void replace_type (std::string &str, std::string const &spec, std::regex const &r)
 
bool output_to_stderr (std::string const &spec)
 
bool output_to_stdout (std::string const &spec)
 
std::string getFilePath (cet::LibraryManager const &lm, std::string const &fullspec)
 
std::string getType (cet::LibraryManager const &lm, std::string const &fullSpec)
 
std::unique_ptr< fhicl::ConfigurationTablegetAllowedConfiguration (cet::LibraryManager const &lm, std::string const &fullSpec, std::string const &name)
 
void print_config_summary (fhicl::ParameterSet const &pset, std::string const &verbosity, EnabledModules const &enabled_modules)
 
void print_table_numbers (fhicl::ParameterSet const &pset, std::string const &header)
 
void print_path_numbers (EnabledModules const &enabled_modules)
 
void print_path_names (EnabledModules const &enabled_modules)
 
void print_service_types (fhicl::ParameterSet const &pset)
 
void print_module_types (fhicl::ParameterSet const &pset, std::string const &header)
 
std::string indent (std::size_t const i)
 
std::string indent0 ()
 
std::string indent_1 ()
 
std::string indent__2 ()
 
template<typename T , typename Elem >
std::size_t columnWidth (T const &coll, std::string const Elem::*cp, std::string const &header)
 
std::size_t columnWidth (LibraryInfoCollection const &coll, std::string const &(LibraryInfo::*fp)() const, std::string const &header)
 
std::size_t rule_size (Widths const &widths)
 
std::vector< ModuleSpecsequence_to_entries (sequence_t const &seq, bool const allow_nil_entries)
 
std::vector< art::PathSpecpath_specs (std::vector< ModuleSpec > const &selection_override_entries, std::string const &path_selection_override)
 
EnabledModules prune_config_if_enabled (bool prune_config, bool report_enabled, fhicl::intermediate_table &config)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, Analyzer::Table< T > const &t)
 
std::set< ProductInfoconsumed_products_for_module (std::string const &current_process, ConsumesInfo::consumables_t::mapped_type const &consumables, std::map< std::string, std::set< ProductInfo >> const &produced_products, std::map< std::string, std::set< std::string >> const &viewable_products, config_const_iterator const config_begin, config_const_iterator const config_it)
 
std::pair< ModuleGraph, std::stringmake_module_graph (ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, configs_t const &end_path)
 
void make_trigger_path_subgraphs (ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, ModuleGraph &graph)
 
void make_product_dependency_edges (ModuleGraphInfoMap const &modInfos, ModuleGraph &graph)
 
void make_path_ordering_edges (ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &paths, ModuleGraph &graph)
 
void make_synchronization_edges (ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, configs_t const &end_path, ModuleGraph &graph)
 
std::string verify_no_interpath_dependencies (ModuleGraphInfoMap const &modInfos, ModuleGraph const &graph)
 
std::string verify_in_order_dependencies (ModuleGraphInfoMap const &modules, paths_to_modules_t const &trigger_paths)
 
void print_module_graph (std::ostream &os, ModuleGraphInfoMap const &modInfos, ModuleGraph const &graph)
 
void issue_reports (unsigned count, EventID const &id)
 
std::ostream & operator<< (std::ostream &os, ModuleGraphInfo const &info)
 
ModuleType module_type (std::string const &full_key)
 
bool operator== (ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
 
bool operator!= (ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
 
bool skip_non_replicated (Worker const &)
 
void verifyInstanceName (std::string const &in)
 
void verifyFriendlyClassName (std::string const &fcn)
 
template<typename T , typename Config >
T * make_module (Config const &config, ProcessingFrame const &frame)
 
void memoryReport ()
 
void writeSummary (PathManager &pm, bool wantSummary, cet::cpu_timer const &timer)
 
void triggerReport (PerScheduleContainer< PathsInfo > const &endPathInfo, PerScheduleContainer< PathsInfo > const &triggerPathsInfo, bool wantSummary)
 
void timeReport (cet::cpu_timer const &timer)
 
FileNameComponents componentsFromPattern (std::string const &pattern)
 
void logFileAction (const char *msg, std::string const &file)
 
void validateFileNamePattern (bool do_check, std::string const &pattern)
 
TypeLabel type_label_for (TypeID const typeID, std::string const &instance, bool const supportsView, ModuleDescription const &md)
 
template<typename... T>
void throw_if_invalid (std::string const &msg, T const &...t)
 
constexpr bool range_sets_supported (BranchType const bt)
 
std::ostream & operator<< (std::ostream &os, LinuxMallInfo const &info)
 
void ensure_only_one_thread (fhicl::ParameterSet const &service_pset)
 
template<typename T , typename ResultType , typename... Args>
std::function< ResultType(Args...)> makeWatchFunc (ResultType(T::*slot)(Args...), T &t)
 
template<typename T , typename ResultType , typename... Args>
std::function< ResultType(Args...)> makeWatchFunc (ResultType(T::*slot)(Args...) const, T const &t)
 
template<typename T >
std::enable_if_t< std::is_constructible_v< T, fhicl::ParameterSet const &, ActivityRegistry & >, std::shared_ptr< T > > makeServiceFrom (fhicl::ParameterSet const &ps, ActivityRegistry &areg)
 
template<typename T >
std::enable_if_t<!std::is_constructible_v< T, fhicl::ParameterSet const &, ActivityRegistry & >, std::shared_ptr< T > > makeServiceFrom (fhicl::ParameterSet const &ps, ActivityRegistry &)
 
template<SignalResponseType STYPE, typename SIGNAL , typename FUNC >
std::enable_if_t< STYPE==SignalResponseType::FIFOconnect_to_signal (SIGNAL &s, FUNC f)
 
template<SignalResponseType STYPE, typename SIGNAL , typename FUNC >
std::enable_if_t< STYPE==SignalResponseType::LIFOconnect_to_signal (SIGNAL &s, FUNC f)
 
std::map< old_t, new_toldToNewName ()
 
template<typename T , typename I >
no_tag has_two_arg_insert_helper (...)
 
template<typename T , typename I >
yes_tag has_two_arg_insert_helper (two_arg_insert_func< T, I,&T::insert > *dummy)
 
template<typename T , typename R , typename O , typename I >
no_tag has_three_arg_insert_helper (...)
 
template<typename T , typename R , typename O , typename I >
yes_tag has_three_arg_insert_helper (three_arg_insert_func< T, R, O, I,&T::insert > *dummy)
 
template<typename T >
bool verifyPtrCollection (std::vector< art::PtrVector< T > const * > const &in)
 
template<typename iterator >
bool verifyPtrCollection (iterator beg, iterator end, art::ProductID id={}, art::EDProductGetter const *getter=nullptr)
 
BranchKey splitToComponents (std::string const &branchName, std::string &errMsg)
 
bool checkBranchNameSelector (std::string const &branchNameSelector, std::string &errMsg)
 
bool checkBranchNameSelector (BranchKey const &components, std::string &errMsg)
 
bool checkFriendlyName (std::string const &friendlyName, std::string &errMsg)
 
bool checkFriendlyNameSelector (std::string const &friendlyNameSelector, std::string &errMsg)
 
bool checkModuleLabel (std::string const &moduleLabel, std::string &errMsg)
 
bool checkModuleLabelSelector (std::string const &moduleLabelSelector, std::string &errMsg)
 
bool checkInstanceName (std::string const &instanceName, std::string &errMsg)
 
bool checkInstanceNameSelector (std::string const &instanceNameSelector, std::string &errMsg)
 
bool checkProcessName (std::string const &processName, std::string &errMsg)
 
bool checkProcessNameSelector (std::string const &processNameSelector, std::string &errMsg)
 
std::vector< std::vector< std::string > > orderedProcessNamesCollection (ProcessHistoryMap const &pHistMap)
 
void remove_whitespace (std::string &str)
 
bool has_whitespace (std::string const &str)
 
template<typename ProdA , typename ProdB , typename Data , typename Tag >
InputTag input_tag (Tag const &tag)
 
bool upcastAllowed (std::type_info const &tiFrom, std::type_info const &tiTo)
 
void const * maybeCastObj (void const *address, std::type_info const &tiFrom, std::type_info const &tiTo)
 
template<typename element_type >
void const * maybeCastObj (element_type const *address, std::type_info const &tiTo)
 
template<typename T >
auto wrapperTypeID ()
 
void throwPartnerException (std::type_info const &generator, std::type_info const &wanted_wrapper_type)
 
ProductLookup_t createProductLookups (ProductDescriptionsByID const &descriptions)
 
ViewLookup_t createViewLookups (ProductDescriptionsByID const &descriptions)
 
std::string const & InvalidHash ()
 
EventRange full_run_event_range ()
 
template<typename TO , typename FROM >
constexpr std::enable_if_t< are_cv_compatible< TO, FROM >::value, std::add_pointer_t< std::remove_pointer_t< TO > > > addr (FROM &from)
 
template<typename TO , typename FROM >
constexpr std::enable_if_t<!are_cv_compatible< TO, FROM >::value &&are_cv_compatible< FROM, TO >::value, std::add_pointer_t< std::remove_pointer_t< TO > > > addr (FROM &from)
 

Variables

template<typename T >
bool constexpr handle_allowed_v {handle_allowed<T>::value}
 
SharedResource_t const LegacyResource {"__legacy__", false}
 

Typedef Documentation

Definition at line 20 of file graph_type_aliases.h.

using art::detail::collection_t = typedef std::vector<collection_map_t::value_type>

Definition at line 21 of file graph_type_aliases.h.

template<typename T >
using art::detail::Config = typedef typename config_impl<T>::type

Definition at line 52 of file ModuleMacros.h.

Definition at line 14 of file consumed_products.h.

Definition at line 17 of file graph_type_aliases.h.

using art::detail::distance_t = typedef collection_t::difference_type

Definition at line 22 of file graph_type_aliases.h.

using art::detail::Edge = typedef boost::graph_traits<ModuleGraph>::edge_descriptor

Definition at line 24 of file ModuleGraph.h.

using art::detail::edge_property = typedef boost::property<boost::edge_index_t, int, boost::property<boost::edge_name_t, std::string>>

Definition at line 15 of file ModuleGraph.h.

Definition at line 41 of file TriggerNamesService.h.

using art::detail::Graph = typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, vertex_property, edge_property, graph_property>

Definition at line 22 of file ModuleGraph.h.

using art::detail::graph_property = typedef boost::property<boost::graph_name_t, std::string>

Definition at line 16 of file ModuleGraph.h.

Definition at line 39 of file ModuleKeyAndType.h.

using art::detail::LibraryInfoCollection = typedef std::multiset<LibraryInfo>

Definition at line 10 of file LibraryInfoCollection.h.

Definition at line 41 of file ModuleKeyAndType.h.

Definition at line 43 of file ModuleKeyAndType.h.

Definition at line 15 of file graph_type_aliases.h.

using art::detail::ModuleGraph = typedef boost::subgraph<Graph>

Definition at line 23 of file ModuleGraph.h.

Definition at line 33 of file ModuleMacros.h.

Definition at line 45 of file ModuleKeyAndType.h.

using art::detail::ModuleThreadingTypeFunc_t = typedef ModuleThreadingType(

Definition at line 39 of file ModuleMacros.h.

using art::detail::ModuleTypeFunc_t = typedef ModuleType(

Definition at line 38 of file ModuleMacros.h.

using art::detail::name_set_t = typedef std::set<std::string>

Definition at line 18 of file graph_type_aliases.h.

Definition at line 16 of file graph_type_aliases.h.

Definition at line 10 of file SAMMetadataTranslators.h.

Definition at line 11 of file SAMMetadataTranslators.h.

Definition at line 14 of file graph_type_aliases.h.

Definition at line 19 of file graph_type_aliases.h.

template<typename T >
using art::detail::respond_to_file = typedef void (T::*)(FileBlock const&)

Definition at line 308 of file MixFilter.h.

Definition at line 11 of file ServiceCache.h.

Definition at line 12 of file ServiceStack.h.

template<typename T >
using art::detail::size_expression_t = typedef decltype(std::declval<T const>().size())

Definition at line 42 of file Wrapper.h.

using art::detail::Vertex = typedef boost::graph_traits<ModuleGraph>::vertex_descriptor

Definition at line 25 of file ModuleGraph.h.

using art::detail::vertex_property = typedef boost::property<boost::vertex_name_t, std::string>

Definition at line 11 of file ModuleGraph.h.

using art::detail::Widths = typedef std::vector<std::size_t>

Definition at line 65 of file PrintFormatting.h.

using art::detail::WorkerFromModuleMaker_t = typedef Worker*(std::shared_ptr<ModuleBase>, ModuleDescription const&, WorkerParams const&)

Definition at line 36 of file ModuleMacros.h.

Definition at line 37 of file ModuleMacros.h.

using art::detail::WrapperBase_ptr = typedef std::shared_ptr<ServiceWrapperBase>

Definition at line 29 of file ServiceWrapperBase.h.

Enumeration Type Documentation

Enumerator
Normal 
Ignore 
Veto 

Definition at line 18 of file ModuleKeyAndType.h.

Function Documentation

template<typename TO , typename FROM >
constexpr std::enable_if_t<are_cv_compatible<TO, FROM>::value, std::add_pointer_t<std::remove_pointer_t<TO> > > art::detail::addr ( FROM &  from)

Definition at line 35 of file ensurePointer.h.

36  {
37  return &from;
38  }
template<typename TO , typename FROM >
constexpr std::enable_if_t<!are_cv_compatible<TO, FROM>::value && are_cv_compatible<FROM, TO>::value, std::add_pointer_t<std::remove_pointer_t<TO> > > art::detail::addr ( FROM &  from)

Definition at line 44 of file ensurePointer.h.

45  {
46  return &dynamic_cast<
47  std::add_lvalue_reference_t<std::remove_pointer_t<TO>>>(from);
48  }
bool art::detail::checkBranchNameSelector ( std::string const &  branchNameSelector,
std::string errMsg 
)

Definition at line 61 of file branchNameComponentChecking.cc.

63 {
64  errMsg.clear();
65  auto components = splitToComponents(branchNameSelector, errMsg);
66  return (!errMsg.empty()) || checkBranchNameSelector(components, errMsg);
67 }
bool checkBranchNameSelector(std::string const &branchNameSelector, std::string &errMsg)
BranchKey splitToComponents(std::string const &branchName, std::string &errMsg)
bool art::detail::checkBranchNameSelector ( BranchKey const &  components,
std::string errMsg 
)

Definition at line 70 of file branchNameComponentChecking.cc.

72 {
73  // Inclusive operation: do all steps.
74  bool result =
75  checkFriendlyNameSelector(components.friendlyClassName_, errMsg);
76  result = checkModuleLabelSelector(components.moduleLabel_, errMsg) && result;
77  result = checkInstanceNameSelector(components.productInstanceName_, errMsg) &&
78  result;
79  result = checkProcessNameSelector(components.processName_, errMsg) && result;
80  return result;
81 }
static QCString result
bool checkModuleLabelSelector(std::string const &moduleLabelSelector, std::string &errMsg)
bool checkInstanceNameSelector(std::string const &instanceNameSelector, std::string &errMsg)
bool checkProcessNameSelector(std::string const &processNameSelector, std::string &errMsg)
bool checkFriendlyNameSelector(std::string const &friendlyNameSelector, std::string &errMsg)
bool art::detail::checkFriendlyName ( std::string const &  friendlyName,
std::string errMsg 
)

Definition at line 84 of file branchNameComponentChecking.cc.

86 {
87  return checkBranchNameComponent(
88  friendlyName, "friendly name", typeRE, errMsg);
89 }
std::string friendlyName(std::string const &iFullName)
bool art::detail::checkFriendlyNameSelector ( std::string const &  friendlyNameSelector,
std::string errMsg 
)

Definition at line 92 of file branchNameComponentChecking.cc.

94 {
95  return checkBranchNameComponent(
96  friendlyNameSelector, "friendly name", typeSelectorRE, errMsg);
97 }
bool art::detail::checkInstanceName ( std::string const &  instanceName,
std::string errMsg 
)

Definition at line 115 of file branchNameComponentChecking.cc.

117 {
118  return checkBranchNameComponent(instanceName,
119  "instance name",
120  processRE, // sic.
121  errMsg,
122  true);
123 }
bool art::detail::checkInstanceNameSelector ( std::string const &  instanceNameSelector,
std::string errMsg 
)

Definition at line 126 of file branchNameComponentChecking.cc.

128 {
129  return checkBranchNameComponent(instanceNameSelector,
130  "instance name",
131  processSelectorRE, // sic.
132  errMsg,
133  true);
134 }
bool art::detail::checkModuleLabel ( std::string const &  moduleLabel,
std::string errMsg 
)

Definition at line 100 of file branchNameComponentChecking.cc.

102 {
103  return checkBranchNameComponent(moduleLabel, "module label", labelRE, errMsg);
104 }
bool art::detail::checkModuleLabelSelector ( std::string const &  moduleLabelSelector,
std::string errMsg 
)

Definition at line 107 of file branchNameComponentChecking.cc.

109 {
110  return checkBranchNameComponent(
111  moduleLabelSelector, "module label", labelSelectorRE, errMsg);
112 }
bool art::detail::checkProcessName ( std::string const &  processName,
std::string errMsg 
)

Definition at line 137 of file branchNameComponentChecking.cc.

139 {
140  return checkBranchNameComponent(
141  processName, "process name", processRE, errMsg);
142 }
bool art::detail::checkProcessNameSelector ( std::string const &  processNameSelector,
std::string errMsg 
)

Definition at line 145 of file branchNameComponentChecking.cc.

147 {
148  return checkBranchNameComponent(
149  processNameSelector, "process name", processSelectorRE, errMsg);
150 }
template<typename T , typename Elem >
std::size_t art::detail::columnWidth ( T const &  coll,
std::string const Elem::*  cp,
std::string const &  header 
)

Definition at line 41 of file PrintFormatting.h.

44  {
45  std::size_t s{header.size()};
47  coll, [&s, cp](auto const& elem) { s = std::max(s, (elem.*cp).size()); });
48  return s;
49  }
uint size() const
Definition: qcstring.h:201
static int max(int a, int b)
auto for_all(FwdCont &, Func)
static QCString * s
Definition: config.cpp:1042
std::size_t art::detail::columnWidth ( LibraryInfoCollection const &  coll,
std::string const &(LibraryInfo::*)() const  fp,
std::string const &  header 
)
inline

Definition at line 52 of file PrintFormatting.h.

55  {
56  std::size_t s{header.size()};
58  coll, [&s, fp](auto const& li) { s = std::max(s, (li.*fp)().size()); });
59  return s;
60  }
uint size() const
Definition: qcstring.h:201
static int max(int a, int b)
auto for_all(FwdCont &, Func)
static QCString * s
Definition: config.cpp:1042
FileNameComponents art::detail::componentsFromPattern ( std::string const &  pattern)

Definition at line 62 of file FileNameComponents.cc.

63  {
64  FileNameComponents result;
65 
66  boost::smatch match;
67  auto sid = cbegin(pattern), se = cend(pattern);
68  while (boost::regex_search(
69  sid,
70  se,
71  match,
72  boost::regex{"%(\\d+)?#", boost::regex_constants::ECMAScript})) {
73  assert(match.size() == 2);
74  // Subexpressions:
75  // 0. Entire matched expression
76  // 1. Possible fill format digits for numeric substitution.
77  result.add(match.prefix(), match[1].str());
78  sid = match[0].second;
79  }
80  // Get remaining characters of filename
81  result.setSuffix(std::string(sid, se));
82  return result;
83  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
static QCString result
std::string string
Definition: nybbler.cc:12
std::string pattern
Definition: regex_t.cc:35
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:82
Definition: se.py:1
template<SignalResponseType STYPE, typename SIGNAL , typename FUNC >
std::enable_if_t<STYPE == SignalResponseType::FIFO> art::detail::connect_to_signal ( SIGNAL &  s,
FUNC  f 
)

Definition at line 16 of file SignalResponseType.h.

17  {
18  s.emplace_back(f);
19  }
static QCString * s
Definition: config.cpp:1042
template<SignalResponseType STYPE, typename SIGNAL , typename FUNC >
std::enable_if_t<STYPE == SignalResponseType::LIFO> art::detail::connect_to_signal ( SIGNAL &  s,
FUNC  f 
)

Definition at line 23 of file SignalResponseType.h.

24  {
25  s.emplace_front(f);
26  }
static QCString * s
Definition: config.cpp:1042
std::set< ProductInfo > art::detail::consumed_products_for_module ( std::string const &  current_process,
ConsumesInfo::consumables_t::mapped_type const &  consumables,
std::map< std::string, std::set< ProductInfo >> const &  produced_products,
std::map< std::string, std::set< std::string >> const &  viewable_products,
config_const_iterator const  config_begin,
config_const_iterator const  config_it 
)

Definition at line 159 of file consumed_products.cc.

166 {
167  auto const& module_name =
168  config_it->moduleConfigInfo->modDescription.moduleLabel();
169  std::set<ProductInfo> result;
170  for (auto const& per_branch_type : consumables) {
171  for (auto const& prod_info : per_branch_type) {
172  switch (prod_info.consumableType) {
173  case ProductInfo::ConsumableType::Product: {
174  auto dep = consumes_dependency(config_begin,
175  config_it,
176  prod_info,
177  current_process,
178  produced_products);
179  result.insert(std::move(dep));
180  break;
181  }
182  case ProductInfo::ConsumableType::Many: {
183  // Loop through modules on this path, introducing
184  // product-lookup dependencies if the type of the product
185  // created by the module matches the type requested in the
186  // consumesMany call.
187  auto const& class_name = prod_info.friendlyClassName;
188  for (auto mit = config_begin; mit != config_it; ++mit) {
189  auto possible_products = produced_products.find(
190  mit->moduleConfigInfo->modDescription.moduleLabel());
191  if (possible_products == cend(produced_products)) {
192  continue;
193  }
194  cet::copy_if_all(possible_products->second,
195  inserter(result, begin(result)),
196  [&class_name](auto const& pi) {
197  return class_name == pi.friendlyClassName;
198  });
199  }
200  break;
201  }
202  case ProductInfo::ConsumableType::ViewElement: {
203  auto dep = consumes_view_dependency(
204  prod_info, module_name, current_process, viewable_products);
205  result.insert(std::move(dep));
206  }
207  // No default case to allow compiler to warn.
208  }
209  }
210  }
211  return result;
212 }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
static QCString result
auto copy_if_all(FwdCont &, FwdIter, Pred)
def move(depos, offset)
Definition: depos.py:107
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
float pi
Definition: units.py:11
art::ProductLookup_t art::detail::createProductLookups ( ProductDescriptionsByID const &  descriptions)

Definition at line 68 of file createProductLookups.cc.

69 {
70  // Computing the product lookups does not rely on any ROOT facilities.
72  std::vector<PendingBTLEntry> pendingEntries;
73  std::unordered_map<ProductID, CheapTag, ProductID::Hash> insertedABVs;
74  for (auto const& pr : descriptions) {
75  auto const pid = pr.first;
76  auto const& pd = pr.second;
77  auto const& prodFCN = pd.friendlyClassName();
78  auto const& procName = pd.processName();
79  result[prodFCN][procName].emplace_back(pid);
80 
81  // Additional work only for Assns lookup
82  auto const& moduleLabel = pd.moduleLabel();
83  auto const& instanceName = pd.productInstanceName();
84  auto const& className = pd.producedClassName();
85 
86  if (!is_assns(className))
87  continue;
88 
90  if (!baseName.empty()) {
91  // We're an Assns<A, B, D>, with a base Assns<A, B>.
92  pendingEntries.emplace_back(art::friendlyname::friendlyName(baseName),
93  moduleLabel,
94  instanceName,
95  procName,
96  pid);
97  } else {
98  // Add our pid to the list of real Assns<A, B, void>
99  // products already registered.
100  insertedABVs.emplace(pid, CheapTag{moduleLabel, instanceName, procName});
101  }
102  }
103 
104  auto const iend = insertedABVs.cend();
105  // Preserve useful ordering, only inserting if we don't already have
106  // a *real* Assns<A, B, void> for that module label / instance name
107  // combination.
108  std::for_each(
109  pendingEntries.cbegin(),
110  pendingEntries.cend(),
111  [&result, &insertedABVs, iend](auto const& pe) {
112  auto& pids = result[pe.fcn()][pe.process()];
113  if (pids.empty() ||
114  !std::any_of(pids.cbegin(),
115  pids.cend(),
116  [&insertedABVs, &iend, &pe](ProductID const pid) {
117  auto i = insertedABVs.find(pid);
118  return i != iend && pe.ct() == i->second;
119  })) {
120  pids.emplace_back(pe.pid());
121  }
122  });
123 
124  return result;
125 }
static QCString result
static QCString className
Definition: declinfo.cpp:669
string name_of_assns_base(string assns_type_name)
Definition: TypeID.cc:185
std::string friendlyName(std::string const &iFullName)
static QCString baseName
Definition: scanner.cpp:10890
std::map< std::string, ProcessLookup > ProductLookup_t
Definition: type_aliases.h:23
bool is_assns(std::string const &type_name)
Definition: TypeID.h:66
art::ViewLookup_t art::detail::createViewLookups ( ProductDescriptionsByID const &  descriptions)

Definition at line 5 of file createViewLookups.cc.

6 {
7  // This version stores the list of products that support views.
9  for (auto const& pr : descriptions) {
10  auto const& pd = pr.second;
11  if (!pd.supportsView())
12  continue;
13 
14  auto const& procName = pd.processName();
15  auto const pid = pr.first;
16 
17  result[procName].emplace_back(pid);
18  }
19  return result;
20 }
static QCString result
ProcessLookup ViewLookup_t
Definition: type_aliases.h:18
std::string art::detail::describe ( cet::exempt_ptr< fhicl::ConfigurationTable const >  pb,
std::string const &  prefix 
)

Definition at line 6 of file describe.cc.

8 {
9  std::ostringstream oss;
10  if (config == nullptr) {
11  oss << "\n" << tab << "[ None provided ]\n";
12  } else {
13  oss << '\n' << tab << fhicl::detail::optional_parameter_message() << '\n';
14  fhicl::detail::PrintAllowedConfiguration pac{oss, false, tab};
15  pac.walk_over(*config->parameter_base());
16  }
17  return oss.str();
18 }
std::string optional_parameter_message(bool const with_comment=true)
void walk_over(tt::maybe_const_t< ParameterBase, C > &)
static Config * config
Definition: config.cpp:1054
constexpr char const* art::detail::dflt_spec_pattern ( )

Definition at line 11 of file get_LibraryInfoCollection.h.

12  {
13  return "[A-Za-z0-9]+";
14  }
void art::detail::ensure_only_one_thread ( fhicl::ParameterSet const &  service_pset)

Definition at line 15 of file ensure_only_one_thread.cc.

16 {
17  auto const& globals = *Globals::instance();
18  auto const nschedules = globals.nschedules();
19  auto const nthreads = globals.nthreads();
20  if (nschedules == 1u && nthreads == 1u)
21  return;
22 
23  auto const service_type = service_pset.get<std::string>("service_type");
25  e << "The service '" << service_type << '\'';
27  if (service_pset.get_if_present("service_provider", provider)) {
28  e << " (provider: '" << provider << "')";
29  }
30  e << " is a legacy service,\n"
31  << "which can be used with only one schedule and one thread.\n"
32  << "This job uses " << nschedules << maybe_s(nschedules, " schedule")
33  << " and " << nthreads << maybe_s(nthreads, " thread") << ".\n"
34  << "Please reconfigure your job to use only one schedule/thread.\n";
35  throw e;
36 }
std::string string
Definition: nybbler.cc:12
virtual const provider_type * provider() const override
const std::string instance
const double e
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::tuple< art::RunNumber_t, art::SubRunNumber_t, art::EventNumber_t > art::detail::event_start ( std::string const &  str_num)

Definition at line 72 of file event_start.cc.

73 {
74  std::smatch parts;
75  auto const success = std::regex_match(event_spec, parts, re_event_id);
76  if (!success) {
77  throw_configuration_exception(event_spec);
78  }
79 
80  assert(parts.size() == 4ull);
81  // A successful match will populate 'parts' with 5 elements.
82  // Consider the following valid specifications:
83  //
84  // +-------------+---------+
85  // | User spec. | '1:0:3' |
86  // +-------------+---------+
87  // | parts[0] == | '1:0:3' |
88  // | parts[1] == | '1' |
89  // | parts[2] == | '0' |
90  // | parts[3] == | '3' |
91  // +-------------+---------+
92 
93  auto const run = convert_or_throw<Level::Run>(parts[1], event_spec);
94  auto const subrun = convert_or_throw<Level::SubRun>(parts[2], event_spec);
95  auto const event = convert_or_throw<Level::Event>(parts[3], event_spec);
96 
97  return std::make_tuple(run, subrun, event);
98 }
Event finding and building.
bool art::detail::exists_outside_prolog ( fhicl::intermediate_table const &  config,
std::string const &  key 
)
inline

Definition at line 9 of file exists_outside_prolog.h.

11  {
12  return config.exists(key) && !config.find(key).in_prolog;
13  }
def key(type, name=None)
Definition: graph.py:13
static Config * config
Definition: config.cpp:1054
template<typename T >
std::enable_if_t<std::is_convertible_v<T, std::string>, std::string> art::detail::fhicl_key ( T const &  name)

Definition at line 12 of file fhicl_key.h.

13  {
14  return name;
15  }
static QCString name
Definition: declinfo.cpp:673
template<typename H , typename... T>
std::enable_if_t<std::is_convertible_v<H, std::string>, std::string> art::detail::fhicl_key ( H const &  hname,
T const &...  tnames 
)

Definition at line 19 of file fhicl_key.h.

20  {
21  std::string const head{hname};
22  return head.empty() ? fhicl_key(tnames...) :
23  head + "." + fhicl_key(tnames...);
24  }
std::string string
Definition: nybbler.cc:12
std::enable_if_t< std::is_convertible_v< H, std::string >, std::string > fhicl_key(H const &hname, T const &...tnames)
Definition: fhicl_key.h:19
void art::detail::fillSourceList ( std::istream &  ifs,
std::vector< std::string > &  source_list 
)

Definition at line 4 of file fillSourceList.cc.

6 {
7  for (std::string line; std::getline(is, line);) {
8  auto const comment_start = line.find('#');
9  if (comment_start != std::string::npos)
10  line.erase(comment_start);
11  if (!line.empty())
12  source_list.push_back(line);
13  }
14 }
std::string string
Definition: nybbler.cc:12
void line(double t, double *p, double &x, double &y, double &z)
EventRange art::detail::full_run_event_range ( )

Definition at line 81 of file RangeSet.cc.

82  {
83  static EventRange const range{
84  IDNumber<Level::SubRun>::invalid(), 0, IDNumber<Level::Event>::invalid()};
85  return range;
86  }
LibraryInfoCollection art::detail::get_LibraryInfoCollection ( std::string const &  suffix,
std::string const &  pattern,
bool  verbose = false 
)

Definition at line 240 of file get_LibraryInfoCollection.cc.

243 {
244  if (suffix == art::Suffixes::service()) {
245  return collection_for_services(pattern, verbose);
246  }
247  return collection_for_plugins(suffix, pattern, verbose);
248 }
verbose
Definition: train.py:477
std::string pattern
Definition: regex_t.cc:35
static std::string const & service()
std::unique_ptr< MetadataCollector > art::detail::get_MetadataCollector ( std::string const &  suffix)

Definition at line 15 of file get_MetadataCollector.cc.

16 {
17  if (suffix == art::Suffixes::module()) {
18  return std::make_unique<MetadataCollectorFor<suffix_type::module>>();
19  }
20  if (suffix == art::Suffixes::plugin()) {
21  return std::make_unique<MetadataCollectorFor<suffix_type::plugin>>();
22  }
23  if (suffix == art::Suffixes::service()) {
24  return std::make_unique<MetadataCollectorFor<suffix_type::service>>();
25  }
26  if (suffix == art::Suffixes::source()) {
27  return std::make_unique<MetadataCollectorFor<suffix_type::source>>();
28  }
29  if (suffix == art::Suffixes::tool()) {
30  return std::make_unique<MetadataCollectorFor<suffix_type::tool>>();
31  }
32  if (suffix == art::Suffixes::mfPlugin()) {
33  return std::make_unique<MetadataCollectorFor<suffix_type::mfPlugin>>();
34  }
35  if (suffix == art::Suffixes::mfStatsPlugin()) {
36  return std::make_unique<MetadataCollectorFor<suffix_type::mfStatsPlugin>>();
37  }
38  return std::unique_ptr<MetadataCollector>{nullptr};
39 }
static std::string const & mfStatsPlugin()
static std::string const & source()
static std::string const & plugin()
static std::string const & tool()
static std::string const & mfPlugin()
static std::string const & service()
static std::string const & module()
std::unique_ptr< MetadataSummary > art::detail::get_MetadataSummary ( std::string const &  suffix,
LibraryInfoCollection const &  coll 
)

Definition at line 15 of file get_MetadataSummary.cc.

17 {
18  if (suffix == art::Suffixes::module()) {
19  return std::make_unique<MetadataSummaryFor<suffix_type::module>>(coll);
20  }
21  if (suffix == art::Suffixes::plugin()) {
22  return std::make_unique<MetadataSummaryFor<suffix_type::plugin>>(coll);
23  }
24  if (suffix == art::Suffixes::service()) {
25  return std::make_unique<MetadataSummaryFor<suffix_type::service>>(coll);
26  }
27  if (suffix == art::Suffixes::source()) {
28  return std::make_unique<MetadataSummaryFor<suffix_type::source>>(coll);
29  }
30  if (suffix == art::Suffixes::tool()) {
31  return std::make_unique<MetadataSummaryFor<suffix_type::tool>>(coll);
32  }
33  if (suffix == art::Suffixes::mfPlugin()) {
34  return std::make_unique<MetadataSummaryFor<suffix_type::mfPlugin>>(coll);
35  }
36  if (suffix == art::Suffixes::mfStatsPlugin()) {
37  return std::make_unique<MetadataSummaryFor<suffix_type::mfStatsPlugin>>(
38  coll);
39  }
40  return std::unique_ptr<MetadataSummary>{nullptr};
41 }
static std::string const & mfStatsPlugin()
static std::string const & source()
static std::string const & plugin()
static std::string const & tool()
static std::string const & mfPlugin()
static std::string const & service()
static std::string const & module()
std::unique_ptr< fhicl::ConfigurationTable > art::detail::getAllowedConfiguration ( cet::LibraryManager const &  lm,
std::string const &  fullSpec,
std::string const &  name 
)

Definition at line 94 of file PluginSymbolResolvers.cc.

97  {
98  using GetAllowedConfiguration_t =
99  std::unique_ptr<fhicl::ConfigurationTable>(std::string const&);
100 
101  auto description = [&lm, &fullSpec, &name] {
102  GetAllowedConfiguration_t* symbolType{};
103  lm.getSymbolByLibspec(fullSpec, "allowed_configuration", symbolType);
104  return symbolType(name);
105  };
106 
107  return resolve_if_present(
108  description,
109  __func__,
110  std::unique_ptr<fhicl::ConfigurationTable>{nullptr});
111  }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
std::string art::detail::getFilePath ( cet::LibraryManager const &  lm,
std::string const &  fullspec 
)

Definition at line 31 of file PluginSymbolResolvers.cc.

32  {
33  using GetSourceLoc_t = std::string();
34 
35  using namespace std::string_literals;
36  auto path = [&lm, &fullspec] {
37  GetSourceLoc_t* symbolLoc{};
38  lm.getSymbolByLibspec(fullspec, "get_source_location", symbolLoc);
39  std::string source{symbolLoc()};
40  boost::filesystem::path const p{source};
42  source =
43  "/ [ external source ] /" + fullspec + "_" + lm.libType() + ".cc";
44  }
45  return source;
46  };
47 
48  return resolve_if_present(path, __func__, "[ not found ]"s);
49  }
std::string string
Definition: nybbler.cc:12
bool exists(std::string path)
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042
std::string art::detail::getType ( cet::LibraryManager const &  lm,
std::string const &  fullSpec 
)

Definition at line 52 of file PluginSymbolResolvers.cc.

53  {
54  auto const& suffix = lm.libType();
55  if (suffix == Suffixes::module()) {
57 
58  auto type = [&lm, &fullSpec] {
59  ModuleTypeFunc_t* symbolType{nullptr};
60  lm.getSymbolByLibspec(fullSpec, "moduleType", symbolType);
61  return to_string(symbolType());
62  };
63 
64  return resolve_if_present(type, __func__, "[ error ]"s);
65  }
66 
67  if (suffix == Suffixes::plugin()) {
68  using PluginTypeFunc_t = std::string();
69 
70  auto type = [&lm, &fullSpec] {
71  PluginTypeFunc_t* symbolType{nullptr};
72  lm.getSymbolByLibspec(fullSpec, "pluginType", symbolType);
73  return symbolType();
74  };
75 
76  return resolve_if_present(type, __func__, "[ error ]"s);
77  }
78 
79  if (suffix == Suffixes::tool()) {
80  using ToolTypeFunc_t = std::string();
81 
82  auto type = [&lm, &fullSpec] {
83  ToolTypeFunc_t* symbolType{nullptr};
84  lm.getSymbolByLibspec(fullSpec, "toolType", symbolType);
85  return symbolType();
86  };
87 
88  return resolve_if_present(type, __func__, "[ error ]"s);
89  }
90  return {};
91  }
std::string string
Definition: nybbler.cc:12
ModuleType( ModuleTypeFunc_t)
Definition: ModuleMacros.h:38
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
static QCString * s
Definition: config.cpp:1042
ModuleType
Definition: ModuleType.h:11
template<typename T , typename R , typename O , typename I >
no_tag art::detail::has_three_arg_insert_helper (   ...)
template<typename T , typename R , typename O , typename I >
yes_tag art::detail::has_three_arg_insert_helper ( three_arg_insert_func< T, R, O, I,&T::insert > *  dummy)
template<typename T , typename I >
no_tag art::detail::has_two_arg_insert_helper (   ...)
template<typename T , typename I >
yes_tag art::detail::has_two_arg_insert_helper ( two_arg_insert_func< T, I,&T::insert > *  dummy)
bool art::detail::has_whitespace ( std::string const &  str)

Definition at line 17 of file remove_whitespace.cc.

18 {
19  return str.find_first_of(whitespace_chars) != std::string::npos;
20 }
static QCString str
std::string art::detail::indent ( std::size_t const  i)
inline

Definition at line 17 of file PrintFormatting.h.

18  {
19  return std::string(i, ' ');
20  }
std::string string
Definition: nybbler.cc:12
std::string art::detail::indent0 ( )
inline

Definition at line 22 of file PrintFormatting.h.

23  {
24  return indent(3);
25  }
std::string indent(std::size_t const i)
std::string art::detail::indent_1 ( )
inline

Definition at line 27 of file PrintFormatting.h.

28  {
29  return indent(4);
30  }
std::string indent(std::size_t const i)
std::string art::detail::indent__2 ( )
inline

Definition at line 32 of file PrintFormatting.h.

33  {
34  return indent(8);
35  }
std::string indent(std::size_t const i)
constexpr int art::detail::info_success ( )

Definition at line 8 of file info_success.h.

9  {
11  }
static int max(int a, int b)
template<typename ProdA , typename ProdB , typename Data , typename Tag >
InputTag art::detail::input_tag ( Tag const &  tag)

Definition at line 30 of file IPRHelper.h.

31  {
32  static_assert(
33  std::is_convertible_v<Tag, InputTag> ||
34  std::is_same_v<Tag, ProductToken<Assns<ProdA, ProdB>>> ||
35  std::is_same_v<Tag, ProductToken<Assns<ProdA, ProdB, Data>>>,
36  "\n\nart error: The input tag or product token provided to the "
37  "smart-query object\n"
38  " constructor has a type that conflicts with that of the "
39  "smart-query object.\n");
40  return safe_input_tag<ProdA, ProdB, Data>(tag).tag;
41  }
Definition: tag.cpp:4
std::string const & art::detail::InvalidHash ( )

Definition at line 7 of file Hash.cc.

8  {
9  static std::string const invalid{cet::MD5Result().compactForm()};
10  return invalid;
11  }
std::string string
Definition: nybbler.cc:12
std::string compactForm() const
Definition: MD5Digest.cc:68
void art::detail::issue_reports ( unsigned  count,
EventID const &  id 
)

Definition at line 29 of file issue_reports.cc.

30 {
31  time_t t = time(0);
32  constexpr char tsOutput[] = "dd-Mon-yyyy hh:mm:ss TZN ";
33  constexpr size_t tsmax = (sizeof tsOutput) + 1;
34  char ts[tsmax];
35  strftime(ts, tsmax, "%d-%b-%Y %H:%M:%S %Z", localtime(&t));
36  mf::LogVerbatim{"ArtReport"} << "Begin processing the " << count
37  << suffix(count) << " record. " << id << " at "
38  << ts;
39  // At some point we may want to initiate checkpointing here
40 }
void art::detail::logFileAction ( const char *  msg,
std::string const &  file 
)

Definition at line 9 of file logFileAction.cc.

10 {
11  time_t t = time(0);
12  char ts[] = "dd-Mon-yyyy hh:mm:ss TZN ";
13  struct tm localtm;
14  strftime(
15  ts, strlen(ts) + 1, "%d-%b-%Y %H:%M:%S %Z", localtime_r(&t, &localtm));
16  mf::LogAbsolute("fileAction") << ts << " " << msg << '\"' << file << '\"';
17 }
void msg(const char *fmt,...)
Definition: message.cpp:107
tm
Definition: demo.py:21
MaybeLogger_< ELseverityLevel::ELsev_severe, true > LogAbsolute
template<typename T , typename Config >
T* art::detail::make_module ( Config const &  config,
ProcessingFrame const &  frame 
)

Definition at line 56 of file ModuleMacros.h.

57  {
59  ModuleThreadingType::legacy) {
60  return new T{config};
61  } else {
62  return new T{config, frame};
63  }
64  }
static Config * config
Definition: config.cpp:1054
std::pair< ModuleGraph, std::string > art::detail::make_module_graph ( ModuleGraphInfoMap const &  modInfos,
paths_to_modules_t const &  trigger_paths,
configs_t const &  end_path 
)

Definition at line 45 of file graph_algorithms.cc.

48 {
49  auto const nmodules = modInfos.size();
50  ModuleGraph module_graph{nmodules};
51 
52  make_trigger_path_subgraphs(modInfos, trigger_paths, module_graph);
53  make_product_dependency_edges(modInfos, module_graph);
54  auto err = verify_no_interpath_dependencies(modInfos, module_graph);
55  if (err.empty()) {
56  // Cannot currently check intrapath dependencies unless the above
57  // check is successful.
58  err += verify_in_order_dependencies(modInfos, trigger_paths);
59  }
60 
61  make_path_ordering_edges(modInfos, trigger_paths, module_graph);
62  make_synchronization_edges(modInfos, trigger_paths, end_path, module_graph);
63 
64  return std::make_pair(module_graph, err);
65 }
std::string verify_in_order_dependencies(ModuleGraphInfoMap const &modules, paths_to_modules_t const &trigger_paths)
void err(const char *fmt,...)
Definition: message.cpp:226
void make_synchronization_edges(ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, configs_t const &end_path, ModuleGraph &graph)
void make_trigger_path_subgraphs(ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &trigger_paths, ModuleGraph &graph)
boost::subgraph< Graph > ModuleGraph
Definition: ModuleGraph.h:23
std::string verify_no_interpath_dependencies(ModuleGraphInfoMap const &modInfos, ModuleGraph const &graph)
void make_path_ordering_edges(ModuleGraphInfoMap const &modInfos, paths_to_modules_t const &paths, ModuleGraph &graph)
void make_product_dependency_edges(ModuleGraphInfoMap const &modInfos, ModuleGraph &graph)
void art::detail::make_path_ordering_edges ( ModuleGraphInfoMap const &  modInfos,
paths_to_modules_t const &  paths,
ModuleGraph graph 
)

Definition at line 112 of file graph_algorithms.cc.

115 {
116  // Make edges corresponding to path ordering
117  auto path_label = get(boost::edge_name, graph);
118  for (auto const& path : trigger_paths) {
119  auto const& modules = path.second;
120  if (modules.empty())
121  continue;
122  auto prev = cbegin(modules);
123  auto curr = prev + 1;
124  auto const end = cend(modules);
125  while (curr != end) {
126  auto const pi = modInfos.vertex_index(module_label(*prev));
127  auto const ci = modInfos.vertex_index(module_label(*curr));
128  auto const edge = add_edge(ci, pi, graph);
129  path_label[edge.first] = "path:" + path.first.name;
130  prev = curr;
131  ++curr;
132  }
133  }
134 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
def graph(desc, maker=maker)
Definition: apa.py:294
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:82
float pi
Definition: units.py:11
void art::detail::make_product_dependency_edges ( ModuleGraphInfoMap const &  modInfos,
ModuleGraph graph 
)

Definition at line 97 of file graph_algorithms.cc.

99 {
100  auto edge_label = get(boost::edge_name, graph);
101  for (Vertex u{}; u < modInfos.size(); ++u) {
102  auto const& modu = modInfos.info(u);
103  for (auto const& dep : modu.consumed_products) {
104  auto const v = modInfos.vertex_index(dep.label);
105  auto const edge = add_edge(u, v, graph);
106  edge_label[edge.first] = "prod";
107  }
108  }
109 }
def graph(desc, maker=maker)
Definition: apa.py:294
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
void art::detail::make_synchronization_edges ( ModuleGraphInfoMap const &  modInfos,
paths_to_modules_t const &  trigger_paths,
configs_t const &  end_path,
ModuleGraph graph 
)

Definition at line 137 of file graph_algorithms.cc.

141 {
142  auto const source_index = modInfos.vertex_index("input_source");
143  auto sync_label = get(boost::edge_name, graph);
144  if (!trigger_paths.empty()) {
145  auto const tr_index = modInfos.vertex_index("TriggerResults");
146  for (auto const& path : trigger_paths) {
147  auto const& modules = path.second;
148  if (modules.empty()) {
149  continue;
150  }
151  auto const front_index =
152  modInfos.vertex_index(module_label(modules.front()));
153  auto const back_index =
154  modInfos.vertex_index(module_label(modules.back()));
155  auto const edge1 = add_edge(front_index, source_index, graph);
156  sync_label[edge1.first] = "source:" + path.first.name;
157  auto const edge2 = add_edge(tr_index, back_index, graph);
158  sync_label[edge2.first] = "sync";
159  }
160  for (auto const& module : end_path) {
161  auto const index = modInfos.vertex_index(module_label(module));
162  auto const edge = add_edge(index, tr_index, graph);
163  sync_label[edge.first] = "sync";
164  }
165  } else if (!end_path.empty()) {
166  for (auto const& module : end_path) {
167  auto const index = modInfos.vertex_index(module_label(module));
168  auto const edge = add_edge(index, source_index, graph);
169  sync_label[edge.first] = "sync";
170  }
171  }
172 
173  auto constexpr invalid = std::numeric_limits<std::size_t>::max();
174 
175  // Now synchronize between previous filters
176  for (auto const& path : trigger_paths) {
177  auto preceding_filter_index = invalid;
178  for (auto const& module : path.second) {
179  auto const index = modInfos.vertex_index(module_label(module));
180  auto const& info = modInfos.info(index);
181  if (preceding_filter_index != invalid) {
182  auto const edge = add_edge(index, preceding_filter_index, graph);
183  sync_label[edge.first] = "filter:" + path.first.name;
184  }
185  if (info.module_type == ModuleType::filter) {
186  preceding_filter_index = index;
187  }
188  }
189  }
190 
191  if (trigger_paths.empty()) {
192  return;
193  }
194 
195  // Synchronize end-path modules if a 'SelectEvents' parameter has
196  // been specified. Treat it as a filter.
197  auto const tr_index = modInfos.vertex_index("TriggerResults");
198  for (auto const& module : end_path) {
199  auto const index = modInfos.vertex_index(module_label(module));
200  auto const& info = modInfos.info(index);
201  for (auto const& path : info.select_events) {
202  auto const edge = add_edge(index, tr_index, graph);
203  sync_label[edge.first] = "filter:" + path;
204  }
205  }
206 }
def graph(desc, maker=maker)
Definition: apa.py:294
static int max(int a, int b)
static unsigned filter(unsigned char *out, const unsigned char *in, unsigned w, unsigned h, const LodePNG_InfoColor *info)
Definition: lodepng.cpp:3576
void art::detail::make_trigger_path_subgraphs ( ModuleGraphInfoMap const &  modInfos,
paths_to_modules_t const &  trigger_paths,
ModuleGraph graph 
)

Definition at line 68 of file graph_algorithms.cc.

72 {
73  std::map<path_name_t, ModuleGraph*> path_graphs;
74  auto const source_index = modInfos.vertex_index("input_source");
75  for (auto const& path : trigger_paths) {
76  auto& path_graph = module_graph.create_subgraph();
77  // Always include the source on the path.
78  add_vertex(source_index, path_graph);
79  path_graphs[path.first.name] = &path_graph;
80  }
81 
82  auto vertex_names = get(boost::vertex_name_t{}, module_graph);
83  for (auto const& pr : modInfos) {
84  auto const& module_name = pr.first;
85  auto const& info = pr.second;
86  if (!is_modifier(info.module_type))
87  continue;
88  auto const index = modInfos.vertex_index(pr.first);
89  for (auto const& path : info.paths) {
90  add_vertex(index, *path_graphs.at(path));
91  }
92  vertex_names[index] = module_name;
93  }
94 }
bool is_modifier(ModuleType const mt)
Definition: ModuleType.h:22
template<typename T >
std::enable_if_t< std::is_constructible_v<T, fhicl::ParameterSet const&, ActivityRegistry&>, std::shared_ptr<T> > art::detail::makeServiceFrom ( fhicl::ParameterSet const &  ps,
ActivityRegistry areg 
)

Definition at line 28 of file ServiceWrapper.h.

29  {
30  static_assert(
31  !std::is_base_of_v<ProducingService, T>,
32  "\n\nart-error: A service that inherits from art::ProducingService\n"
33  " cannot have a constructor that takes an ActivityRegistry&\n"
34  " argument. Contact artists@fnal.gov for guidance.\n");
35  return std::make_shared<T>(ps, areg);
36  }
static constexpr double ps
Definition: Units.h:99
template<typename T >
std::enable_if_t<!std::is_constructible_v<T, fhicl::ParameterSet const&, ActivityRegistry&>, std::shared_ptr<T> > art::detail::makeServiceFrom ( fhicl::ParameterSet const &  ps,
ActivityRegistry  
)

Definition at line 43 of file ServiceWrapper.h.

44  {
45  return std::make_shared<T>(ps);
46  }
static constexpr double ps
Definition: Units.h:99
template<typename T , typename ResultType , typename... Args>
std::function<ResultType(Args...)> art::detail::makeWatchFunc ( ResultType(T::*)(Args...)  slot,
T &  t 
)

Definition at line 16 of file makeWatchFunc.h.

17  {
18  return [slot, &t](Args&&... args) -> ResultType {
19  return (t.*slot)(std::forward<Args>(args)...);
20  };
21  }
static QCString args
Definition: declinfo.cpp:674
template<typename T , typename ResultType , typename... Args>
std::function<ResultType(Args...)> art::detail::makeWatchFunc ( ResultType(T::*)(Args...) const  slot,
T const &  t 
)

Definition at line 25 of file makeWatchFunc.h.

26  {
27  return [slot, &t](Args&&... args) -> ResultType {
28  return (t.*slot)(std::forward<Args>(args)...);
29  };
30  }
static QCString args
Definition: declinfo.cpp:674
void const* art::detail::maybeCastObj ( void const *  address,
std::type_info const &  tiFrom,
std::type_info const &  tiTo 
)
template<typename element_type >
void const * art::detail::maybeCastObj ( element_type const *  address,
std::type_info const &  tiTo 
)
inline

Definition at line 18 of file maybeCastObj.h.

20 {
21  static std::type_info const& tiFrom{typeid(element_type)};
22  return maybeCastObj(address, tiFrom, tiTo);
23 }
void const * maybeCastObj(element_type const *address, std::type_info const &tiTo)
Definition: maybeCastObj.h:18
void art::detail::memoryReport ( )

Definition at line 4 of file memoryReportDarwin.cc.

5 {
6  // Not implemented for Darwin
7 }
ModuleType art::detail::module_type ( std::string const &  full_key)

Definition at line 5 of file ModuleKeyAndType.cc.

6  {
7  if (full_key.find("physics.producers") == 0) {
8  return ModuleType::producer;
9  } else if (full_key.find("physics.filters") == 0) {
10  return ModuleType::filter;
11  } else if (full_key.find("physics.analyzers") == 0) {
12  return ModuleType::analyzer;
13  } else if (full_key.find("outputs") == 0) {
14  return ModuleType::output_module;
15  }
16  return ModuleType::non_art;
17  }
static unsigned filter(unsigned char *out, const unsigned char *in, unsigned w, unsigned h, const LodePNG_InfoColor *info)
Definition: lodepng.cpp:3576
std::map<old_t, new_t> art::detail::oldToNewName ( )
inline

Definition at line 14 of file SAMMetadataTranslators.h.

15  {
16  return {{"fileType", "file_type"},
17  {"dataTier", "data_tier"},
18  {"streamName", "data_stream"},
19  {"runType", "run_type"}};
20  }
bool art::detail::operator!= ( ModuleKeyAndType const &  a,
ModuleKeyAndType const &  b 
)
inlinenoexcept

Definition at line 32 of file ModuleKeyAndType.h.

33  {
34  return not(a == b);
35  }
const double a
static bool * b
Definition: config.cpp:1043
std::ostream & art::detail::operator<< ( std::ostream &  os,
ModuleGraphInfo const &  info 
)

Definition at line 4 of file ModuleGraphInfo.cc.

5 {
6  os << "Module type: " << to_string(info.module_type) << '\n';
7  os << "Product dependencies: ";
8  for (auto const& dep : info.consumed_products) {
9  os << dep << ' ';
10  }
11  os << "\nPaths: ";
12  for (auto const& path : info.paths) {
13  os << path << ' ';
14  }
15  return os;
16 }
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
std::ostream& art::detail::operator<< ( std::ostream &  os,
LinuxMallInfo const &  info 
)
inline

Definition at line 55 of file LinuxMallInfo.h.

56  {
57  auto const& minfo = info.minfo_;
58  os << " HEAP-ARENA [ SIZE-BYTES " << minfo.arena << " N-UNUSED-CHUNKS "
59  << minfo.ordblks << " TOP-FREE-BYTES " << minfo.keepcost << " ]"
60  << " HEAP-MAPPED [ SIZE-BYTES " << minfo.hblkhd << " N-CHUNKS "
61  << minfo.hblks << " ]"
62  << " HEAP-USED-BYTES " << minfo.uordblks << " HEAP-UNUSED-BYTES "
63  << minfo.fordblks;
64  return os;
65  }
template<typename T >
std::ostream& art::detail::operator<< ( std::ostream &  os,
Analyzer::Table< T > const &  t 
)
inline

Definition at line 136 of file Analyzer.h.

137  {
138  std::ostringstream config;
139  t.print_allowed_configuration(config, std::string(3, ' '));
140  return os << config.str();
141  }
std::string string
Definition: nybbler.cc:12
static Config * config
Definition: config.cpp:1054
bool art::detail::operator== ( ModuleKeyAndType const &  a,
ModuleKeyAndType const &  b 
)
inlinenoexcept

Definition at line 26 of file ModuleKeyAndType.h.

27  {
28  return a.key == b.key && a.type == b.type;
29  }
const double a
static bool * b
Definition: config.cpp:1043
std::vector< std::vector< std::string > > art::detail::orderedProcessNamesCollection ( ProcessHistoryMap const &  pHistMap)

Definition at line 74 of file orderedProcessNamesCollection.cc.

75 {
76  std::vector<std::string> all_process_names;
77  all_process_names.reserve(histories.size());
78  for (auto const& history : histories | ranges::views::values) {
79  all_process_names.push_back(stringified_process_names(history));
80  }
81  cet::sort_all(all_process_names);
82 
83  // It is possible for two non-overlapping histories to have the same
84  // process name. We thus need to erase duplicate names.
85  auto const e = end(all_process_names);
86  auto const new_end = std::unique(begin(all_process_names), e);
87  all_process_names.erase(new_end, e);
88 
89  auto const collapsed = collapsed_histories(all_process_names);
90  return transform_to_final_result(collapsed);
91 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void sort_all(RandCont &)
const double e
Q_UINT16 values[128]
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
bool art::detail::output_to_stderr ( std::string const &  spec)

Definition at line 15 of file output_to.cc.

16 {
17  return std::regex_match(spec, re_stderr);
18 }
bool art::detail::output_to_stdout ( std::string const &  spec)

Definition at line 21 of file output_to.cc.

22 {
23  return std::regex_match(spec, re_stdout);
24 }
std::vector< PathSpec > art::detail::path_specs ( std::vector< ModuleSpec > const &  selection_override_entries,
std::string const &  path_selection_override 
)

Definition at line 217 of file prune_configuration.cc.

219  {
220  auto guidance = [](std::string const& name,
221  std::string const& path_selection_override,
222  std::string const& id_str) {
223  std::ostringstream oss;
224  oss << "If you would like to repeat the path specification, all "
225  "path specifications\n"
226  "with the name '"
227  << name << "' must be prepended with the same path ID (e.g.):\n\n"
228  << " " << path_selection_override << ": ['" << id_str << ':' << name
229  << "', '" << id_str << ':' << name << "', ...]\n\n";
230  return oss.str();
231  };
232 
233  std::map<PathID, std::string> id_to_name;
234  std::map<std::string, PathID> name_to_id;
235  std::vector<art::PathSpec> result;
236 
237  size_t i = 0;
238  for (auto it = cbegin(selection_override_entries),
239  e = cend(selection_override_entries);
240  it != e;
241  ++it, ++i) {
242  auto const& path = *it;
243  auto spec = art::path_spec(path.name);
244  if (spec.name == at_nil) {
245  continue;
246  }
247 
248  // Path names with unspecified IDs cannot be reused
249  auto const emplacement_result =
250  name_to_id.try_emplace(spec.name, spec.path_id);
251  bool const name_already_present = not emplacement_result.second;
252  auto const emplaced_path_id = emplacement_result.first->second;
253 
254  if (name_already_present) {
255  if (spec.path_id == art::PathID::invalid()) {
256  throw path_exception(path_selection_override, i, path.name)
257  << "The path name '" << spec.name
258  << "' has already been specified in the " << path_selection_override
259  << " sequence.\n"
260  << guidance(spec.name,
261  path_selection_override,
262  to_string(emplaced_path_id));
263  }
264  if (spec.path_id != emplaced_path_id) {
265  throw path_exception(path_selection_override, i, path.name)
266  << "The path name '" << spec.name
267  << "' has already been specified (perhaps implicitly) with a\n"
268  "path ID of "
269  << to_string(emplaced_path_id) << " (not "
270  << to_string(spec.path_id) << ") in the " << path_selection_override
271  << " sequence.\n\n"
272  << guidance(spec.name,
273  path_selection_override,
274  to_string(emplaced_path_id));
275  }
276  // Name is already present and the PathID has been explicitly
277  // listed and matches what has already been seen.
278  continue;
279  }
280 
281  if (spec.path_id == art::PathID::invalid()) {
282  spec.path_id =
283  art::PathID{i}; // Use calculated bit number if not specified
284  emplacement_result.first->second = spec.path_id;
285  }
286 
287  // Each ID must have only one name
288  if (auto const [it, inserted] =
289  id_to_name.try_emplace(spec.path_id, spec.name);
290  not inserted) {
291  throw path_exception(path_selection_override, i, path.name)
292  << "Path ID " << to_string(spec.path_id)
293  << " cannot be assigned to path name '" << spec.name
294  << "' as it has already been assigned to path name '" << it->second
295  << "'.\n";
296  }
297 
298  result.push_back(std::move(spec));
299  }
300  return result;
301  }
static QCString name
Definition: declinfo.cpp:673
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
static QCString result
std::string string
Definition: nybbler.cc:12
const double e
def move(depos, offset)
Definition: depos.py:107
constexpr static auto invalid() noexcept
Definition: PathSpec.h:20
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:82
PathSpec path_spec(std::string const &path_spec)
Definition: PathSpec.cc:22
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
std::string art::detail::print_allowed_configuration ( LibraryInfo const &  li,
std::string const &  prefix,
std::string const &  type_spec 
)

Definition at line 25 of file print_description_blocks.cc.

28  {
29  std::ostringstream result;
30  result << indent_1() << "Allowed configuration\n"
31  << indent_1() << "---------------------\n";
32 
33  std::string printedConfig{describe(li.allowed_config(), prefix)};
34  if (!type_spec.empty()) {
35  replace_type(printedConfig, li.short_spec(), regex_for_spec(type_spec));
36  }
37  result << printedConfig;
38  return result.str();
39  }
std::regex regex_for_spec(std::string const &)
static QCString result
std::string string
Definition: nybbler.cc:12
void replace_type(std::string &str, std::string const &spec, std::regex const &r)
std::string describe(cet::exempt_ptr< fhicl::ConfigurationTable const > pb, std::string const &prefix)
Definition: describe.cc:6
std::string indent_1()
void art::detail::print_available_plugins ( std::string const &  suffix,
std::string const &  spec,
bool  verbose 
)

Definition at line 105 of file AllowedConfiguration.cc.

108 {
109  auto coll = get_LibraryInfoCollection(suffix, spec, verbose);
110  if (coll.empty()) {
111  cout << "Unable to find any plugins with suffix '" << suffix << "'.\n";
112  return;
113  }
114 
115  auto ms = get_MetadataSummary(suffix, coll);
116 
117  cet::HorizontalRule const rule{rule_size(ms->widths())};
118  cout << '\n'
119  << rule('=') << '\n'
120  << ms->header() << '\n'
121  << rule('-') << '\n';
122 
123  std::size_t i{};
124  Duplicates_t duplicates;
125  for (auto const& info : coll) {
126  auto summary = ms->summary(info, ++i);
127  cout << summary.message;
128  if (summary.is_duplicate)
129  duplicates[info.short_spec()].push_back(info.long_spec());
130  }
131  cout << rule('=') << "\n\n";
132 
133  if (duplicates.empty())
134  return;
135 
136  duplicates_message(suffix, duplicates);
137  cout << '\n';
138 }
LibraryInfoCollection get_LibraryInfoCollection(std::string const &suffix, std::string const &pattern, bool verbose=false)
std::size_t rule_size(Widths const &widths)
static constexpr double ms
Definition: Units.h:96
std::unique_ptr< MetadataSummary > get_MetadataSummary(std::string const &suffix, LibraryInfoCollection const &coll)
verbose
Definition: train.py:477
def summary(store)
Definition: info.py:119
void art::detail::print_available_plugins ( std::string const &  suffix,
bool const  verbose 
)
inline

Definition at line 83 of file AllowedConfiguration.h.

84  {
86  }
verbose
Definition: train.py:477
void print_available_plugins(std::string const &suffix, bool const verbose)
constexpr char const * dflt_spec_pattern()
void art::detail::print_config_summary ( fhicl::ParameterSet const &  pset,
std::string const &  verbosity,
EnabledModules const &  enabled_modules 
)

Definition at line 184 of file print_config_summary.cc.

187 {
188  auto const process_name = pset.get<std::string>("process_name");
189  auto const source = pset.get<std::string>("source.module_type");
190  auto const services = pset.get<fhicl::ParameterSet>("services");
191  auto const physics = pset.get<fhicl::ParameterSet>("physics", {});
192  auto const analyzers = physics.get<fhicl::ParameterSet>("analyzers", {});
193  auto const filters = physics.get<fhicl::ParameterSet>("filters", {});
194  auto const producers = physics.get<fhicl::ParameterSet>("producers", {});
195  auto const outputs = pset.get<fhicl::ParameterSet>("outputs", {});
196 
197  std::cout << "Process name: " << process_name << '\n'
198  << "Source module: " << source << '\n';
199  if (verbosity == "brief") {
200  print_table_numbers(services, "Services");
201  print_table_numbers(producers, "Producers");
202  print_table_numbers(filters, "Filters");
203  print_table_numbers(analyzers, "Analyzers");
204  print_table_numbers(outputs, "Output modules");
205  print_path_numbers(enabled_modules);
206  return;
207  } else if (verbosity == "detailed") {
208  print_service_types(services);
209  std::cout << '\n' << header_rule('=') << '\n' << "Physics modules\n\n";
210  print_table_numbers(producers, "Producers");
211  print_table_numbers(filters, "Filters");
212  print_table_numbers(analyzers, "Analyzers");
213  print_module_types(outputs, "Output modules");
214  print_path_names(enabled_modules);
215  return;
216  } else if (verbosity == "full") {
217  print_service_types(services);
218  print_module_types(producers, "Producers");
219  print_module_types(filters, "Filters");
220  print_module_types(analyzers, "Analyzers");
221  print_module_types(outputs, "Output modules");
222  print_path_names(enabled_modules);
223  return;
224  }
226  << "Unrecognized configuration-summary verbosity level: '" << verbosity
227  << "'\n";
228 }
std::string string
Definition: nybbler.cc:12
void print_service_types(fhicl::ParameterSet const &pset)
void print_module_types(fhicl::ParameterSet const &pset, std::string const &header)
void print_table_numbers(fhicl::ParameterSet const &pset, std::string const &header)
T get(std::string const &key) const
Definition: ParameterSet.h:271
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void print_path_numbers(EnabledModules const &enabled_modules)
def filters(nticks=9600, tick=0.5 *units.us, npitches=3000, pitch=1.0)
Definition: __init__.py:555
void print_path_names(EnabledModules const &enabled_modules)
void art::detail::print_description ( std::vector< PluginMetadata > const &  matches)

Definition at line 164 of file AllowedConfiguration.cc.

165 {
166  for (auto const& m : matches) {
167  cout << m.header() << m.details() << m.allowed_configuration();
168  cout << '\n' << fixed_rule('=') << "\n\n";
169  }
170 }
void art::detail::print_descriptions ( std::vector< std::string > const &  plugins)

Definition at line 203 of file AllowedConfiguration.cc.

204 {
205  cout << '\n' << fixed_rule('=') << "\n\n";
206  for (auto const& spec : specs) {
207  auto const [plugin_type, instance_pattern] = parse_specified_plugin(spec);
208 
209  auto matches = matchesBySpec(plugin_type, instance_pattern);
210  if (matches.empty()) {
211  cout << indent0()
212  << (instance_pattern.empty() ? "[Missing specification]" :
213  cet::bold_fontify(instance_pattern))
214  << " did not match any plugin";
215  cout << (plugin_type.empty() ? "" : " of type '" + plugin_type + "'");
216  cout << ".\n";
217  cout << '\n' << fixed_rule('=') << "\n\n";
218  continue;
219  }
221  }
222 }
std::string bold_fontify(std::string const &s)
Definition: bold_fontify.h:8
std::string indent0()
void print_description(std::vector< PluginMetadata > const &matches)
std::string art::detail::print_header ( LibraryInfo const &  li,
std::string const &  type_spec 
)

Definition at line 11 of file print_description_blocks.cc.

12  {
13  std::ostringstream result;
14  std::string const long_spec =
15  li.long_spec().empty() ? " [ No alternate specification available ] " :
16  li.long_spec();
17  result << indent_1() << type_spec << ": "
18  << cet::bold_fontify(li.short_spec()) << " (or \"" << long_spec
19  << "\")"
20  << "\n\n";
21  return result.str();
22  }
static QCString result
std::string string
Definition: nybbler.cc:12
std::string indent_1()
std::string bold_fontify(std::string const &s)
Definition: bold_fontify.h:8
void art::detail::print_module_graph ( std::ostream &  os,
ModuleGraphInfoMap const &  modInfos,
ModuleGraph const &  graph 
)

Definition at line 484 of file graph_algorithms.cc.

487 {
488  std::set<Vertex> vertices;
489  std::map<path_name_t, std::set<EdgePair>> path_edges;
490  std::map<path_name_t, std::set<EdgePair>> filter_edges;
491  std::set<EdgePair> trigger_path_edges;
492  std::map<EdgePair, unsigned> product_edges;
493  graph_printer printer{info_map,
494  vertices,
495  path_edges,
496  filter_edges,
497  trigger_path_edges,
498  product_edges};
499  boost::depth_first_search(graph, visitor(printer));
500  os << "digraph {\n"
501  << " rankdir=BT\n";
502  // Vertices
503  for (auto const& v : vertices) {
504  auto const& name = info_map.name(v);
505  auto const& info = info_map.info(v);
506  if (name == "input_source") {
507  os << " \"input_source\"[shape=box label=source]";
508  } else if (name == "TriggerResults") {
509  os << " \"" << name << '\"';
510  os << "[shape=box style=filled fillcolor=black label=\"\" height=0.1 "
511  "width=2]";
512  } else {
513  os << " \"" << name << '\"';
514  if (info.module_type == art::ModuleType::filter) {
515  os << "[style=filled fillcolor=pink]";
516  }
517  }
518  os << ";\n";
519  }
520 
521  // Path edges
522  for (auto const& pr : path_edges) {
523  auto const& path_name = pr.first;
524  for (auto const& edge_pair : pr.second) {
525  os << " \"" << info_map.name(edge_pair.first) << "\" -> \""
526  << info_map.name(edge_pair.second) << '\"' << "[label=\"" << path_name
527  << "\" color=gray];\n";
528  }
529  }
530 
531  // Filter edges
532  for (auto const& pr : filter_edges) {
533  auto const& path_name = pr.first;
534  for (auto const& edge_pair : pr.second) {
535  os << " \"" << info_map.name(edge_pair.first) << "\" -> \""
536  << info_map.name(edge_pair.second) << '\"' << "[label=\"" << path_name
537  << "\" color=red];\n";
538  }
539  }
540 
541  // Trigger-path edges
542  for (auto const& edge_pair : trigger_path_edges) {
543  os << " \"" << info_map.name(edge_pair.first) << "\" -> \""
544  << info_map.name(edge_pair.second) << '\"'
545  << "[style=invisible arrowhead=none];\n";
546  }
547 
548  // Product edges
549  for (auto const& pr : product_edges) {
550  auto const& edge_pair = pr.first;
551  auto const multiplicity = pr.second;
552  os << " \"" << info_map.name(edge_pair.first) << "\" -> \""
553  << info_map.name(edge_pair.second) << '\"';
554  if (multiplicity > 1) {
555  os << "[label=\"" << multiplicity << "\" color=black]";
556  }
557  os << ";\n";
558  }
559  os << "}\n";
560 }
static QCString name
Definition: declinfo.cpp:673
def graph(desc, maker=maker)
Definition: apa.py:294
void art::detail::print_module_types ( fhicl::ParameterSet const &  pset,
std::string const &  header 
)

Definition at line 147 of file print_config_summary.cc.

149 {
150  std::cout << '\n' << header_rule('=') << "\n";
151  print_table_numbers(pset, header);
152 
153  auto const names = pset.get_names();
154  if (empty(names)) {
155  return;
156  }
157 
158  std::cout << "\n";
159  std::string column_1{"Module label"};
160  std::string column_2{"module_type"};
161  auto column_1_width = size(column_1);
162  auto column_2_width = size(column_2);
163  for (auto const& name : names) {
164  auto const module_type =
165  pset.get<std::string>(fhicl_key(name, "module_type"));
166  column_1_width = std::max(column_1_width, size(name));
167  column_2_width = std::max(column_2_width, size(module_type));
168  }
169 
170  cet::HorizontalRule const rule_1{column_1_width};
171  cet::HorizontalRule const rule_2{column_2_width};
172  std::cout << std::left << std::setw(column_1_width) << column_1 << " "
173  << column_2 << '\n'
174  << rule_1('-') << " " << rule_2('-') << '\n';
175  for (auto const& name : names) {
176  auto const module_type =
177  pset.get<std::string>(fhicl_key(name, "module_type"));
178  std::cout << std::left << std::setw(column_1_width) << name << " "
179  << module_type << '\n';
180  }
181 }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
ModuleType module_type(std::string const &full_key)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void print_table_numbers(fhicl::ParameterSet const &pset, std::string const &header)
std::enable_if_t< std::is_convertible_v< T, std::string >, std::string > fhicl_key(T const &name)
Definition: fhicl_key.h:12
static int max(int a, int b)
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
static std::vector< std::string > const names
Definition: FragmentType.hh:8
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97
void art::detail::print_path_names ( EnabledModules const &  enabled_modules)

Definition at line 38 of file print_config_summary.cc.

39 {
40  {
41  auto const& trigger_paths = enabled_modules.trigger_path_specs();
42  std::cout << '\n'
43  << header_rule('=') << '\n'
44  << "Trigger paths: " << size(trigger_paths) << "\n"
45  << (enabled_modules.trigger_paths_override() ?
46  " -> 'trigger_paths' specified\n\n" :
47  "\n");
48  if (empty(trigger_paths)) {
49  return;
50  }
51 
52  std::string column_0{"Bit"};
53  std::string column_1{"Path name"};
54  std::string column_2{"Path size"};
55 
56  auto column_1_width = size(column_1);
57  for (auto const& pr : trigger_paths) {
58  column_1_width = std::max(column_1_width, size(pr.first.name));
59  }
60 
61  std::cout << column_0 << " " << std::left << std::setw(column_1_width)
62  << column_1 << " " << column_2 << '\n'
63  << "---"
64  << " " << std::string(column_1_width, '-') << " "
65  << std::string(size(column_2), '-') << '\n';
66  for (auto const& [path_spec, entries] :
67  enabled_modules.trigger_path_specs()) {
68  std::cout << std::right << std::setw(3) << to_string(path_spec.path_id)
69  << " " << std::left << std::setw(column_1_width)
70  << path_spec.name << " " << size(entries) << '\n';
71  }
72  }
73 
74  {
75  auto const& end_paths = enabled_modules.end_paths();
76 
77  std::cout << '\n'
78  << header_rule('=') << '\n'
79  << "End paths: " << size(end_paths) << '\n'
80  << (enabled_modules.end_paths_override() ?
81  " -> 'end_paths' specified\n\n" :
82  "\n");
83 
84  if (empty(end_paths)) {
85  return;
86  }
87 
88  std::string column_1{"Path name"};
89  std::string column_2{"Path size"};
90  auto column_1_width = size(column_1);
91  for (auto const& pr : end_paths) {
92  column_1_width = std::max(column_1_width, size(pr.first.name));
93  }
94 
95  std::cout << std::left << std::setw(column_1_width) << column_1 << " "
96  << column_2 << '\n'
97  << std::string(column_1_width, '-') << " "
98  << std::string(size(column_2), '-') << '\n';
99  for (auto const& [path_spec, entries] : end_paths) {
100  std::cout << std::left << std::setw(column_1_width) << path_spec.name
101  << " " << size(entries) << '\n';
102  }
103  }
104 }
std::string string
Definition: nybbler.cc:12
PathID path_id
Definition: PathSpec.h:49
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static int max(int a, int b)
std::string name
Definition: PathSpec.h:48
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
PathSpec path_spec(std::string const &path_spec)
Definition: PathSpec.cc:22
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97
void art::detail::print_path_numbers ( EnabledModules const &  enabled_modules)

Definition at line 24 of file print_config_summary.cc.

25 {
26  std::cout << "Trigger paths: " << size(enabled_modules.trigger_path_specs())
27  << '\n'
28  << (enabled_modules.trigger_paths_override() ?
29  " -> 'trigger_paths' specified\n" :
30  "")
31  << "End paths: " << size(enabled_modules.end_paths()) << '\n'
32  << (enabled_modules.end_paths_override() ?
33  " -> 'end_paths' specified\n" :
34  "");
35 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void art::detail::print_service_types ( fhicl::ParameterSet const &  pset)

Definition at line 107 of file print_config_summary.cc.

108 {
109  std::cout << '\n' << header_rule('=') << '\n';
110  print_table_numbers(pset, "Services");
111  std::cout << "\n";
112 
113  auto const names = pset.get_names();
114 
115  std::string column_1{"Service name"};
116  auto column_1_width = size(column_1);
117  auto column_2_width = std::string::size_type{};
118  for (auto const& name : names) {
119  auto const service_provider =
120  pset.get<std::string>(fhicl_key(name, "service_provider"), {});
121  column_1_width = std::max(column_1_width, size(name));
122  column_2_width = std::max(column_2_width, size(service_provider));
123  }
124 
125  cet::HorizontalRule const rule_1{column_1_width};
126  if (column_2_width == 0ull) {
127  std::cout << column_1 << '\n' << rule_1('-') << '\n';
128  for (auto const& name : names) {
129  std::cout << std::left << std::setw(column_1_width) << name << '\n';
130  }
131  } else {
132  std::string const column_2{"service_provider"};
133  cet::HorizontalRule const rule_2{std::max(column_2_width, size(column_2))};
134  std::cout << std::left << std::setw(column_1_width) << column_1 << " "
135  << column_2 << '\n'
136  << rule_1('-') << " " << rule_2('-') << '\n';
137  for (auto const& name : names) {
138  auto const service_provider =
139  pset.get<std::string>(fhicl_key(name, "service_provider"), "-");
140  std::cout << std::left << std::setw(column_1_width) << name << " "
141  << service_provider << '\n';
142  }
143  }
144 }
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void print_table_numbers(fhicl::ParameterSet const &pset, std::string const &header)
std::enable_if_t< std::is_convertible_v< T, std::string >, std::string > fhicl_key(T const &name)
Definition: fhicl_key.h:12
static int max(int a, int b)
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
static std::vector< std::string > const names
Definition: FragmentType.hh:8
void art::detail::print_table_numbers ( fhicl::ParameterSet const &  pset,
std::string const &  header 
)

Definition at line 16 of file print_config_summary.cc.

18 {
19  auto const names = pset.get_names();
20  std::cout << header << ": " << size(names) << '\n';
21 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static std::vector< std::string > const names
Definition: FragmentType.hh:8
art::detail::EnabledModules art::detail::prune_config_if_enabled ( bool  prune_config,
bool  report_enabled,
fhicl::intermediate_table config 
)

Definition at line 575 of file prune_configuration.cc.

578 {
579  auto const modules = declared_modules(config, module_tables);
580 
581  auto paths = all_paths(config);
582 
583  auto [trigger_paths, trigger_paths_override] =
584  enabled_paths(paths, modules, ModuleCategory::modifier);
585  auto [end_paths, end_paths_override] =
586  enabled_paths(paths, modules, ModuleCategory::observer);
587 
588  auto enabled_modules =
589  get_enabled_modules(modules, trigger_paths, ModuleCategory::modifier);
590  // C++17 provides the std::map::merge member function, but Clang 7
591  // and older does not support it. Will do it by hand for now, until
592  // we have time to handle this properly.
593  auto end_path_enabled_modules =
594  get_enabled_modules(modules, end_paths, ModuleCategory::observer);
595  enabled_modules.insert(begin(end_path_enabled_modules),
596  end(end_path_enabled_modules));
597 
598  modules_t unused_modules;
599  for (auto const& pr : modules) {
600  if (enabled_modules.find(pr.first) == cend(enabled_modules)) {
601  unused_modules.insert(pr);
602  }
603  }
604 
605  // Find unused paths
606  paths.erase("trigger_paths");
607  paths.erase("end_paths");
608  for (auto const& pr : trigger_paths) {
609  paths.erase(pr.first.name);
610  }
611  for (auto const& pr : end_paths) {
612  paths.erase(pr.first.name);
613  }
614 
615  // The only paths left are those that are not enabled for execution.
616  if (report_enabled && !empty(paths)) {
617  std::cerr << "The following paths have not been enabled for execution and "
618  "will be ignored:\n";
619  for (auto const& pr : paths) {
620  std::cerr << " " << pr.first << '\n';
621  }
622  }
623 
624  if (report_enabled && !empty(unused_modules)) {
625  std::ostringstream os;
626  os << "The following module label"
627  << ((unused_modules.size() == 1) ? " is" : "s are")
628  << " either not assigned to any path,\n"
629  << "or " << ((unused_modules.size() == 1ull) ? "it has" : "they have")
630  << " been assigned to ignored path(s):\n";
631  for (auto const& pr : unused_modules) {
632  os << " " << pr.first << '\n';
633  }
634  std::cerr << os.str();
635  }
636 
637  if (prune_config) {
638  for (auto const& pr : paths) {
639  config.erase(fhicl_key("physics", pr.first));
640  }
641  for (auto const& pr : unused_modules) {
642  config.erase(pr.second);
643  }
644 
645  // Check if module tables can be removed
646  for (auto const& table_name : module_tables) {
647  if (not exists_outside_prolog(config, table_name)) {
648  continue;
649  }
650  if (table_t const value = config.find(table_name); empty(value)) {
651  config.erase(table_name);
652  }
653  }
654 
655  // Check if top-level physics table can be removed
656  if (exists_outside_prolog(config, "physics")) {
657  if (table_t const value = config.find("physics"); empty(value)) {
658  config.erase("physics");
659  }
660  }
661  }
662 
663  // Place 'trigger_paths' as top-level configuration table
664  if (trigger_paths_override) {
665  std::vector<std::string> explicit_entries;
666  cet::transform_all(trigger_paths,
667  back_inserter(explicit_entries),
668  [](auto const& pr) { return to_string(pr.first); });
669  config.put("trigger_paths.trigger_paths", explicit_entries);
670  }
671 
672  return EnabledModules{std::move(enabled_modules),
673  std::move(trigger_paths),
674  std::move(end_paths),
675  trigger_paths_override,
676  end_paths_override};
677 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
bool exists_outside_prolog(fhicl::intermediate_table const &config, std::string const &key)
std::map< std::string, std::string > modules_t
def move(depos, offset)
Definition: depos.py:107
std::enable_if_t< std::is_convertible_v< T, std::string >, std::string > fhicl_key(T const &name)
Definition: fhicl_key.h:12
bool put(std::string const &name, std::string const &value, bool in_prolog=false)
auto transform_all(Container &, OutputIt, UnaryOp)
void erase(std::string const &key, bool in_prolog=false)
extended_value const & find(std::string const &key) const
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97
constexpr bool art::detail::range_sets_supported ( BranchType const  bt)

Definition at line 10 of file RangeSetsSupported.h.

11  {
12  return bt == InRun || bt == InSubRun;
13  }
bt
Definition: tracks.py:83
std::regex art::detail::regex_for_spec ( std::string const &  spec)

Definition at line 6 of file MetadataRegexHelpers.cc.

7 {
8  return std::regex{"(" + spec + "\\s*:\\s*)(:?<string>)"};
9 }
void art::detail::remove_whitespace ( std::string str)

Definition at line 11 of file remove_whitespace.cc.

12 {
13  boost::remove_erase_if(str, boost::is_any_of(whitespace_chars));
14 }
static QCString str
void art::detail::replace_type ( std::string str,
std::string const &  spec,
std::regex const &  r 
)

Definition at line 12 of file MetadataRegexHelpers.cc.

15 {
16  str = std::regex_replace(str, r, "$1"s + spec);
17 }
static QCString * s
Definition: config.cpp:1042
static QCString str
std::size_t art::detail::rule_size ( Widths const &  widths)
inline

Definition at line 68 of file PrintFormatting.h.

69  {
70  std::size_t result{indent0().size()};
71  for (std::size_t const w : widths)
72  result += w;
73  return result +=
74  (widths.size() - 1) * 4u; // Account for space between columns;
75  }
static QCString result
std::string indent0()
std::vector< ModuleSpec > art::detail::sequence_to_entries ( sequence_t const &  seq,
bool const  allow_nil_entries 
)

Definition at line 172 of file prune_configuration.cc.

173  {
174  std::vector<ModuleSpec> result;
175  for (auto const& ev : seq) {
176  if (allow_nil_entries and ev.is_a(NIL)) {
177  result.push_back({at_nil, FilterAction::Normal});
178  continue;
179  }
180  if (!ev.is_a(STRING)) {
181  continue;
182  }
183  auto mod_spec = ev.to_string();
184  if (empty(mod_spec)) {
185  continue;
186  }
187  boost::replace_all(mod_spec, "\"", "");
189  if (mod_spec[0] == '!') {
190  action = FilterAction::Veto;
191  mod_spec = mod_spec.substr(1);
192  } else if (mod_spec[0] == '-') {
193  action = FilterAction::Ignore;
194  mod_spec = mod_spec.substr(1);
195  }
196 
197  // Handle remaining '!' or '-' characters
198  if (mod_spec.find_first_of("!-") != std::string::npos) {
199  throw config_exception("There was an error parsing the entry "s +
200  ev.to_string() + "in a FHiCL sequence.")
201  << "The '!' or '-' character may appear as only the first character "
202  "in the path entry.\n";
203  }
204  result.push_back({mod_spec, action});
205  }
206 
207  if (result.size() != seq.size()) {
208  throw config_exception("There was an error parsing the specified entries "
209  "in a FHiCL sequence.")
210  << "One of the presented elements is either an empty string or not a "
211  "string at all.\n";
212  }
213  return result;
214  }
static void replace_all(std::string &str, const std::string &old, const std::string &repl)
static QCString result
Definition: types.h:29
static QCString * s
Definition: config.cpp:1042
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:97
bool art::detail::skip_non_replicated ( Worker const &  w)

Definition at line 6 of file skip_non_replicated.cc.

7 {
8  if (w.scheduleID() == ScheduleID::first()) {
9  return false;
10  }
11  bool const is_replicated{w.description().moduleThreadingType() ==
12  ModuleThreadingType::replicated};
13  return !is_replicated;
14 }
art::BranchKey art::detail::splitToComponents ( std::string const &  branchName,
std::string errMsg 
)

Definition at line 46 of file branchNameComponentChecking.cc.

48 {
49  std::vector<std::string> parts;
50  boost::split(parts, branchName, boost::is_any_of("_"));
51  if (parts.size() != 4) {
52  errMsg += "Illegal product name specification \"" + branchName + "\".\n";
53  }
54  return BranchKey(std::move(parts[0]),
55  std::move(parts[1]),
56  std::move(parts[2]),
57  std::move(parts[3]));
58 }
def move(depos, offset)
Definition: depos.py:107
void split(std::string const &s, char c, OutIter dest)
Definition: split.h:35
bool art::detail::supports_key ( std::string const &  suffix,
std::string const &  spec,
std::string const &  key 
)

Definition at line 141 of file AllowedConfiguration.cc.

144 {
145  art::Exception e{art::errors::LogicError, "art::detail::supports_key"};
146  auto coll = get_LibraryInfoCollection(suffix, spec);
147  if (coll.empty()) {
148  throw e << (spec.empty() ? "[Missing specification]" :
149  cet::bold_fontify(spec))
150  << " did not match any plugin.\n";
151  } else if (coll.size() > 1ull) {
152  throw e << cet::bold_fontify(spec) << " matched more than one plugin.\n"
153  << "When querying plugin configurations, the plugin specification\n"
154  << "must resolve to a unique library.\n";
155  }
156  if (auto config = coll.begin()->allowed_config()) {
158  *config->parameter_base(), key);
159  }
160  return false;
161 }
LibraryInfoCollection get_LibraryInfoCollection(std::string const &suffix, std::string const &pattern, bool verbose=false)
const double e
def key(type, name=None)
Definition: graph.py:13
static Config * config
Definition: config.cpp:1054
std::string bold_fontify(std::string const &s)
Definition: bold_fontify.h:8
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
static bool supports_key(ParameterBase const &pb, std::string const &searched_for_key)
template<typename... T>
void art::detail::throw_if_invalid ( std::string const &  msg,
T const &...  t 
)

Definition at line 63 of file Handle.h.

64  {
65  bool const all_valid = true && (... && t.isValid());
66  if (!all_valid) {
68  }
69  }
void msg(const char *fmt,...)
Definition: message.cpp:107
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::detail::throwPartnerException ( std::type_info const &  generator,
std::type_info const &  wanted_wrapper_type 
)

Definition at line 6 of file throwPartnerException.cc.

8 {
9  throw Exception(errors::LogicError, "makePartner")
10  << "Attempted to make type "
11  << cet::demangle_symbol(wanted_wrapper_type.name())
12  << " which is not a valid wrapped partner of "
13  << cet::demangle_symbol(generator.name())
14  << "\nPlease report to the ART framework developers.\n";
15 }
generator
Definition: train.py:468
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::detail::timeReport ( cet::cpu_timer const &  timer)

Definition at line 298 of file writeSummary.cc.

299 {
300  LogPrint("ArtSummary") << "TimeReport "
301  << "---------- Time summary [sec] -------";
302  LogPrint("ArtSummary") << "TimeReport " << setprecision(6) << fixed
303  << "CPU = " << timer.cpuTime()
304  << " Real = " << timer.realTime();
305 }
Q_EXPORT QTSManip setprecision(int p)
Definition: qtextstream.h:343
MaybeLogger_< ELseverityLevel::ELsev_warning, true > LogPrint
void art::detail::triggerReport ( PerScheduleContainer< PathsInfo > const &  endPathInfo,
PerScheduleContainer< PathsInfo > const &  triggerPathsInfo,
bool  wantSummary 
)

Definition at line 104 of file writeSummary.cc.

107 {
108  // Checking the first element is sufficient since the path
109  // structures are identical across schedules/end-path executors.
110  auto observers_enabled = !epis[ScheduleID::first()].paths().empty();
111 
112  SummaryCounts total_counts{};
113  for (auto const& tpi : tpis) {
114  total_counts.total += tpi.totalEvents();
115  total_counts.passed += tpi.passedEvents();
116  total_counts.failed += tpi.failedEvents();
117  }
118  // The trigger report (pass/fail etc.):
119  // Printed even if summary not requested, per issue #1864.
120  LogPrint("ArtSummary") << "TrigReport "
121  << "---------- Event summary -------------";
122  LogPrint("ArtSummary") << "TrigReport"
123  << " Events total = " << total_counts.total
124  << " passed = " << total_counts.passed
125  << " failed = " << total_counts.failed;
126 
127  if (wantSummary) {
128  LogPrint("ArtSummary") << "";
129  LogPrint("ArtSummary") << "TrigReport "
130  << "---------- Trigger-path summary ------------";
131  LogPrint("ArtSummary") << "TrigReport " << std::right << setw(10)
132  << "Path ID"
133  << " " << std::right << setw(10) << "Run"
134  << " " << std::right << setw(10) << "Passed"
135  << " " << std::right << setw(10) << "Failed"
136  << " " << std::right << setw(10) << "Error"
137  << " "
138  << "Name";
139  std::map<PathID, TriggerCounts> counts_per_path{};
140  for (auto const& tpi : tpis) {
141  for (auto const& path : tpi.paths()) {
142  auto& counts = counts_per_path[path.pathID()];
143  counts.path_name = path.name(); // No increment!
144  counts.run += path.timesRun();
145  counts.passed += path.timesPassed();
146  counts.failed += path.timesFailed();
147  counts.except += path.timesExcept();
148  }
149  }
150  for (auto const& [pathID, counts] : counts_per_path) {
151  LogPrint("ArtSummary")
152  << "TrigReport " << std::right << setw(10) << to_string(pathID) << " "
153  << std::right << setw(10) << counts.run << " " << std::right << setw(10)
154  << counts.passed << " " << std::right << setw(10) << counts.failed
155  << " " << std::right << setw(10) << counts.except << " "
156  << counts.path_name;
157  }
158 
159  LogPrint("ArtSummary") << "";
160  LogPrint("ArtSummary") << "TrigReport "
161  << "---------- End-path summary ---------";
162  LogPrint("ArtSummary") << "TrigReport"
163  << " " << std::right << setw(10) << "Run"
164  << " " << std::right << setw(10) << "Success"
165  << " " << std::right << setw(10) << "Error";
166 
167  if (observers_enabled) {
168  EndPathCounts epCounts{};
169  for (auto const& epi : epis) {
170  for (auto const& path : epi.paths()) {
171  epCounts.run += path.timesRun();
172  epCounts.success += path.timesPassed();
173  epCounts.except += path.timesExcept();
174  }
175  }
176  LogPrint("ArtSummary")
177  << "TrigReport " << std::right << setw(10) << epCounts.run << " "
178  << std::right << setw(10) << epCounts.success << " " << std::right
179  << setw(10) << epCounts.except;
180  }
181 
182  std::map<PathSpec, WorkersInPathCounts> counts_per_worker_in_path;
183  for (auto const& tpi : tpis) {
184  for (auto const& path : tpi.paths()) {
185  auto& counts_per_worker = counts_per_worker_in_path[path.pathSpec()];
186  if (counts_per_worker.empty() && !path.workersInPath().empty()) {
187  counts_per_worker.resize(path.workersInPath().size());
188  }
189  std::size_t i{};
190  for (auto const& workerInPath : path.workersInPath()) {
191  auto const* worker = workerInPath.getWorker();
192  auto& counts = counts_per_worker[i];
193  if (counts.moduleLabel.empty()) {
194  counts.moduleLabel = worker->description().moduleLabel();
195  }
196  counts.visited += workerInPath.timesVisited();
197  counts.passed += workerInPath.timesPassed();
198  counts.failed += workerInPath.timesFailed();
199  counts.except += workerInPath.timesExcept();
200  ++i;
201  }
202  }
203  }
204  for (auto const& [path_spec, worker_in_path_counts] :
205  counts_per_worker_in_path) {
206  LogPrint("ArtSummary") << "";
207  LogPrint("ArtSummary")
208  << "TrigReport "
209  << "---------- Modules in path: " << path_spec.name << " ------------";
210  LogPrint("ArtSummary")
211  << "TrigReport " << std::right << setw(10) << "Path ID"
212  << " " << std::right << setw(10) << "Visited"
213  << " " << std::right << setw(10) << "Passed"
214  << " " << std::right << setw(10) << "Failed"
215  << " " << std::right << setw(10) << "Error"
216  << " "
217  << "Name";
218  workersInPathTriggerReport(path_spec.path_id, worker_in_path_counts);
219  }
220  }
221 
222  // Printed even if summary not requested, per issue #1864.
223  WorkersInPathCounts endPathWIPCounts;
224  for (auto const& epi : epis) {
225  for (auto const& path : epi.paths()) {
226  if (endPathWIPCounts.empty() && !path.workersInPath().empty()) {
227  endPathWIPCounts.resize(path.workersInPath().size());
228  }
229  std::size_t i{};
230  for (auto const& workerInPath : path.workersInPath()) {
231  auto const* worker = workerInPath.getWorker();
232  auto& counts = endPathWIPCounts[i];
233  if (counts.moduleLabel.empty()) {
234  counts.moduleLabel = worker->description().moduleLabel();
235  }
236  counts.visited += worker->timesRun(); // proxy for 'visited'
237  counts.passed += worker->timesPassed();
238  counts.except += worker->timesExcept();
239  ++i;
240  }
241  }
242  }
243 
244  if (observers_enabled) {
245  LogPrint("ArtSummary") << "";
246  LogPrint("ArtSummary") << "TrigReport "
247  << "---------- Modules in End-path ----------";
248  LogPrint("ArtSummary") << "TrigReport"
249  << " " << std::right << setw(10) << "Run"
250  << " " << std::right << setw(10) << "Success"
251  << " " << std::right << setw(10) << "Error"
252  << " "
253  << "Name";
254  workersInEndPathTriggerReport(endPathWIPCounts);
255  }
256 
257  if (wantSummary) {
258  // This table can arguably be removed since all summary
259  // information is better described above.
260  LogPrint("ArtSummary") << "";
261  LogPrint("ArtSummary") << "TrigReport "
262  << "---------- Module summary ------------";
263  LogPrint("ArtSummary") << "TrigReport " << std::right << setw(10)
264  << "Visited"
265  << " " << std::right << setw(10) << "Run"
266  << " " << std::right << setw(10) << "Passed"
267  << " " << std::right << setw(10) << "Failed"
268  << " " << std::right << setw(10) << "Error"
269  << " "
270  << "Name";
271  std::map<std::string, ModuleCounts> counts_per_module;
272  auto update_counts = [&counts_per_module](auto const& pathInfos) {
273  for (auto const& pi : pathInfos) {
274  for (auto const& [module_label, module_counts] : pi.workers()) {
275  auto& counts = counts_per_module[module_label];
276  counts.visited += module_counts->timesVisited();
277  counts.run += module_counts->timesRun();
278  counts.passed += module_counts->timesPassed();
279  counts.failed += module_counts->timesFailed();
280  counts.except += module_counts->timesExcept();
281  }
282  }
283  };
284  update_counts(tpis);
285  update_counts(epis);
286  for (auto const& [module_label, module_counts] : counts_per_module) {
287  LogPrint("ArtSummary")
288  << "TrigReport " << std::right << setw(10) << module_counts.visited
289  << " " << std::right << setw(10) << module_counts.run << " "
290  << std::right << setw(10) << module_counts.passed << " " << std::right
291  << setw(10) << module_counts.failed << " " << std::right << setw(10)
292  << module_counts.except << " " << module_label;
293  }
294  }
295 }
PathID path_id
Definition: PathSpec.h:49
counts_as<> counts
Number of ADC counts, represented by signed short int.
Definition: electronics.h:116
std::string name
Definition: PathSpec.h:48
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
PathSpec path_spec(std::string const &path_spec)
Definition: PathSpec.cc:22
float pi
Definition: units.py:11
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
MaybeLogger_< ELseverityLevel::ELsev_warning, true > LogPrint
TypeLabel art::detail::type_label_for ( TypeID const  typeID,
std::string const &  instance,
bool const  supportsView,
ModuleDescription const &  md 
)
inline

Definition at line 10 of file type_label_for.h.

14  {
15  if (md.isEmulatedModule()) {
16  return TypeLabel{typeID, instance, supportsView, md.moduleLabel()};
17  }
18  return TypeLabel{typeID, instance, supportsView, false};
19  }
const std::string instance
bool art::detail::upcastAllowed ( std::type_info const &  tiFrom,
std::type_info const &  tiTo 
)
void art::detail::validateFileNamePattern ( bool  do_check,
std::string const &  pattern 
)

Definition at line 7 of file validateFileNamePattern.cc.

9 {
10  if (!do_check)
11  return;
12 
13  if (std::regex_search(pattern, std::regex("%(\\d*)#"))) {
14  return;
15  }
16 
18  << "If you have specified the 'fileProperties' table in your "
19  "configuration,\n"
20  << "then the file pattern '%#' MUST be present in the file name. For "
21  "example:\n"
22  << " " << pattern.substr(0, pattern.find(".root")) << "_%#.root\n"
23  << "is a supported file name. Please change your file name to include "
24  "the '%#' pattern.";
25 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string pattern
Definition: regex_t.cc:35
std::string art::detail::verify_in_order_dependencies ( ModuleGraphInfoMap const &  modules,
paths_to_modules_t const &  trigger_paths 
)

Definition at line 296 of file graph_algorithms.cc.

299 {
300  // Precondition: there are no inter-path dependencies
301  std::map<module_name_t, name_set_t> illegal_module_orderings;
302  for (auto const& module : modInfos) {
303  auto const& module_name = module.first;
304  auto const module_type = module.second.module_type;
305  auto const& module_paths = module.second.paths;
306  if (!is_modifier(module_type)) {
307  continue;
308  }
309  if (module_paths.empty()) {
310  continue;
311  }
312  // Only need to check one path since when we call this function,
313  // we have already guaranteed that there are no interpath
314  // dependencies.
315  auto const& first_path_for_module = *cbegin(module_paths);
316  auto const& path_it = std::find_if(trigger_paths.cbegin(),
317  trigger_paths.cend(),
318  path_matches{first_path_for_module});
319  assert(path_it != trigger_paths.cend());
320  auto const begin = cbegin(path_it->second);
321  auto const end = cend(path_it->second);
322  auto const module_position =
323  std::find_if(begin, end, module_matches{module_name});
324  assert(module_position != end);
325 
326  for (auto const& dep : module.second.consumed_products) {
327  if (dep.label == "input_source") {
328  continue;
329  }
330  auto const dep_position =
331  std::find_if(begin, end, module_matches{dep.label});
332  assert(dep_position != end);
333  if (dep_position < module_position) {
334  continue;
335  }
336  illegal_module_orderings[module_name].insert(dep.label);
337  }
338  }
339 
340  if (illegal_module_orderings.empty()) {
341  return {};
342  }
343 
344  std::ostringstream oss;
345  oss << "\nThe following are module-ordering errors due to declared "
346  "data-product dependencies:\n";
347  for (auto const& mod : illegal_module_orderings) {
348  auto const& module_name = mod.first;
349  auto const mod_index = modInfos.vertex_index(module_name);
350  auto const& module_paths = modInfos.info(mod_index).paths;
351  oss << " Module " << module_name << " on path"
352  << (module_paths.size() == 1ull ? " " : "s ")
353  << comma_separated_list(module_paths)
354  << " depends on either itself or modules that follow it:\n";
355  for (auto const& dep_name : mod.second) {
356  auto const dep_index = modInfos.vertex_index(dep_name);
357  auto const& on_paths = modInfos.info(dep_index).paths;
358  oss << " Module " << dep_name << " on path"
359  << (on_paths.size() == 1ull ? " " : "s ")
360  << comma_separated_list(on_paths)
361  << (module_name == dep_name ? " (self circularity)" : "") << '\n';
362  }
363  }
364  return oss.str();
365 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:87
ModuleType module_type(std::string const &full_key)
bool is_modifier(ModuleType const mt)
Definition: ModuleType.h:22
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:82
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
std::string art::detail::verify_no_interpath_dependencies ( ModuleGraphInfoMap const &  modInfos,
ModuleGraph const &  graph 
)

Definition at line 209 of file graph_algorithms.cc.

212 {
213  std::map<Vertex, std::set<Vertex>> illegal_dependencies;
214  auto const children_iters = graph.children();
215  for (auto ci = children_iters.first, ci_end = children_iters.second;
216  ci != ci_end;
217  ++ci) {
218  auto const& path_graph = *ci;
219  auto const vertex_iters = vertices(path_graph);
220  for (auto i = vertex_iters.first, end = vertex_iters.second; i != end;
221  ++i) {
222  auto const gv = path_graph.local_to_global(*i);
223  auto const out_edge_iters = out_edges(gv, graph);
224  // Verify that the target of each out edge is a member of the
225  // same subgraph (which is determined by calling find_vertex).
226  // If not, then it is an illegal path specification.
227  for (auto ei = out_edge_iters.first, edge_end = out_edge_iters.second;
228  ei != edge_end;
229  ++ei) {
230  auto const tv = target(*ei, graph);
231  if (path_graph.find_vertex(tv).second) {
232  continue;
233  }
234  illegal_dependencies[gv].insert(tv);
235  }
236  }
237  }
238 
239  if (illegal_dependencies.empty()) {
240  return {};
241  }
242 
243  std::ostringstream oss;
244  oss << "\nThe following represent cross-path data-dependency errors:\n"
245  << cet::HorizontalRule{60}('-') << '\n';
246  for (auto const& mod : illegal_dependencies) {
247  auto const mod_index = mod.first;
248  auto const& module_name = modInfos.name(mod_index);
249  auto const& mod_paths = modInfos.info(mod_index).paths;
250  oss << " Module " << module_name << " on path"
251  << (mod_paths.size() == 1ull ? " " : "s ")
252  << comma_separated_list(mod_paths) << " depends on\n";
253  for (auto const& dep : mod.second) {
254  auto const& dep_name = modInfos.name(dep);
255  auto const& on_paths = modInfos.info(dep).paths;
256  oss << " Module " << dep_name << " on path"
257  << (on_paths.size() == 1ull ? " " : "s ")
258  << comma_separated_list(on_paths) << '\n';
259  }
260  }
261  oss << "\nSuch errors occur whenever a module on one path depends on the "
262  "data products\n"
263  << "from another. Such dependencies can be subtle--for example, a "
264  "module that\n"
265  << "uses an event.getManyByType call cannot be shared across paths if "
266  "the modules\n"
267  << "that precede it in the paths do not give consistent result. Please "
268  "check your\n"
269  << "configuration, or email artists@fnal.gov for assistance.\n";
270  return oss.str();
271 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
def graph(desc, maker=maker)
Definition: apa.py:294
void art::detail::verifyFriendlyClassName ( std::string const &  fcn)

Definition at line 16 of file verify_names.cc.

17 {
18  if (fcn.find('_') != std::string::npos) {
20  << "Class \"" << fcn
21  << "\" is not suitable for use as a product due to the presence of "
22  << "underscores which are not allowed anywhere in the class name "
23  << "(including namespace and enclosing classes).\n";
24  }
25 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::detail::verifyInstanceName ( std::string const &  in)

Definition at line 5 of file verify_names.cc.

6 {
7  if (instanceName.find('_') != std::string::npos) {
9  << "Instance name \"" << instanceName
10  << "\" is illegal: underscores are not permitted in instance names."
11  << '\n';
12  }
13 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
template<typename T >
bool art::detail::verifyPtrCollection ( std::vector< art::PtrVector< T > const * > const &  in)

Definition at line 202 of file CollectionUtilities.h.

204 {
205  return verifyPtrCollection(in.begin(), in.end());
206 }
bool verifyPtrCollection(iterator beg, iterator end, art::ProductID id={}, art::EDProductGetter const *getter=nullptr)
template<typename iterator >
bool art::detail::verifyPtrCollection ( iterator  beg,
iterator  end,
art::ProductID  id = {},
art::EDProductGetter const *  getter = nullptr 
)

Definition at line 211 of file CollectionUtilities.h.

215 {
216  if (beg == end)
217  return true;
218  if (!id.isValid()) {
219  id = (*beg).id();
220  }
221  if (!getter) {
222  getter = (*beg).productGetter();
223  }
224  for (iterator i = beg; i != end; ++i) {
225  if ((*i) != nullptr &&
226  !((*i)->productGetter() && (*i)->productGetter() == getter &&
227  (*i)->id().isValid() && (*i)->id() == id)) {
228  return false;
229  }
230  }
231  return true;
232 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
template<typename T >
auto art::detail::wrapperTypeID ( )
inline

Definition at line 9 of file ProductTypeIDs.h.

10  {
11  return TypeID{typeid(art::Wrapper<T>)};
12  }
void art::detail::writeSummary ( PathManager pm,
bool  wantSummary,
cet::cpu_timer const &  timer 
)

Definition at line 89 of file writeSummary.cc.

92 {
93  auto const& epis = pm.endPathInfo();
94  auto const& tpis = pm.triggerPathsInfo();
95  LogPrint("ArtSummary") << "";
96  triggerReport(epis, tpis, wantSummary);
97  LogPrint("ArtSummary") << "";
98  timeReport(jobTimer);
99  LogPrint("ArtSummary") << "";
100  memoryReport();
101 }
void triggerReport(PerScheduleContainer< PathsInfo > const &endPathInfo, PerScheduleContainer< PathsInfo > const &triggerPathsInfo, bool wantSummary)
void timeReport(cet::cpu_timer const &timer)
MaybeLogger_< ELseverityLevel::ELsev_warning, true > LogPrint

Variable Documentation

template<typename T >
bool constexpr art::detail::handle_allowed_v {handle_allowed<T>::value}

Definition at line 24 of file ServiceHandleAllowed.h.

SharedResource_t const art::detail::LegacyResource {"__legacy__", false}

Definition at line 33 of file SharedResource.cc.