LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::detail Namespace Reference

Namespaces

 FDS
 
 FTS
 

Classes

struct  AggregateTuple
 
struct  AggregateTuple< 0u >
 
struct  are_cv_compatible
 
struct  are_handles
 
class  AssnsBase
 
class  BcollHelper
 
class  CachedProducts
 
struct  call_beginRun
 
struct  call_beginSubRun
 
struct  call_endRun
 
struct  call_endSubRun
 
struct  call_finalizeEvent
 
struct  call_processEventAuxiliaries
 
struct  call_processEventIDs
 
struct  call_respondToCloseInputFile
 
struct  call_respondToCloseOutputFiles
 
struct  call_respondToOpenInputFile
 
struct  call_respondToOpenOutputFiles
 
struct  call_startEvent
 
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  CPCSentry
 
class  DataCollHelper
 
struct  default_invocation
 
struct  default_invocation< R(ARGS...)>
 
struct  do_call_hasMoreData
 
struct  do_call_old_startEvent
 
struct  do_not_call_beginRun
 
struct  do_not_call_beginSubRun
 
struct  do_not_call_endRun
 
struct  do_not_call_endSubRun
 
struct  do_not_call_finalizeEvent
 
struct  do_not_call_hasMoreData
 
struct  do_not_call_old_startEvent
 
struct  do_not_call_processEventAuxiliaries
 
struct  do_not_call_processEventIDs
 
struct  do_not_call_respondToXXX
 
struct  do_not_call_startEvent
 
struct  do_not_setup_eventsToSkip
 
class  DummyProductCache
 
struct  EnsurePointer
 
struct  EnsurePointer< TO, art::Ptr< PTRVAL > >
 
struct  EnsurePointer< TO, PFROM * >
 
class  ExceptionCollector
 
class  FileNameComponents
 
class  FileNamesHandler
 
class  FileNamesHandler< false >
 
class  FileNamesHandler< true >
 
class  FileServiceProxy
 
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, enable_if_function_exists_t< bool(T::*)() const,&T::hasMoreData > >
 
struct  has_hasMoreData< T, 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_old_startEvent
 
struct  has_old_startEvent< T, enable_if_function_exists_t< void(T::*)(),&T::startEvent > >
 
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, enable_if_function_exists_t< size_t(T::*)() const,&T::size > >
 
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
 
struct  hash_to_size_t
 
class  InfoDumperInputFile
 
class  IPRHelper
 
class  IPRHelperDef
 
struct  is_handle
 
struct  is_handle< T, cet::enable_if_type_exists_t< typename T::HandleTag > >
 
struct  is_instantiation_of_hash
 
struct  is_instantiation_of_hash< art::Hash< I > >
 
class  ItemGetter
 
class  ItemGetter< std::pair< cet::map_vector_key, T >, cet::map_vector< T > >
 
class  ItemGetter< T, cet::map_vector< T > >
 
class  KeptProvenance
 
class  LibraryInfo
 
class  LibraryInfoMatch
 
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_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  MetadataCollector
 
class  MetadataCollectorFor
 
class  MetadataSummary
 
class  MetadataSummaryFor
 
struct  mix_offset
 
struct  mix_offset< cet::map_vector< P > >
 
struct  ModuleConfig
 
class  ModuleConfigInfo
 
class  ModuleFactory
 
class  ModuleInPathInfo
 
struct  ModuleTypeDeducer
 
struct  ModuleTypeDeducer< art::EDAnalyzer >
 
struct  ModuleTypeDeducer< art::EDFilter >
 
struct  ModuleTypeDeducer< art::EDProducer >
 
struct  ModuleTypeDeducer< art::OutputModule >
 
struct  PluginConfig
 
class  PluginMetadata
 
class  PrincipalProcessor
 
class  ProcessAndEventSelector
 
struct  ProductInfo
 
class  ProvenanceDumperImpl
 
class  PVSentry
 
struct  RangeSetInfo
 
struct  RangeSetsSupported
 
struct  RangeSetsSupported< InRun >
 
struct  RangeSetsSupported< InSubRun >
 
struct  respondToXXX_function
 
class  RootDirectorySentry
 
class  ScheduleContextSetter
 
class  ScheduleTask
 
class  ServiceCacheEntry
 
struct  ServiceHelper
 
struct  ServiceHelperBase
 
struct  ServiceImplHelper
 
struct  ServiceInterfaceHelper
 
struct  ServiceInterfaceImplHelper
 
struct  ServiceLGMHelper
 
struct  ServiceLGRHelper
 
class  ServiceNames
 
struct  ServicePSMHelper
 
struct  ServicePSRHelper
 
class  ServiceWrapper
 
class  ServiceWrapper< T, art::ServiceScope::PER_SCHEDULE >
 
class  ServiceWrapperBase
 
struct  setup_eventsToSkip
 
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  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 ModuleConfigInfoMap = std::map< std::string, ModuleConfigInfo >
 
using WorkerMaker_t = Worker *(WorkerParams const &, ModuleDescription const &)
 
using ModuleTypeFunc_t) = ModuleType(
 
template<typename T >
using respond_to_file = void(T::*)(FileBlock const &)
 
using ServiceCache = std::map< TypeID, detail::ServiceCacheEntry >
 
typedef std::stack< WrapperBase_ptrServiceStack
 
using WrapperBase_ptr = std::shared_ptr< detail::ServiceWrapperBase >
 

Enumerations

enum  SignalResponseType { SignalResponseType::FIFO, SignalResponseType::LIFO }
 

Functions

void print_available_plugins (suffix_type st, bool const verbose, std::string const &spec)
 
void print_available_plugins (suffix_type st, bool const verbose)
 
bool supports_key (suffix_type st, 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::string describe (cet::exempt_ptr< fhicl::ConfigurationTable const > pb, std::string const &prefix)
 
bool exists_outside_prolog (fhicl::intermediate_table const &config, std::string const &key)
 
template<typename T >
std::enable_if_t< std::is_convertible< T, std::string >::value, std::string > fhicl_key (T const &name)
 
template<typename H , typename... T>
std::enable_if_t< std::is_convertible< H, std::string >::value, std::string > fhicl_key (H const &hname, T const &...tnames)
 
void fillSourceList (std::istream &ifs, std::vector< std::string > &source_list)
 
constexpr const char * dflt_spec_pattern ()
 
LibraryInfoCollection get_LibraryInfoCollection (suffix_type suffix, std::string const &pattern, bool const verbose=false)
 
std::unique_ptr< MetadataCollectorget_MetadataCollector (suffix_type st)
 
std::unique_ptr< MetadataSummaryget_MetadataSummary (suffix_type st, LibraryInfoCollection const &coll)
 
constexpr int info_success ()
 
std::regex regex_for_spec (std::string const &)
 
void replace_type (std::string &str, std::string const &spec, std::regex const &r)
 
template<>
std::string getType< suffix_type::module > (cet::LibraryManager const &lm, std::string const &fullSpec)
 
template<>
std::string getType< suffix_type::plugin > (cet::LibraryManager const &lm, std::string const &fullSpec)
 
template<>
std::string getType< suffix_type::tool > (cet::LibraryManager const &lm, std::string const &fullSpec)
 
template<typename F , typename RT = decltype(std::declval<F>()())>
RT resolve_if_present (F f, std::string const &caller, RT result)
 
template<art::suffix_type st>
std::string getFilePath (cet::LibraryManager const &lm, std::string const &fullspec)
 
template<art::suffix_type >
std::string getType (cet::LibraryManager const &, std::string const &)
 
template<art::suffix_type >
std::unique_ptr< fhicl::ConfigurationTablegetAllowedConfiguration (cet::LibraryManager const &lm, std::string const &fullSpec, std::string const &name)
 
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)
 
bool get_failureToPut_flag (fhicl::ParameterSet const &scheduler_pset, fhicl::ParameterSet const &module_pset)
 
void remove_whitespace (std::string &)
 
void parse_path_spec (std::string path_spec, std::pair< std::string, std::string > &output)
 
void verifyInstanceName (std::string const &in)
 
void verifyFriendlyClassName (std::string const &fcn)
 
void memoryReport ()
 
void writeSummary (PathManager &pm, bool wantSummary, cet::cpu_timer const &timer)
 
void triggerReport (PathsInfo const &endPathsInfo, 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)
 
void checkForMissingDictionaries (std::vector< TypeID > const &types) noexcept( false)
 
RangeSet rangeSetFromFileIndex (FileIndex const &fileIndex, RunID runID, bool compactRanges)
 
RangeSet rangeSetFromFileIndex (FileIndex const &fileIndex, SubRunID subRunID, bool compactRanges)
 
void readFileIndex (TFile *file, TTree *metaDataTree, FileIndex *&findexPtr)
 
template<typename T >
readMetadata (TTree *md, bool const requireDict=true)
 
template<typename T >
bool readMetadata (TTree *md, T &field, bool const requireDict=true)
 
RangeSetInfo resolveRangeSetInfo (sqlite3 *, std::string const &filename, BranchType, unsigned RangeSetID, bool compact)
 
RangeSet resolveRangeSet (RangeSetInfo const &rs)
 
RangeSet resolveRangeSet (sqlite3 *, std::string const &filename, BranchType, unsigned rangeSetID, bool compact)
 
Long64_t GetBasketSize (TObjArray *branches, bool ondisk, bool inclusive)
 
Long64_t GetBasketSize (TBranch *b, bool ondisk, bool inclusive)
 
Long64_t GetTotalSize (TBranch *br, bool ondisk, bool inclusive)
 
Long64_t GetTotalSize (TObjArray *branches, bool ondisk)
 
Long64_t GetTotalSize (TTree *t, bool ondisk)
 
Long64_t sizeOnDisk (TTree *t)
 
Long64_t sizeOnDisk (TBranch *branch, bool inclusive)
 
void printBranchSummary (std::ostream &os, TBranch *br)
 
void printTreeSummary (std::ostream &os, TTree *t)
 
bool shouldFastClone (bool fastCloningSet, bool fastCloning, bool wantAllEvents, ClosingCriteria const &fileProperties)
 
bool shouldDropEvents (bool dropAllEventsSet, bool dropAllEvents, bool dropAllSubRuns)
 
template<typename AUX >
void mergeAuxiliary (AUX &left, AUX const &right)
 
template<>
void mergeAuxiliary (EventAuxiliary &, EventAuxiliary const &)
 
template<BranchType , typename ID >
RangeSet makeFullRangeSet (ID const &)
 
template<>
RangeSet makeFullRangeSet< InSubRun, SubRunID > (SubRunID const &id)
 
template<>
RangeSet makeFullRangeSet< InRun, RunID > (RunID const &id)
 
template<typename T >
size_t call_eventsToSkip (T &t)
 
void throw_if_invalid (std::string const &)
 
template<typename H , typename... T>
void throw_if_invalid (std::string const &msg, H const &h, T const &...t)
 
template<typename T >
cet::exception & exceptionContext (ModuleDescription const &md, T const &ip, cet::exception &ex)
 
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< T, fhicl::ParameterSet const &, ActivityRegistry & >::value, std::shared_ptr< T > > makeServiceFrom (fhicl::ParameterSet const &ps, ActivityRegistry &areg)
 
template<typename T >
std::enable_if_t<!std::is_constructible< T, fhicl::ParameterSet const &, ActivityRegistry & >::value, 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)
 
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)
 
std::string bold_fontify (std::string const &s)
 
InputTag input_tag (InputTag const &tag)
 
template<typename T >
InputTag input_tag (ProductToken< T > const &token)
 
template<typename T >
InputTag input_tag (ViewToken< T > const &token)
 
bool upcastAllowed (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)
 
void const * maybeCastObj (void const *address, std::type_info const &tiFrom, std::type_info const &tiTo)
 
void throwPartnerException (std::type_info const &generator, std::type_info const &wanted_wrapper_type)
 
ProductLookup_t createProductLookups (ProductDescriptions const &descriptions)
 
ViewLookup_t createViewLookups (ProductDescriptions 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}
 

Typedef Documentation

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

Definition at line 12 of file LibraryInfoCollection.h.

using art::detail::ModuleConfigInfoMap = typedef std::map<std::string, ModuleConfigInfo>

Definition at line 23 of file ModuleConfigInfo.h.

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

Definition at line 37 of file ModuleMacros.h.

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

Definition at line 519 of file MixFilter.h.

Definition at line 11 of file ServiceCache.h.

Definition at line 10 of file ServiceStack.h.

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

Definition at line 67 of file PrintFormatting.h.

Definition at line 36 of file ModuleMacros.h.

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

Definition at line 19 of file ServiceWrapperBase.h.

Enumeration Type Documentation

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.

References fhicl::detail::atom::value().

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  }
std::string art::detail::bold_fontify ( std::string const &  s)
inline
template<typename T >
size_t art::detail::call_eventsToSkip ( T &  t)

Definition at line 272 of file MixFilter.h.

273  {
274  return t.eventsToSkip();
275  }
bool art::detail::checkBranchNameSelector ( std::string const &  branchNameSelector,
std::string &  errMsg 
)

Definition at line 61 of file branchNameComponentChecking.cc.

References splitToComponents().

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.

References checkFriendlyNameSelector(), checkInstanceNameSelector(), checkModuleLabelSelector(), checkProcessNameSelector(), art::BranchKey::friendlyClassName_, art::BranchKey::moduleLabel_, art::BranchKey::processName_, and art::BranchKey::productInstanceName_.

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 }
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)
void art::detail::checkForMissingDictionaries ( std::vector< TypeID > const &  types)
noexcept

Definition at line 5 of file checkForMissingDictionaries.cc.

Referenced by art::MixOp< PROD, OPROD >::initializeBranchInfo().

7 {
8  root::DictionaryChecker checker;
9  for (auto const& tid : types) {
10  checker.checkDictionaries(tid.className());
11  }
12  checker.reportMissingDictionaries();
13 }
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.

Referenced by checkBranchNameSelector().

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.

Referenced by checkBranchNameSelector().

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.

Referenced by checkBranchNameSelector().

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.

Referenced by checkBranchNameSelector().

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 42 of file PrintFormatting.h.

References max, and s.

Referenced by art::FileDumperOutput::printPrincipal().

45  {
46  std::size_t s{header.size()};
47  cet::for_all(coll, [&s, cp](auto const& elem) {
48  s = std::max(s, (elem.*cp).size());
49  });
50  return s;
51  }
Float_t s
Definition: plot.C:23
Int_t max
Definition: plot.C:27
std::size_t art::detail::columnWidth ( LibraryInfoCollection const &  coll,
std::string const &(LibraryInfo::*)() const  fp,
std::string const &  header 
)
inline

Definition at line 54 of file PrintFormatting.h.

References max, and s.

57  {
58  std::size_t s{header.size()};
59  cet::for_all(
60  coll, [&s, fp](auto const& li) { s = std::max(s, (li.*fp)().size()); });
61  return s;
62  }
Float_t s
Definition: plot.C:23
Int_t max
Definition: plot.C:27
FILE * fp
Definition: plot.C:36
FileNameComponents art::detail::componentsFromPattern ( std::string const &  pattern)

Definition at line 63 of file FileNameComponents.cc.

References art::detail::FileNameComponents::add(), and art::detail::FileNameComponents::setSuffix().

Referenced by art::PostCloseFileRenamer::applySubstitutions().

64  {
65  FileNameComponents result;
66 
67  boost::smatch match;
68  auto si = cbegin(pattern), se = cend(pattern);
69  while (boost::regex_search(
70  si,
71  se,
72  match,
73  boost::regex{"%(\\d+)?#", boost::regex_constants::ECMAScript})) {
74  assert(match.size() == 2);
75  // Subexpressions:
76  // 0. Entire matched expression
77  // 1. Possible fill format digits for numeric substitution.
78  result.add(match.prefix(), match[1].str());
79  si = match[0].second;
80  }
81  // Get remaining characters of filename
82  result.setSuffix(std::string(si, se));
83  return result;
84  }
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  }
Float_t s
Definition: plot.C:23
TFile f
Definition: plotHisto.C:6
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  }
Float_t s
Definition: plot.C:23
TFile f
Definition: plotHisto.C:6
art::ProductLookup_t art::detail::createProductLookups ( ProductDescriptions const &  descriptions)

Definition at line 98 of file createProductLookups.cc.

References art::friendlyname::friendlyName(), art::is_assns(), and art::name_of_assns_base().

Referenced by art::ProductTable::ProductTable().

99 {
100  // Computing the product lookups does not rely on any ROOT facilities.
101  ProductLookup_t result;
102  std::vector<PendingBTLEntry> pendingEntries;
103  std::unordered_map<ProductID, CheapTag, ProductID::Hash> insertedABVs;
104  for (auto const& pd : descriptions) {
105  auto const& prodFCN = pd.friendlyClassName();
106  auto const& procName = pd.processName();
107  auto const pid = pd.productID();
108  result[prodFCN][procName].emplace_back(pid);
109 
110  // Additional work only for Assns lookup
111  auto const& moduleLabel = pd.moduleLabel();
112  auto const& instanceName = pd.productInstanceName();
113  auto const& className = pd.producedClassName();
114 
115  if (!is_assns(className))
116  continue;
117 
118  auto const baseName = name_of_assns_base(className);
119  if (!baseName.empty()) {
120  // We're an Assns<A, B, D>, with a base Assns<A, B>.
121  pendingEntries.emplace_back(art::friendlyname::friendlyName(baseName),
122  moduleLabel,
123  instanceName,
124  procName,
125  pid);
126  } else {
127  // Add our pid to the list of real Assns<A, B, void>
128  // products already registered.
129  insertedABVs.emplace(pid, CheapTag{moduleLabel, instanceName, procName});
130  }
131  }
132 
133  auto const iend = insertedABVs.cend();
134  // Preserve useful ordering, only inserting if we don't already have
135  // a *real* Assns<A, B, void> for that module label / instance name
136  // combination.
137  std::for_each(
138  pendingEntries.cbegin(),
139  pendingEntries.cend(),
140  [&result, &insertedABVs, iend](auto const& pe) {
141  auto& pids = result[pe.fcn()][pe.process()];
142  if (pids.empty() ||
143  !std::any_of(pids.cbegin(),
144  pids.cend(),
145  [&insertedABVs, &iend, &pe](ProductID const pid) {
146  auto i = insertedABVs.find(pid);
147  return i != iend && pe.ct() == i->second;
148  })) {
149  pids.emplace_back(pe.pid());
150  }
151  });
152 
153  return result;
154 }
std::string name_of_assns_base(std::string assns_type_name)
Definition: TypeID.cc:114
bool is_assns(TypeID const &tid)
Definition: TypeID.h:145
std::string friendlyName(std::string const &iFullName)
std::map< std::string, ProcessLookup > ProductLookup_t
Definition: type_aliases.h:20
art::ViewLookup_t art::detail::createViewLookups ( ProductDescriptions const &  descriptions)

Definition at line 5 of file createViewLookups.cc.

Referenced by art::ProductTable::ProductTable().

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

Definition at line 6 of file describe.cc.

References fhicl::detail::optional_parameter_message(), and fhicl::detail::ParameterWalker< C >::walk_over().

Referenced by geo::part::Partition< Data >::data(), and geo::part::Partition< Data >::describe().

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 > &)
constexpr const char* art::detail::dflt_spec_pattern ( )

Definition at line 18 of file get_LibraryInfoCollection.h.

References get_LibraryInfoCollection().

Referenced by print_available_plugins().

19  {
20  return "[A-Za-z0-9]+";
21  }
template<typename T >
cet::exception & art::detail::exceptionContext ( ModuleDescription const &  md,
T const &  ip,
cet::exception &  ex 
)

Definition at line 208 of file Worker.h.

References art::ModuleDescription::moduleLabel(), and art::ModuleDescription::moduleName().

Referenced by art::Worker::doWork().

211 {
212  iEx << iMD.moduleName() << "/" << iMD.moduleLabel() << " " << ip.id() << "\n";
213  return iEx;
214 }
template<typename T >
std::enable_if_t<std::is_convertible<T, std::string>::value, std::string> art::detail::fhicl_key ( T const &  name)
template<typename H , typename... T>
std::enable_if_t<std::is_convertible<H, std::string>::value, std::string> art::detail::fhicl_key ( H const &  hname,
T const &...  tnames 
)

Definition at line 20 of file fhicl_key.h.

References fhicl_key().

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

Definition at line 4 of file fillSourceList.cc.

Referenced by art::BasicSourceOptionsHandler::processSourceListArg_().

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 }
EventRange art::detail::full_run_event_range ( )

Definition at line 38 of file RangeSet.cc.

Referenced by art::RangeSet::forRun(), and art::RangeSet::is_full_run().

39 {
40  static EventRange const range{
42  return range;
43 }
bool art::detail::get_failureToPut_flag ( fhicl::ParameterSet const &  scheduler_pset,
fhicl::ParameterSet const &  module_pset 
)

Definition at line 9 of file get_failureToPut_flag.cc.

References fhicl::ParameterSet::get().

Referenced by art::EDProducer::doBeginJob(), and art::EDFilter::doBeginJob().

11  {
12  bool const global_flag{scheduler_pset.get<bool>("errorOnFailureToPut")};
13  bool const local_flag{module_pset.get<bool>("errorOnFailureToPut", true)};
14  return !global_flag ? global_flag :
15  local_flag; // global flag set to 'false' always wins
16  }
LibraryInfoCollection art::detail::get_LibraryInfoCollection ( suffix_type  suffix,
std::string const &  pattern,
bool const  verbose = false 
)

Definition at line 223 of file get_LibraryInfoCollection.cc.

References art::mfPlugin, art::mfStatsPlugin, art::module, art::plugin, art::service, art::source, and art::tool.

Referenced by dflt_spec_pattern(), print_available_plugins(), and supports_key().

226 {
227  switch (st) {
228  case suffix_type::module:
229  return getCollection<suffix_type::module>(pattern, verbose);
230  case suffix_type::service:
231  return getCollection<suffix_type::service>(pattern, verbose);
232  case suffix_type::source:
233  return getCollection<suffix_type::source>(pattern, verbose);
234  case suffix_type::plugin:
235  return getCollection<suffix_type::plugin>(pattern, verbose);
236  case suffix_type::tool:
237  return getCollection<suffix_type::tool>(pattern, verbose);
238  case suffix_type::mfPlugin:
239  return getCollection<suffix_type::mfPlugin>(pattern, verbose);
240  case suffix_type::mfStatsPlugin:
241  return getCollection<suffix_type::mfStatsPlugin>(pattern, verbose);
242  // No default - allow compiler to warn if missing suffix_type.
243  }
244  return {};
245 }
std::unique_ptr< MetadataCollector > art::detail::get_MetadataCollector ( suffix_type  st)

Definition at line 15 of file get_MetadataCollector.cc.

References art::mfPlugin, art::mfStatsPlugin, art::module, art::plugin, art::service, art::source, and art::tool.

16 {
17  switch (st) {
18  case suffix_type::module:
19  return std::make_unique<MetadataCollectorFor<suffix_type::module>>();
20  case suffix_type::plugin:
21  return std::make_unique<MetadataCollectorFor<suffix_type::plugin>>();
22  case suffix_type::service:
23  return std::make_unique<MetadataCollectorFor<suffix_type::service>>();
24  case suffix_type::source:
25  return std::make_unique<MetadataCollectorFor<suffix_type::source>>();
26  case suffix_type::tool:
27  return std::make_unique<MetadataCollectorFor<suffix_type::tool>>();
28  case suffix_type::mfPlugin:
29  return std::make_unique<MetadataCollectorFor<suffix_type::mfPlugin>>();
30  case suffix_type::mfStatsPlugin:
31  return std::make_unique<
33  // No default -- allow compiler to warn if missing suffix_type.
34  }
35  return std::unique_ptr<MetadataCollector>{nullptr};
36 }
std::unique_ptr< MetadataSummary > art::detail::get_MetadataSummary ( suffix_type  st,
LibraryInfoCollection const &  coll 
)

Definition at line 15 of file get_MetadataSummary.cc.

References art::mfPlugin, art::mfStatsPlugin, art::module, art::plugin, art::service, art::source, and art::tool.

Referenced by print_available_plugins().

17 {
18  switch (st) {
19  case suffix_type::module:
20  return std::make_unique<MetadataSummaryFor<suffix_type::module>>(coll);
21  case suffix_type::service:
22  return std::make_unique<MetadataSummaryFor<suffix_type::service>>(coll);
23  case suffix_type::source:
24  return std::make_unique<MetadataSummaryFor<suffix_type::source>>(coll);
25  case suffix_type::plugin:
26  return std::make_unique<MetadataSummaryFor<suffix_type::plugin>>(coll);
27  case suffix_type::tool:
28  return std::make_unique<MetadataSummaryFor<suffix_type::tool>>(coll);
29  case suffix_type::mfPlugin:
30  return std::make_unique<MetadataSummaryFor<suffix_type::mfPlugin>>(coll);
31  case suffix_type::mfStatsPlugin:
32  return std::make_unique<MetadataSummaryFor<suffix_type::mfStatsPlugin>>(
33  coll);
34  // No default -- let compiler warn if missing type.
35  }
36  return std::unique_ptr<MetadataSummary>{nullptr};
37 }
template<art::suffix_type >
std::unique_ptr<fhicl::ConfigurationTable> art::detail::getAllowedConfiguration ( cet::LibraryManager const &  lm,
std::string const &  fullSpec,
std::string const &  name 
)

Definition at line 73 of file PluginSymbolResolvers.h.

References resolve_if_present().

76  {
77  using GetAllowedConfiguration_t =
78  std::unique_ptr<fhicl::ConfigurationTable>(std::string const&);
79 
80  auto description = [&lm, &fullSpec, &name] {
81  GetAllowedConfiguration_t* symbolType{};
82  lm.getSymbolByLibspec(fullSpec, "allowed_configuration", symbolType);
83  return symbolType(name);
84  };
85 
86  return resolve_if_present(
87  description,
88  __func__,
89  std::unique_ptr<fhicl::ConfigurationTable>{nullptr});
90  }
RT resolve_if_present(F f, std::string const &caller, RT result)
Long64_t art::detail::GetBasketSize ( TObjArray *  branches,
bool  ondisk,
bool  inclusive 
)

Definition at line 11 of file rootFileSizeTools.cc.

References n.

Referenced by GetBasketSize(), and GetTotalSize().

12 {
13  Long64_t result = 0;
14  size_t n = branches->GetEntries();
15  for (size_t i = 0; i < n; ++i) {
16  result +=
17  GetBasketSize(static_cast<TBranch*>(branches->At(i)), ondisk, inclusive);
18  }
19  return result;
20 }
Long64_t GetBasketSize(TObjArray *branches, bool ondisk, bool inclusive)
Char_t n[5]
Long64_t art::detail::GetBasketSize ( TBranch *  b,
bool  ondisk,
bool  inclusive 
)

Definition at line 23 of file rootFileSizeTools.cc.

References GetBasketSize().

24 {
25  Long64_t result = 0;
26  if (b) {
27  if (ondisk && b->GetZipBytes() > 0) {
28  result = b->GetZipBytes();
29  } else {
30  result = b->GetTotBytes();
31  }
32  if (inclusive) {
33  result += GetBasketSize(b->GetListOfBranches(), ondisk, true);
34  }
35  return result;
36  }
37  return result;
38 }
Long64_t GetBasketSize(TObjArray *branches, bool ondisk, bool inclusive)
template<art::suffix_type st>
std::string art::detail::getFilePath ( cet::LibraryManager const &  lm,
std::string const &  fullspec 
)

Definition at line 34 of file PluginSymbolResolvers.h.

References art::Suffixes::get(), resolve_if_present(), s, and art::source.

35  {
36  using GetSourceLoc_t = std::string();
37 
38  using namespace std::string_literals;
39  auto path = [&lm, &fullspec] {
40  GetSourceLoc_t* symbolLoc{};
41  lm.getSymbolByLibspec(fullspec, "get_source_location", symbolLoc);
42  std::string source{symbolLoc()};
43  boost::filesystem::path const p{source};
44  if (!boost::filesystem::exists(p)) {
45  source = "/ [ external source ] /" + fullspec + "_" +
46  Suffixes::get(st) + ".cc";
47  }
48  return source;
49  };
50 
51  return resolve_if_present(path, __func__, "[ not found ]"s);
52  }
Float_t s
Definition: plot.C:23
RT resolve_if_present(F f, std::string const &caller, RT result)
Long64_t art::detail::GetTotalSize ( TBranch *  br,
bool  ondisk,
bool  inclusive 
)

Definition at line 41 of file rootFileSizeTools.cc.

References f, and GetBasketSize().

Referenced by GetTotalSize(), and sizeOnDisk().

42 {
43  TMemFile f("buffer", "CREATE");
44  if (br->GetTree()->GetCurrentFile()) {
45  f.SetCompressionSettings(
46  br->GetTree()->GetCurrentFile()->GetCompressionSettings());
47  }
48  f.WriteObject(br, "thisbranch");
49  TKey* key = f.GetKey("thisbranch");
50  Long64_t size;
51  if (ondisk)
52  size = key->GetNbytes();
53  else
54  size = key->GetObjlen();
55  return GetBasketSize(br, ondisk, inclusive) + size;
56 }
TFile f
Definition: plotHisto.C:6
Long64_t GetBasketSize(TObjArray *branches, bool ondisk, bool inclusive)
Long64_t art::detail::GetTotalSize ( TObjArray *  branches,
bool  ondisk 
)

Definition at line 59 of file rootFileSizeTools.cc.

References GetTotalSize(), and n.

60 {
61  Long64_t result = 0;
62  size_t n = branches->GetEntries();
63  for (size_t i = 0; i < n; ++i) {
64  result +=
65  GetTotalSize(static_cast<TBranch*>(branches->At(i)), ondisk, true);
66  }
67  return result;
68 }
Long64_t GetTotalSize(TBranch *br, bool ondisk, bool inclusive)
Char_t n[5]
Long64_t art::detail::GetTotalSize ( TTree *  t,
bool  ondisk 
)

Definition at line 71 of file rootFileSizeTools.cc.

References f, and GetBasketSize().

72 {
73  TKey* key = 0;
74  if (t->GetDirectory()) {
75  key = t->GetDirectory()->GetKey(t->GetName());
76  }
77  Long64_t ondiskSize = 0;
78  Long64_t totalSize = 0;
79  if (key) {
80  ondiskSize = key->GetNbytes();
81  totalSize = key->GetObjlen();
82  } else {
83  TMemFile f("buffer", "CREATE");
84  if (t->GetCurrentFile()) {
85  f.SetCompressionSettings(t->GetCurrentFile()->GetCompressionSettings());
86  }
87  f.WriteTObject(t);
88  key = f.GetKey(t->GetName());
89  ondiskSize = key->GetNbytes();
90  totalSize = key->GetObjlen();
91  }
92  if (t->GetBranchRef()) {
93  if (ondisk) {
94  ondiskSize += GetBasketSize(t->GetBranchRef(), true, true);
95  } else {
96  totalSize += GetBasketSize(t->GetBranchRef(), false, true);
97  }
98  }
99  if (ondisk) {
100  return ondiskSize + GetBasketSize(t->GetListOfBranches(),
101  /* ondisk */ true,
102  /* inclusive */ true);
103  } else {
104  return totalSize + GetBasketSize(t->GetListOfBranches(),
105  /* ondisk */ false,
106  /* inclusive */ true);
107  }
108 }
TFile f
Definition: plotHisto.C:6
Long64_t GetBasketSize(TObjArray *branches, bool ondisk, bool inclusive)
template<art::suffix_type >
std::string art::detail::getType ( cet::LibraryManager const &  ,
std::string const &   
)

Definition at line 56 of file PluginSymbolResolvers.h.

Referenced by cosmic::CosmicTrackTagger::produce().

57  {
58  return {};
59  }
template<>
std::string art::detail::getType< suffix_type::module > ( cet::LibraryManager const &  lm,
std::string const &  fullSpec 
)

Definition at line 12 of file PluginSymbolResolvers.cc.

References resolve_if_present(), s, and art::to_string().

14  {
16 
17  auto type = [&lm, &fullSpec] {
18  ModuleTypeFunc_t* symbolType{nullptr};
19  lm.getSymbolByLibspec(fullSpec, "moduleType", symbolType);
20  return art::to_string(symbolType());
21  };
22 
23  return resolve_if_present(type, __func__, "[ error ]"s);
24  }
Float_t s
Definition: plot.C:23
ModuleType( ModuleTypeFunc_t)
Definition: ModuleMacros.h:37
RT resolve_if_present(F f, std::string const &caller, RT result)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
ModuleType
Definition: ModuleType.h:22
template<>
std::string art::detail::getType< suffix_type::plugin > ( cet::LibraryManager const &  lm,
std::string const &  fullSpec 
)

Definition at line 28 of file PluginSymbolResolvers.cc.

References resolve_if_present(), and s.

30  {
31  using PluginTypeFunc_t = std::string();
32 
33  auto type = [&lm, &fullSpec] {
34  PluginTypeFunc_t* symbolType{nullptr};
35  lm.getSymbolByLibspec(fullSpec, "pluginType", symbolType);
36  return symbolType();
37  };
38 
39  return resolve_if_present(type, __func__, "[ error ]"s);
40  }
Float_t s
Definition: plot.C:23
RT resolve_if_present(F f, std::string const &caller, RT result)
template<>
std::string art::detail::getType< suffix_type::tool > ( cet::LibraryManager const &  lm,
std::string const &  fullSpec 
)

Definition at line 44 of file PluginSymbolResolvers.cc.

References resolve_if_present(), and s.

46  {
47  using ToolTypeFunc_t = std::string();
48 
49  auto type = [&lm, &fullSpec] {
50  ToolTypeFunc_t* symbolType{nullptr};
51  lm.getSymbolByLibspec(fullSpec, "toolType", symbolType);
52  return symbolType();
53  };
54 
55  return resolve_if_present(type, __func__, "[ error ]"s);
56  }
Float_t s
Definition: plot.C:23
RT resolve_if_present(F f, std::string const &caller, RT result)
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)
std::string art::detail::indent ( std::size_t const  i)
inline

Definition at line 18 of file PrintFormatting.h.

Referenced by geo::PlaneGeo::ActiveArea(), lar_cluster3d::ClusterPathFinder::breakIntoTinyBits(), lar_cluster3d::VoronoiPathFinder::breakIntoTinyBits(), lar_cluster3d::ClusterPathFinder::buildConvexHull(), lar_cluster3d::ConvexHullPathFinder::buildConvexHull(), lar_cluster3d::VoronoiPathFinder::buildConvexHull(), recob::PointCharge::dump(), lar::example::CheatTrack::dump(), sim::OpDetBacktrackerRecord::Dump(), sim::SimChannel::Dump(), sim::DumpSimPhotons::DumpElement(), sim::DumpMCShowers::DumpMCShower(), sim::DumpMCTracks::DumpMCTrack(), sim::DumpOpDetBacktrackerRecords::DumpOpDetBacktrackerRecord(), recob::dumper::DumpPCAxis(), sim::DumpSimPhotonsLite::DumpPhoton(), sim::DumpSimChannels::DumpSimChannel(), detsim::DumpOpDetWaveforms::DumpWaveform(), mf::service::ELdestination::emitToken(), recob::TrajectoryPointFlags::fromHit(), geo::CryostatGeo::ID(), indent0(), indent_1(), indent__2(), geo::OpDetGeo::isBar(), geo::WireGeo::isParallelTo(), recob::TrackTrajectory::LocalToGlobalRotationAtPoint(), recob::Trajectory::LocalToGlobalRotationAtPoint(), lar_cluster3d::ConvexHullPathFinder::makeCandidateCluster(), lar_cluster3d::VoronoiPathFinder::makeCandidateCluster(), geo::GeometryCore::MaterialName(), fhicl::detail::MaybeDisplayParent::MaybeDisplayParent(), geo::AuxDetGeo::NSensitiveVolume(), rndm::details::RangeCheckHelper< seed_t >::operator()(), geo::part::PartitionBase::PartitionBase(), geo::GeometryCore::Print(), lar::debug::printBacktrace(), calo::LinearEnergyAlg::setup(), lar_cluster3d::VoronoiPathFinder::subDivideCluster(), geo::AuxDetSensitiveGeo::toLocalCoords(), and geo::TPCGeo::toLocalCoords().

19  {
20  return std::string(i, ' ');
21  }
std::string art::detail::indent0 ( )
inline

Definition at line 23 of file PrintFormatting.h.

References indent().

Referenced by print_descriptions(), and rule_size().

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

Definition at line 28 of file PrintFormatting.h.

References indent().

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

Definition at line 33 of file PrintFormatting.h.

References indent().

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

Definition at line 9 of file info_success.h.

References max.

Referenced by art::BasicOptionsHandler::doCheckOptions(), main(), and art::run_art_common_().

10  {
12  }
Int_t max
Definition: plot.C:27
template<typename T >
InputTag art::detail::input_tag ( ProductToken< T > const &  token)
inline

Definition at line 28 of file IPRHelper.h.

References art::ProductToken< T >::inputTag_.

29  {
30  return token.inputTag_;
31  }
template<typename T >
InputTag art::detail::input_tag ( ViewToken< T > const &  token)
inline

Definition at line 35 of file IPRHelper.h.

References art::ViewToken< Element >::inputTag_.

36  {
37  return token.inputTag_;
38  }
std::string const & art::detail::InvalidHash ( )

Definition at line 7 of file Hash.cc.

Referenced by art::Hash< I >::fixup(), and art::Hash< I >::isValid().

8  {
9  static const std::string invalid = cet::MD5Result().compactForm();
10  return invalid;
11  }
void art::detail::logFileAction ( const char *  msg,
std::string const &  file 
)

Definition at line 9 of file logFileAction.cc.

References mf::FlushMessageLog().

Referenced by art::RootInputFileSequence::closeFile_(), art::RootOutput::doOpenFile(), art::RootOutput::finishEndFile(), art::RootInputFileSequence::initFile(), art::TFileService::maybeSwitchFiles_(), and art::RootInputFileSequence::openSecondaryFile().

10 {
11  time_t t = time(0);
12  char ts[] = "dd-Mon-yyyy hh:mm:ss TZN ";
13  strftime(ts, strlen(ts) + 1, "%d-%b-%Y %H:%M:%S %Z", localtime(&t));
14  mf::LogAbsolute("fileAction") << ts << " " << msg << '\"' << file << '\"';
16 }
void FlushMessageLog()
TFile * file
MaybeLogger_< ELseverityLevel::ELsev_severe, true > LogAbsolute
template<BranchType , typename ID >
RangeSet art::detail::makeFullRangeSet ( ID const &  )

Referenced by mergeAuxiliary().

template<>
RangeSet art::detail::makeFullRangeSet< InRun, RunID > ( RunID const &  id)
inline

Definition at line 65 of file RootInputTree.h.

References art::RangeSet::forRun().

66  {
67  return RangeSet::forRun(id);
68  }
template<>
RangeSet art::detail::makeFullRangeSet< InSubRun, SubRunID > ( SubRunID const &  id)
inline

Definition at line 58 of file RootInputTree.h.

References art::RangeSet::forSubRun().

59  {
60  return RangeSet::forSubRun(id);
61  }
template<typename T >
std::enable_if_t<std::is_constructible<T, fhicl::ParameterSet const&, ActivityRegistry&>::value, std::shared_ptr<T> > art::detail::makeServiceFrom ( fhicl::ParameterSet const &  ps,
ActivityRegistry areg 
)

Definition at line 46 of file ServiceWrapper.h.

References fhicl::detail::atom::value().

47  {
48  static_assert(
50  "\n\nart-error: A service that inherits from art::ProducingService\n"
51  " cannot have a constructor that takes an ActivityRegistry&\n"
52  " argument. Contact artists@fnal.gov for guidance.\n");
53  return std::make_shared<T>(ps, areg);
54  }
std::string value(boost::any const &)
template<typename T >
std::enable_if_t<!std::is_constructible<T, fhicl::ParameterSet const&, ActivityRegistry&>::value, std::shared_ptr<T> > art::detail::makeServiceFrom ( fhicl::ParameterSet const &  ps,
ActivityRegistry  
)

Definition at line 61 of file ServiceWrapper.h.

References art::detail::ServiceWrapper< T, SCOPE >::operator=(), and art::detail::ServiceWrapper< T, SCOPE >::ServiceWrapper().

62  {
63  return std::make_shared<T>(ps);
64  }
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.

Referenced by art::GlobalSignal< SRTYPE, ResultType(Args...)>::watch(), art::LocalSignal< STYPE, ResultType(Args...)>::watch(), and art::LocalSignal< STYPE, ResultType(Args...)>::watchAll().

17  {
18  return [slot, &t](Args&&... args) -> ResultType {
19  return (t.*slot)(std::forward<Args>(args)...);
20  };
21  }
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  }
template<typename element_type >
void const * art::detail::maybeCastObj ( element_type const *  address,
std::type_info const &  tiTo 
)
inline

Definition at line 21 of file maybeCastObj.h.

Referenced by art::getElementAddresses(), and art::setPtr().

23 {
24  static std::type_info const& tiFrom{typeid(element_type)};
25  return maybeCastObj(address, tiFrom, tiTo);
26 }
void const * maybeCastObj(void const *address, std::type_info const &tiFrom, std::type_info const &tiTo)
void const* art::detail::maybeCastObj ( void const *  address,
std::type_info const &  tiFrom,
std::type_info const &  tiTo 
)
void art::detail::memoryReport ( )

Definition at line 4 of file memoryReportDarwin.cc.

Referenced by writeSummary().

5 {
6  // Not implemented for Darwin
7 }
template<typename AUX >
void art::detail::mergeAuxiliary ( AUX &  left,
AUX const &  right 
)

Definition at line 43 of file RootInputTree.h.

Referenced by art::RootInputTree::fillAux().

44  {
45  left.mergeAuxiliary(right);
46  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104
template<>
void art::detail::mergeAuxiliary ( EventAuxiliary ,
EventAuxiliary const &   
)
inline

Definition at line 50 of file RootInputTree.h.

References makeFullRangeSet().

51  {}
std::vector< std::vector< std::string > > art::detail::orderedProcessNamesCollection ( ProcessHistoryMap const &  pHistMap)

Definition at line 12 of file orderedProcessNamesCollection.cc.

References art::isAncestor().

Referenced by art::detail::InfoDumperInputFile::print_branchIDLists(), and art::detail::InfoDumperInputFile::print_process_history().

13 {
14  std::vector<std::vector<std::string>> result;
15 
16  std::vector<ProcessHistory const*> collapsed_histories;
17  // Collapsed histories are histories that do not overlap with any
18  // others. For example, of the following process histories:
19  //
20  // 1: [A]
21  // 2: [A,B]
22  // 3: [A,B,C]
23  // 4: [A,D]
24  //
25  // The collapsed histories are 3 and 4 since 1 and 2 are subsets of
26  // 3. In otherwords, 3 and 4 are the only histories that do not
27  // have descendants.
28  //
29  // Since the ordering of the histories is determined by a hashed
30  // value, we must compare each history in pairs to determine which
31  // histories do not have descendants.
32  for (auto const& hist_i : histories) {
33  bool found_descendent{false};
34  for (auto const& hist_j : histories) {
35  if (isAncestor(hist_i.second, hist_j.second)) {
36  found_descendent = true;
37  break;
38  }
39  }
40  if (!found_descendent) {
41  collapsed_histories.push_back(&hist_i.second);
42  }
43  }
44 
45  for (auto const history : collapsed_histories) {
46  std::vector<std::string> process_names;
47  cet::transform_all(*history,
48  std::back_inserter(process_names),
49  [](auto const& config) { return config.processName(); });
50  result.push_back(std::move(process_names));
51  }
52 
53  return result;
54 }
bool isAncestor(ProcessHistory const &a, ProcessHistory const &b)
void art::detail::parse_path_spec ( std::string  path_spec,
std::pair< std::string, std::string > &  output 
)

Definition at line 17 of file parse_path_spec.cc.

References remove_whitespace().

Referenced by art::EventObserverBase::init_().

18 {
20  auto const pos = path.find(":");
21  if (pos == string::npos) {
22  pname_path = std::make_pair("", path);
23  return;
24  }
25  pname_path = make_pair(path.substr(0, pos), path.substr(pos + 1));
26 }
void remove_whitespace(std::string &)
void art::detail::print_available_plugins ( suffix_type  st,
bool const  verbose,
std::string const &  spec 
)

Definition at line 82 of file AllowedConfiguration.cc.

References get_LibraryInfoCollection(), get_MetadataSummary(), and rule_size().

Referenced by art::BasicOptionsHandler::doCheckOptions(), and print_available_plugins().

85 {
86  auto coll = get_LibraryInfoCollection(st, spec, verbose);
87  if (coll.empty())
88  return;
89 
90  auto ms = get_MetadataSummary(st, coll);
91 
92  cet::HorizontalRule const rule{rule_size(ms->widths())};
93  cout << "\n"
94  << rule('=') << "\n\n"
95  << ms->header() << "\n"
96  << rule('-') << '\n';
97 
98  std::size_t i{};
99  Duplicates_t duplicates;
100  for (auto const& info : coll) {
101  auto summary = ms->summary(info, ++i);
102  cout << summary.message;
103  if (summary.is_duplicate)
104  duplicates[info.short_spec()].push_back(info.long_spec());
105  }
106  cout << "\n" << rule('=') << "\n\n";
107 
108  if (duplicates.empty())
109  return;
110 
111  duplicates_message(st, duplicates);
112  cout << "\n\n";
113 }
std::size_t rule_size(Widths const &widths)
LibraryInfoCollection get_LibraryInfoCollection(suffix_type suffix, std::string const &pattern, bool const verbose=false)
std::unique_ptr< MetadataSummary > get_MetadataSummary(suffix_type st, LibraryInfoCollection const &coll)
void art::detail::print_available_plugins ( suffix_type  st,
bool const  verbose 
)
inline

Definition at line 85 of file AllowedConfiguration.h.

References dflt_spec_pattern(), print_available_plugins(), print_description(), print_descriptions(), and supports_key().

86  {
88  }
void print_available_plugins(suffix_type st, bool const verbose)
constexpr const char * dflt_spec_pattern()
void art::detail::print_description ( std::vector< PluginMetadata > const &  matches)

Definition at line 138 of file AllowedConfiguration.cc.

References art::errors::Configuration, and art::Suffixes::print().

Referenced by print_available_plugins(), and print_descriptions().

139 {
140  for (auto const& m : matches) {
141  cout << m.header() << m.details() << m.allowed_configuration();
142  cout << '\n' << fixed_rule('=') << "\n\n";
143  }
144 }
void art::detail::print_descriptions ( std::vector< std::string > const &  plugins)

Definition at line 178 of file AllowedConfiguration.cc.

References bold_fontify(), indent0(), and print_description().

Referenced by art::BasicOptionsHandler::doCheckOptions(), and print_available_plugins().

179 {
180  cout << '\n' << fixed_rule('=') << "\n\n";
181  for (auto const& spec : specs) {
182  std::string plugin_type{}, instance_pattern{};
183  std::tie(plugin_type, instance_pattern) = parse_specified_plugin(spec);
184 
185  auto matches = matchesBySpec(plugin_type, instance_pattern);
186  if (matches.empty()) {
187  cout << indent0()
188  << (instance_pattern.empty() ? "[Missing specification]" :
189  bold_fontify(instance_pattern))
190  << " did not match any plugin";
191  cout << (plugin_type.empty() ? "" : " of type '" + plugin_type + "'");
192  cout << ".\n";
193  cout << '\n' << fixed_rule('=') << "\n\n";
194  continue;
195  }
196  print_description(matches);
197  }
198 }
std::string bold_fontify(std::string const &s)
Definition: bold_fontify.h:9
std::string indent0()
void print_description(std::vector< PluginMetadata > const &matches)
void art::detail::printBranchSummary ( std::ostream &  os,
TBranch *  br 
)

Definition at line 129 of file rootFileSizeTools.cc.

References n, and sizeOnDisk().

130 {
131  os << "The branch \"" << br->GetName() << "\" takes " << sizeOnDisk(br, true)
132  << " bytes on disk\n";
133  size_t n = br->GetListOfBranches()->GetEntries();
134  for (size_t i = 0; i < n; ++i) {
135  TBranch* subbr = static_cast<TBranch*>(br->GetListOfBranches()->At(i));
136  os << " It's sub-branch \"" << subbr->GetName() << "\" takes "
137  << sizeOnDisk(subbr, true) << " bytes on disk\n";
138  }
139 }
Long64_t sizeOnDisk(TTree *t)
Char_t n[5]
void art::detail::printTreeSummary ( std::ostream &  os,
TTree *  t 
)

Definition at line 142 of file rootFileSizeTools.cc.

References n, and sizeOnDisk().

143 {
144  os << "The TTree \"" << t->GetName() << "\" takes " << sizeOnDisk(t)
145  << " bytes on disk\n";
146  size_t n = t->GetListOfBranches()->GetEntries();
147  for (size_t i = 0; i < n; ++i) {
148  TBranch* br = static_cast<TBranch*>(t->GetListOfBranches()->At(i));
149  os << " It's branch \"" << br->GetName() << "\" takes "
150  << sizeOnDisk(br, true) << " bytes on disk\n";
151  }
152 }
Long64_t sizeOnDisk(TTree *t)
Char_t n[5]
RangeSet art::detail::rangeSetFromFileIndex ( FileIndex const &  fileIndex,
RunID  runID,
bool  compactRanges 
)

Definition at line 123 of file rangeSetFromFileIndex.cc.

References evd::details::begin(), evd::details::end(), and art::RunID::run().

Referenced by art::RootInputTree::fillAux(), and art::detail::InfoDumperInputFile::print_range_sets().

126 {
127  auto const run = runID.run();
128  auto const begin = std::cbegin(fileIndex);
129  auto const end = std::cend(fileIndex);
130 
131  RangeSet rangeSet{run};
132 
133  // Loop through SubRuns in Run
134  auto subrun_begin = std::find_if(begin, end, next_subrun_in_run{runID});
135  if (subrun_begin == end) {
136  // Run has no entries -- early bail out
137  return rangeSet;
138  }
139 
140  auto const run_end = std::find_if(subrun_begin, end, end_of_run{runID});
141  while (subrun_begin != run_end) {
142  auto const subRunID = subrun_begin->eventID_.subRunID();
143  auto rs = rangeSetFromFileIndex(fileIndex, subRunID, compactRanges);
144  if (rs.is_valid()) {
145  rangeSet.merge(rs);
146  }
147  auto subrun_end = std::find_if(subrun_begin, end, end_of_subrun{subRunID});
148  subrun_begin = subrun_end;
149  }
150 
151  return rangeSet;
152 }
RangeSet rangeSetFromFileIndex(FileIndex const &fileIndex, RunID runID, bool compactRanges)
RunNumber_t run() const
Definition: RunID.h:63
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
RangeSet art::detail::rangeSetFromFileIndex ( FileIndex const &  fileIndex,
SubRunID  subRunID,
bool  compactRanges 
)

Definition at line 74 of file rangeSetFromFileIndex.cc.

References evd::details::begin(), evd::details::end(), art::FileIndex::Element::eventID_, art::SubRunID::run(), art::SubRunID::runID(), and art::SubRunID::subRun().

77 {
78  RangeSet rangeSet{subRunID.run()};
79  auto begin = std::cbegin(fileIndex);
80  auto end = std::cend(fileIndex);
81 
82  auto subrun_begin =
83  std::find_if(begin, end, next_subrun_in_run{subRunID.runID()});
84  if (subrun_begin == end) {
85  // SubRun does not exist in the provided fileIndex
86  return rangeSet;
87  }
88 
89  auto event_it =
90  std::find_if(subrun_begin, end, next_event_in_subrun{subRunID});
91  if (event_it == end) {
92  // SubRun has no event entries entries
93  return rangeSet;
94  }
95 
96  auto const& eid = event_it->eventID_;
97  auto event_end =
98  std::find_if_not(event_it, end, next_event_in_subrun{subRunID});
99 
100  if (compactRanges) {
101  auto const count = std::distance(event_it, event_end);
102  if (count < 1) {
103  // Should never get here, and should probably throw
104  return rangeSet;
105  }
106 
107  auto const subrun = subRunID.subRun();
108  auto const ebegin = eid.event();
109  auto const eend = (count == 1) ?
110  eid.next().event() :
111  std::prev(event_end)->eventID_.next().event();
112  rangeSet.emplace_range(subrun, ebegin, eend);
113  return rangeSet;
114  }
115 
116  std::for_each(event_it, event_end, [&rangeSet](auto const& element) {
117  rangeSet.update(element.eventID_);
118  });
119  return rangeSet;
120 }
RunID const & runID() const
Definition: SubRunID.h:78
RunNumber_t run() const
Definition: SubRunID.h:84
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
SubRunNumber_t subRun() const
Definition: SubRunID.h:90
void art::detail::readFileIndex ( TFile *  file,
TTree *  metaDataTree,
FileIndex *&  findexPtr 
)
inline

Definition at line 20 of file readFileIndex.h.

References art::FileIndex::addEntryOnLoad(), art::couldNotFindTree(), art::rootNames::fileIndexTreeName(), art::errors::FileReadError, and art::input::getEntry().

Referenced by art::detail::InfoDumperInputFile::InfoDumperInputFile(), and art::MixHelper::openAndReadMetaData_().

21  {
22 
23  if (auto branch = metaDataTree->GetBranch(
24  rootNames::metaBranchRootName<FileIndex>())) {
25  branch->SetAddress(&findexPtr);
26  input::getEntry(branch, 0);
27  branch->SetAddress(nullptr);
28  } else {
29  std::unique_ptr<TTree> fileIndexTree{static_cast<TTree*>(
30  file->Get(rootNames::fileIndexTreeName().c_str()))};
31  if (!fileIndexTree)
34 
35  FileIndex::Element element;
36  auto elemPtr = &element;
37  fileIndexTree->SetBranchAddress(
38  rootNames::metaBranchRootName<FileIndex::Element>(), &elemPtr);
39  for (size_t i{0}, sz = fileIndexTree->GetEntries(); i != sz; ++i) {
40  input::getEntry(fileIndexTree.get(), i);
41  findexPtr->addEntryOnLoad(elemPtr->eventID_, elemPtr->entry_);
42  }
43  fileIndexTree->SetBranchAddress(
44  rootNames::metaBranchRootName<FileIndex::Element>(), nullptr);
45  }
46  }
std::string couldNotFindTree(std::string const &treename)
Definition: rootErrMsgs.h:9
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string const & fileIndexTreeName()
Definition: rootNames.cc:48
TFile * file
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: getEntry.cc:12
template<typename T >
T art::detail::readMetadata ( TTree *  md,
bool const  requireDict = true 
)

Definition at line 13 of file readMetadata.h.

References art::input::getEntry().

Referenced by art::detail::InfoDumperInputFile::InfoDumperInputFile(), and art::MixHelper::openAndReadMetaData_().

14  {
15  auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
16  assert(branch != nullptr);
17 
18  auto mdField = requireDict ? root::getObjectRequireDict<T>() : T{};
19  auto field_ptr = &mdField;
20  branch->SetAddress(&field_ptr);
21  input::getEntry(branch, 0);
22  branch->SetAddress(nullptr);
23  return mdField;
24  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: getEntry.cc:12
template<typename T >
bool art::detail::readMetadata ( TTree *  md,
T &  field,
bool const  requireDict = true 
)

Definition at line 28 of file readMetadata.h.

References art::input::getEntry().

29  {
30  auto branch = md->GetBranch(art::rootNames::metaBranchRootName<T>());
31  if (branch == nullptr) {
32  return false;
33  }
34 
35  auto mdField = requireDict ? root::getObjectRequireDict<T>() : T{};
36  auto field_ptr = &mdField;
37  branch->SetAddress(&field_ptr);
38  input::getEntry(branch, 0);
39  branch->SetAddress(nullptr);
40  std::swap(mdField, field);
41 
42  return true;
43  }
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: getEntry.cc:12
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 &  s)

Definition at line 10 of file parse_path_spec.cc.

Referenced by parse_path_spec().

11 {
12  s.erase(remove(s.begin(), s.end(), ' '), s.end());
13  s.erase(remove(s.begin(), s.end(), '\t'), s.end());
14 }
Float_t s
Definition: plot.C:23
void art::detail::replace_type ( std::string &  str,
std::string const &  spec,
std::regex const &  r 
)

Definition at line 12 of file MetadataRegexHelpers.cc.

References s.

15 {
16  str = std::regex_replace(str, r, "$1"s + spec);
17 }
Float_t s
Definition: plot.C:23
template<typename F , typename RT = decltype(std::declval<F>()())>
RT art::detail::resolve_if_present ( f,
std::string const &  caller,
RT  result 
)

Definition at line 20 of file PluginSymbolResolvers.h.

References e, and f.

Referenced by getAllowedConfiguration(), getFilePath(), getType< suffix_type::module >(), getType< suffix_type::plugin >(), and getType< suffix_type::tool >().

21  {
22  try {
23  result = f();
24  }
25  catch (cet::exception const& e) {
26  std::cout << "In: " << caller << std::endl;
27  std::cout << e.what() << std::endl;
28  }
29  return result;
30  }
TFile f
Definition: plotHisto.C:6
Float_t e
Definition: plot.C:34
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
art::RangeSet art::detail::resolveRangeSet ( RangeSetInfo const &  rs)

Definition at line 99 of file resolveRangeSet.cc.

References art::detail::RangeSetInfo::is_invalid(), art::detail::RangeSetInfo::ranges, and art::detail::RangeSetInfo::run.

Referenced by art::RootInputTree::fillAux(), art::RootDelayedReader::getProduct_(), art::detail::InfoDumperInputFile::getRangeSet(), and resolveRangeSet().

100 {
101  if (rsi.is_invalid()) {
102  return RangeSet::invalid();
103  }
104  return RangeSet{rsi.run, rsi.ranges};
105 }
RunNumber_t run() const
Definition: RangeSet.h:36
art::RangeSet art::detail::resolveRangeSet ( sqlite3 *  db,
std::string const &  filename,
BranchType  bt,
unsigned  rangeSetID,
bool  compact 
)

Definition at line 108 of file resolveRangeSet.cc.

References resolveRangeSet(), and resolveRangeSetInfo().

113 {
114  auto const& rsInfo =
115  resolveRangeSetInfo(db, filename, bt, rangeSetID, compact);
116  return resolveRangeSet(rsInfo);
117 }
RangeSetInfo resolveRangeSetInfo(sqlite3 *, std::string const &filename, BranchType, unsigned RangeSetID, bool compact)
RangeSet resolveRangeSet(RangeSetInfo const &rs)
art::detail::RangeSetInfo art::detail::resolveRangeSetInfo ( sqlite3 *  db,
std::string const &  filename,
BranchType  bt,
unsigned  RangeSetID,
bool  compact 
)

Definition at line 50 of file resolveRangeSet.cc.

References art::BranchTypeToString(), max, and util::flags::to_string().

Referenced by art::RootInputTree::fillAux(), art::detail::InfoDumperInputFile::getRangeSet(), and resolveRangeSet().

55 {
56  // Invalid rangeSetID check
57  if (rangeSetID == std::numeric_limits<unsigned>::max())
58  return RangeSetInfo::invalid();
59 
60  sqlite3_stmt* stmt{nullptr};
61  std::string const run_ddl{
62  "SELECT Run FROM " + BranchTypeToString(bt) +
63  "RangeSets WHERE rowid==" + std::to_string(rangeSetID) + ";"};
64  auto rc = sqlite3_prepare_v2(db, run_ddl.c_str(), -1, &stmt, nullptr);
65  successful_prepare(rc, filename, run_ddl);
66 
67  rc = sqlite3_step(stmt);
68  auto const r = static_cast<RunNumber_t>(sqlite3_column_int(stmt, 0));
69  rc = sqlite3_finalize(stmt);
70  successful_finalize(rc, sqlite3_errmsg(db), filename);
71 
72  std::string const result_column_begin{compact ? "min(begin)" : "begin"};
73  std::string const result_column_end{compact ? "max(end)" : "end"};
74  std::string const maybe_suffix{compact ? " GROUP BY SubRun" : ""};
75  std::string const ddl{
76  "SELECT SubRun," + result_column_begin + ',' + result_column_end +
77  " FROM EventRanges WHERE rowid IN"
78  "(SELECT EventRangesID FROM " +
79  BranchTypeToString(bt) + "RangeSets_EventRanges WHERE RangeSetsID==" +
80  std::to_string(rangeSetID) + ')' + maybe_suffix + ';'};
81  rc = sqlite3_prepare_v2(db, ddl.c_str(), -1, &stmt, nullptr);
82  successful_prepare(rc, filename, ddl);
83 
84  std::vector<EventRange> ranges;
85  while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
86  ranges.emplace_back(sqlite3_column_int(stmt, 0),
87  sqlite3_column_int(stmt, 1),
88  sqlite3_column_int(stmt, 2));
89  }
90  successful_step(rc, sqlite3_errmsg(db), filename);
91 
92  rc = sqlite3_finalize(stmt);
93  successful_finalize(rc, sqlite3_errmsg(db), filename);
94 
95  return RangeSetInfo{r, std::move(ranges)};
96 }
Int_t max
Definition: plot.C:27
std::string const & BranchTypeToString(BranchType const bt)
Definition: BranchType.cc:65
std::string to_string(Flag_t< Storage > const flag)
Convert a flag into a stream (shows its index).
Definition: BitMask.h:187
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:119
std::size_t art::detail::rule_size ( Widths const &  widths)
inline

Definition at line 70 of file PrintFormatting.h.

References indent0(), and w.

Referenced by print_available_plugins().

71  {
72  std::size_t result{indent0().size()};
73  for (std::size_t const w : widths)
74  result += w;
75  return result +=
76  (widths.size() - 1) * 4u; // Account for space between columns;
77  }
std::string indent0()
Float_t w
Definition: plot.C:23
bool art::detail::shouldDropEvents ( bool  dropAllEventsSet,
bool  dropAllEvents,
bool  dropAllSubRuns 
)

Definition at line 51 of file rootOutputConfigurationTools.cc.

References art::errors::Configuration.

Referenced by art::RootOutput::RootOutput().

54 {
55  if (!dropAllSubRuns)
56  return dropAllEvents;
57 
58  if (dropAllEventsSet && !dropAllEvents) {
60  << "\nThe following FHiCL specification is illegal\n\n"
61  << " dropAllEvents : false \n"
62  << " dropAllSubRuns : true \n\n"
63  << "[1] Both can be 'true', "
64  << "[2] both can be 'false', or "
65  << "[3] 'dropAllEvents : true' and 'dropAllSubRuns : false' "
66  << "is allowed.\n\n";
67  }
68  return true;
69 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
bool art::detail::shouldFastClone ( bool  fastCloningSet,
bool  fastCloning,
bool  wantAllEvents,
ClosingCriteria const &  fileProperties 
)

Definition at line 23 of file rootOutputConfigurationTools.cc.

References art::ClosingCriteria::granularity(), and art::Granularity::InputFile.

Referenced by art::RootOutputFile::beginInputFile(), and art::RootOutput::RootOutput().

27 {
28  bool result{fastCloning};
29  mf::LogInfo("FastCloning")
30  << "Initial fast cloning configuration "
31  << (fastCloningSet ? "(user-set): " : "(from default): ") << std::boolalpha
32  << fastCloning;
33 
34  if (fastCloning && !wantAllEvents) {
35  result = false;
36  mf::LogWarning("FastCloning")
37  << "Fast cloning deactivated due to presence of\n"
38  << "event selection configuration.";
39  }
40  if (fastCloning && maxCriterionSpecified(cc) &&
41  cc.granularity() < Granularity::InputFile) {
42  result = false;
43  mf::LogWarning("FastCloning")
44  << "Fast cloning deactivated due to request to allow\n"
45  << "output file switching at an Event, SubRun, or Run boundary.";
46  }
47  return result;
48 }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Long64_t art::detail::sizeOnDisk ( TTree *  t)

Definition at line 111 of file rootFileSizeTools.cc.

References GetTotalSize().

Referenced by art::RootSizeOnDisk::fillLevel2(), printBranchSummary(), printTreeSummary(), and art::RootSizeOnDisk::RootSizeOnDisk().

112 {
113  // Return the size on disk on this TTree.
114 
115  return GetTotalSize(t, true);
116 }
Long64_t GetTotalSize(TBranch *br, bool ondisk, bool inclusive)
Long64_t art::detail::sizeOnDisk ( TBranch *  branch,
bool  inclusive 
)

Definition at line 119 of file rootFileSizeTools.cc.

References GetTotalSize().

120 {
121  // Return the size on disk on this branch.
122  // If 'inclusive' is true, include also the size
123  // of all its sub-branches.
124 
125  return GetTotalSize(branch, true, inclusive);
126 }
Long64_t GetTotalSize(TBranch *br, bool ondisk, bool inclusive)
art::BranchKey art::detail::splitToComponents ( std::string const &  branchName,
std::string &  errMsg 
)

Definition at line 46 of file branchNameComponentChecking.cc.

Referenced by checkBranchNameSelector().

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 }
bool art::detail::supports_key ( suffix_type  st,
std::string const &  spec,
std::string const &  key 
)

Definition at line 116 of file AllowedConfiguration.cc.

References bold_fontify(), e, get_LibraryInfoCollection(), art::errors::LogicError, and fhicl::detail::SearchAllowedConfiguration::supports_key().

Referenced by art::BasicOutputOptionsHandler::doProcessOptions(), and print_available_plugins().

119 {
120  art::Exception e{art::errors::LogicError, "art::detail::has_key"};
121  auto coll = get_LibraryInfoCollection(st, spec);
122  if (coll.empty()) {
123  throw e << (spec.empty() ? "[Missing specification]" : bold_fontify(spec))
124  << " did not match any plugin.\n";
125  } else if (coll.size() > 1ull) {
126  throw e << bold_fontify(spec) << " matched more than one plugin.\n"
127  << "When querying plugin configurations, the plugin specification\n"
128  << "must resolve to a unique library.\n";
129  }
130  if (auto config = coll.begin()->allowed_config()) {
132  *config->parameter_base(), key);
133  }
134  return false;
135 }
std::string bold_fontify(std::string const &s)
Definition: bold_fontify.h:9
LibraryInfoCollection get_LibraryInfoCollection(suffix_type suffix, std::string const &pattern, bool const verbose=false)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
Float_t e
Definition: plot.C:34
static bool supports_key(ParameterBase const &pb, std::string const &searched_for_key)
void art::detail::throw_if_invalid ( std::string const &  )
inline

Definition at line 63 of file Handle.h.

Referenced by art::ValidHandle< T >::swap(), throw_if_invalid(), and art::SummedValue< T >::update().

64  {}
template<typename H , typename... T>
void art::detail::throw_if_invalid ( std::string const &  msg,
H const &  h,
T const &...  t 
)

Definition at line 68 of file Handle.h.

References art::disjoint_ranges(), art::errors::NullPointerError, art::overlapping_ranges(), art::range_of_validity(), art::same_ranges(), throw_if_invalid(), and fhicl::detail::atom::value().

69  {
70  if (!h.isValid())
71  throw Exception{art::errors::NullPointerError} << msg << '\n';
72  throw_if_invalid(msg, t...);
73  }
void throw_if_invalid(std::string const &msg, H const &h, T const &...t)
Definition: Handle.h:68
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.

References art::errors::LogicError.

Referenced by art::Assns< L, R, void >::makePartner_(), and art::Assns< L, R, D >::makePartner_().

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 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::detail::timeReport ( cet::cpu_timer const &  timer)

Definition at line 190 of file writeSummary.cc.

Referenced by writeSummary().

191 {
192  LogPrint("ArtSummary") << "TimeReport "
193  << "---------- Time Summary ---[sec]----";
194  LogPrint("ArtSummary") << "TimeReport " << setprecision(6) << fixed
195  << "CPU = " << timer.cpuTime()
196  << " Real = " << timer.realTime();
197 }
MaybeLogger_< ELseverityLevel::ELsev_warning, true > LogPrint
void art::detail::triggerReport ( PathsInfo const &  endPathsInfo,
PathsInfo const &  triggerPathsInfo,
bool  wantSummary 
)

Definition at line 72 of file writeSummary.cc.

References art::PathsInfo::failedEvents(), art::PathsInfo::passedEvents(), art::PathsInfo::pathPtrs(), art::right(), art::PathsInfo::totalEvents(), and art::PathsInfo::workers().

Referenced by writeSummary().

75 {
76  // The trigger report (pass/fail etc.):
77  // Printed even if summary not requested, per issue #1864.
78  LogPrint("ArtSummary") << "TrigReport "
79  << "---------- Event Summary ------------";
80  LogPrint("ArtSummary") << "TrigReport"
81  << " Events total = " << tpi.totalEvents()
82  << " passed = " << tpi.passedEvents()
83  << " failed = " << tpi.failedEvents();
84  if (wantSummary) {
85  LogPrint("ArtSummary") << "";
86  LogPrint("ArtSummary") << "TrigReport "
87  << "---------- Path Summary ------------";
88  LogPrint("ArtSummary") << "TrigReport " << right << setw(10) << "Trig Bit#"
89  << " " << right << setw(10) << "Run"
90  << " " << right << setw(10) << "Passed"
91  << " " << right << setw(10) << "Failed"
92  << " " << right << setw(10) << "Error"
93  << " "
94  << "Name";
95  for (auto const& path : tpi.pathPtrs()) {
96  LogPrint("ArtSummary")
97  << "TrigReport " << right << setw(5) << 1 << right << setw(5)
98  << path->bitPosition() << " " << right << setw(10) << path->timesRun()
99  << " " << right << setw(10) << path->timesPassed() << " " << right
100  << setw(10) << path->timesFailed() << " " << right << setw(10)
101  << path->timesExcept() << " " << path->name();
102  }
103  LogPrint("ArtSummary") << "";
104  LogPrint("ArtSummary") << "TrigReport "
105  << "-------End-Path Summary ------------";
106  LogPrint("ArtSummary") << "TrigReport " << right << setw(10) << "Trig Bit#"
107  << " " << right << setw(10) << "Run"
108  << " " << right << setw(10) << "Success"
109  << " " << right << setw(10) << "Error"
110  << " "
111  << "Name";
112  for (auto const& path : epi.pathPtrs()) {
113  LogPrint("ArtSummary")
114  << "TrigReport " << right << setw(5) << 0 << right << setw(5)
115  << path->bitPosition() << " " << right << setw(10) << path->timesRun()
116  << " " << right << setw(10) << path->timesPassed() << " " << right
117  << setw(10) << path->timesExcept() << " " << path->name();
118  }
119  for (auto const& path : tpi.pathPtrs()) {
120  LogPrint("ArtSummary") << "";
121  LogPrint("ArtSummary")
122  << "TrigReport "
123  << "---------- Modules in Path: " << path->name() << " ------------";
124  LogPrint("ArtSummary")
125  << "TrigReport " << right << setw(10) << "Trig Bit#"
126  << " " << right << setw(10) << "Visited"
127  << " " << right << setw(10) << "Passed"
128  << " " << right << setw(10) << "Failed"
129  << " " << right << setw(10) << "Error"
130  << " "
131  << "Name";
132  workersInPathTriggerReport(1, path->bitPosition(), path->workersInPath());
133  }
134  }
135 
136  // Printed even if summary not requested, per issue #1864.
137  for (auto const& path : epi.pathPtrs()) {
138  LogPrint("ArtSummary") << "";
139  LogPrint("ArtSummary") << "TrigReport "
140  << "------ Modules in End-Path: " << path->name()
141  << " ------------";
142  LogPrint("ArtSummary") << "TrigReport " << right << setw(10) << "Trig Bit#"
143  << " " << right << setw(10) << "Run"
144  << " " << right << setw(10) << "Success"
145  << " " << right << setw(10) << "Error"
146  << " "
147  << "Name";
148  workersInEndPathTriggerReport(
149  0, path->bitPosition(), path->workersInPath());
150  }
151 
152  if (wantSummary) {
153  // This table can arguably be removed since all summary
154  // information is better described aboved.
155  LogPrint("ArtSummary") << "";
156  LogPrint("ArtSummary") << "TrigReport "
157  << "---------- Module Summary ------------";
158  LogPrint("ArtSummary") << "TrigReport " << right << setw(10) << "Visited"
159  << " " << right << setw(10) << "Run"
160  << " " << right << setw(10) << "Passed"
161  << " " << right << setw(10) << "Failed"
162  << " " << right << setw(10) << "Error"
163  << " "
164  << "Name";
165 
166  for (auto const& val : tpi.workers()) {
167  LogPrint("ArtSummary")
168  << "TrigReport " << right << setw(10) << val.second->timesVisited()
169  << " " << right << setw(10) << val.second->timesRun() << " " << right
170  << setw(10) << val.second->timesPassed() << " " << right << setw(10)
171  << val.second->timesFailed() << " " << right << setw(10)
172  << val.second->timesExcept() << " " << val.first;
173  }
174 
175  for (auto const& val : epi.workers()) {
176  // Instead of timesVisited(), which is confusing for the user
177  // for end-path modules, we just report timesRun() as a proxy
178  // for visited.
179  LogPrint("ArtSummary")
180  << "TrigReport " << right << setw(10) << val.second->timesVisited()
181  << " " << right << setw(10) << val.second->timesRun() << " " << right
182  << setw(10) << val.second->timesPassed() << " " << right << setw(10)
183  << val.second->timesFailed() << " " << right << setw(10)
184  << val.second->timesExcept() << " " << val.first;
185  }
186  }
187 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
MaybeLogger_< ELseverityLevel::ELsev_warning, true > LogPrint
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.

References art::errors::Configuration.

Referenced by art::RootOutput::RootOutput(), and art::TFileService::TFileService().

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

Definition at line 16 of file verify_names.cc.

References art::errors::LogicError.

Referenced by art::ProductRegistryHelper::produces(), and art::ProductRegistryHelper::reconstitutes().

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.

References art::errors::Configuration.

Referenced by art::ProductRegistryHelper::produces(), and art::ProductRegistryHelper::reconstitutes().

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 204 of file CollectionUtilities.h.

References in.

Referenced by art::flattenCollections(), and art::detail::mix_offset< cet::map_vector< P > >::offset().

206 {
207  return verifyPtrCollection(in.begin(), in.end());
208 }
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 213 of file CollectionUtilities.h.

References evd::details::end().

217 {
218  if (beg == end)
219  return true;
220  if (!id.isValid()) {
221  id = (*beg).id();
222  }
223  if (!getter) {
224  getter = (*beg).productGetter();
225  }
226  for (iterator i = beg; i != end; ++i) {
227  if ((*i) != nullptr &&
228  !((*i)->productGetter() && (*i)->productGetter() == getter &&
229  (*i)->id().isValid() && (*i)->id() == id)) {
230  return false;
231  }
232  }
233  return true;
234 }
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void art::detail::writeSummary ( PathManager pm,
bool  wantSummary,
cet::cpu_timer const &  timer 
)

Definition at line 55 of file writeSummary.cc.

References art::PathManager::endPathInfo(), memoryReport(), timeReport(), art::PathManager::triggerPathsInfo(), and triggerReport().

Referenced by art::EventProcessor::endJob().

58 {
59  // Still only assuming one schedule. Will need to loop when we get around to
60  // it.
61  auto const& epi = pm.endPathInfo();
62  auto const& tpi = pm.triggerPathsInfo(ScheduleID::first());
63  LogPrint("ArtSummary") << "";
64  triggerReport(epi, tpi, wantSummary);
65  LogPrint("ArtSummary") << "";
66  timeReport(jobTimer);
67  LogPrint("ArtSummary") << "";
68  memoryReport();
69 }
void triggerReport(PathsInfo const &endPathsInfo, PathsInfo const &triggerPathsInfo, bool wantSummary)
Definition: writeSummary.cc:72
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 27 of file ServiceHandleAllowed.h.