From d5fbf7ddeafe2e9a3bc49a931f78ec438eaa5987 Mon Sep 17 00:00:00 2001 From: "W. David Dagenhart" Date: Fri, 25 Oct 2024 00:26:06 +0200 Subject: [PATCH] Print ES module dependences from Tracer --- .../interface/CallbackProductResolver.h | 2 + FWCore/Framework/interface/EDConsumerBase.h | 36 +- FWCore/Framework/interface/ESProducer.h | 12 + .../Framework/interface/ESProductResolver.h | 4 + FWCore/Framework/interface/ESTagGetter.h | 2 + .../Framework/interface/EventSetupProvider.h | 3 + .../interface/EventSetupRecordImpl.h | 3 + .../interface/EventSetupRecordProvider.h | 3 + .../interface/PathsAndConsumesOfModules.h | 39 +- FWCore/Framework/interface/Schedule.h | 12 +- FWCore/Framework/interface/SubProcess.h | 2 + .../interface/es_impl/MayConsumeChooserBase.h | 1 - FWCore/Framework/interface/maker/Worker.h | 11 +- FWCore/Framework/interface/maker/WorkerT.h | 19 + .../interface/stream/EDAnalyzerAdaptorBase.h | 13 +- .../stream/ProducingModuleAdaptorBase.h | 14 +- FWCore/Framework/src/EDConsumerBase.cc | 90 +- FWCore/Framework/src/ESProducer.cc | 167 ++++ FWCore/Framework/src/EventProcessor.cc | 6 + FWCore/Framework/src/EventSetupProvider.cc | 17 + FWCore/Framework/src/EventSetupRecordImpl.cc | 26 +- .../Framework/src/EventSetupRecordProvider.cc | 11 + .../src/PathsAndConsumesOfModules.cc | 65 ++ FWCore/Framework/src/Schedule.cc | 29 + FWCore/Framework/src/SubProcess.cc | 8 + .../src/stream/EDAnalyzerAdaptorBase.cc | 15 +- .../src/stream/ProducingModuleAdaptorBase.cc | 17 +- ...orModuleDependencyCorrectness_t.cppunit.cc | 35 + FWCore/Integration/plugins/BuildFile.xml | 7 +- .../plugins/ConsumeIOVTestInfoAnalyzer.cc | 56 ++ FWCore/Integration/plugins/ConsumeWhatsIt.cc | 200 ++++ .../Integration/plugins/MayConsumeWhatsIt.cc | 103 ++ .../Integration/plugins/RunLumiESAnalyzer.cc | 51 +- FWCore/Integration/plugins/RunLumiESSource.cc | 20 + FWCore/Integration/test/run_TestGetBy.sh | 2 +- .../Integration/test/testConsumesInfo_cfg.py | 108 +++ .../unit_test_outputs/testConsumesInfo_1.log | 903 +++++++++++++----- .../interface/ActivityRegistry.h | 10 + .../interface/EventSetupConsumesInfo.h | 66 ++ .../interface/PathsAndConsumesOfModulesBase.h | 88 +- .../ServiceRegistry/src/ActivityRegistry.cc | 2 + .../src/EventSetupConsumesInfo.cc | 24 + FWCore/Services/plugins/Tracer.cc | 378 ++++++-- 43 files changed, 2280 insertions(+), 400 deletions(-) create mode 100644 FWCore/Integration/plugins/ConsumeIOVTestInfoAnalyzer.cc create mode 100644 FWCore/Integration/plugins/ConsumeWhatsIt.cc create mode 100644 FWCore/Integration/plugins/MayConsumeWhatsIt.cc create mode 100644 FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h create mode 100644 FWCore/ServiceRegistry/src/EventSetupConsumesInfo.cc diff --git a/FWCore/Framework/interface/CallbackProductResolver.h b/FWCore/Framework/interface/CallbackProductResolver.h index 5006a1abc30fa..a9623aece8143 100644 --- a/FWCore/Framework/interface/CallbackProductResolver.h +++ b/FWCore/Framework/interface/CallbackProductResolver.h @@ -75,6 +75,8 @@ namespace edm::eventsetup { CallbackProductResolver(const CallbackProductResolver&) = delete; const CallbackProductResolver& operator=(const CallbackProductResolver&) = delete; + unsigned int transitionID() const final { return callback_->transitionID(); } + private: DataT data_{}; edm::propagate_const> callback_; diff --git a/FWCore/Framework/interface/EDConsumerBase.h b/FWCore/Framework/interface/EDConsumerBase.h index cb36a70bc0de1..d48c9c9f546b2 100644 --- a/FWCore/Framework/interface/EDConsumerBase.h +++ b/FWCore/Framework/interface/EDConsumerBase.h @@ -26,9 +26,9 @@ #include #include #include +#include // user include files -#include "DataFormats/Provenance/interface/BranchType.h" #include "DataFormats/Provenance/interface/ProvenanceFwd.h" #include "FWCore/Common/interface/FWCoreCommonFwd.h" #include "FWCore/Framework/interface/ProductResolverIndexAndSkipBit.h" @@ -37,6 +37,8 @@ #include "FWCore/Framework/interface/DataKey.h" #include "FWCore/Framework/interface/data_default_record_trait.h" #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" +#include "FWCore/Utilities/interface/BranchType.h" #include "FWCore/Utilities/interface/ESIndices.h" #include "FWCore/Utilities/interface/TypeID.h" #include "FWCore/Utilities/interface/TypeToGet.h" @@ -67,8 +69,10 @@ namespace edm { class WillGetIfMatch; namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; - } + class EventSetupProvider; + } // namespace eventsetup class EDConsumerBase { public: @@ -117,10 +121,16 @@ namespace edm { std::map const& labelsToDesc, std::string const& processName) const; + void esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const&, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const; + /// Convert "@currentProcess" in InputTag process names to the actual current process name. void convertCurrentProcessAlias(std::string const& processName); std::vector consumesInfo() const; + std::vector eventSetupConsumesInfo(eventsetup::EventSetupProvider const&) const; ESResolverIndex const* esGetTokenIndices(edm::Transition iTrans) const { if (iTrans < edm::Transition::NumberOfEventSetupTransitions) { @@ -288,21 +298,21 @@ namespace edm { unsigned int m_startOfComponentName; }; - // TODO We would like to be able to access m_esTokenInfo from the - // index in the token, but this is currently not possible. One idea - // for this is to order the entries in m_esToken so that all the ones - // for transition 0 come first, then the ones for for transition 1 - // and so on for all the transitions. Within a transition, the - // entries would be in the same order in m_esTokenInfo and - // esItemsToGetFromTransition_. This is something for future - // development and might require a change to SoATuple to support - // inserts in the middle of the data structure. enum { kESLookupInfo, kESResolverIndex }; edm::SoATuple m_esTokenInfo; - std::array, static_cast(edm::Transition::NumberOfEventSetupTransitions)> - esItemsToGetFromTransition_; + + using ResolverIndexContainer = + std::array, + static_cast(edm::Transition::NumberOfEventSetupTransitions)>; + ResolverIndexContainer esItemsToGetFromTransition_; + std::array, static_cast(edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_; + + // Ordered same as m_esTokenInfo, contents are indexes into esItemsToGetFromTransition_ + std::vector::size_type>> + consumesIndexToTransitionAndTokenIndex_; + bool frozen_; bool containsCurrentProcessAlias_; }; diff --git a/FWCore/Framework/interface/ESProducer.h b/FWCore/Framework/interface/ESProducer.h index a5d833670eddf..da6239bfd1227 100644 --- a/FWCore/Framework/interface/ESProducer.h +++ b/FWCore/Framework/interface/ESProducer.h @@ -72,6 +72,7 @@ Example: two algorithms each creating only one objects #include #include #include +#include // user include files #include "FWCore/Framework/interface/ESConsumesCollector.h" @@ -88,10 +89,15 @@ Example: two algorithms each creating only one objects #include "FWCore/Framework/interface/SharedResourcesAcquirer.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" + // forward declarations namespace edm { namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; + class EventSetupProvider; + //used by ESProducer to create the proper Decorator based on the // argument type passed. The default it to just 'pass through' // the argument as the decorator itself @@ -154,6 +160,12 @@ namespace edm { SerialTaskQueueChain& queue() { return acquirer_.serialQueueChain(); } + void esModulesWhoseProductsAreConsumed(eventsetup::EventSetupProvider const& eventSetupProvider, + std::vector& esModules) const; + + std::vector> eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const; + protected: /** Specify the names of the shared resources used by this ESProducer */ void usesResources(std::vector const&); diff --git a/FWCore/Framework/interface/ESProductResolver.h b/FWCore/Framework/interface/ESProductResolver.h index eb84151a6acee..375cfcfb975f9 100644 --- a/FWCore/Framework/interface/ESProductResolver.h +++ b/FWCore/Framework/interface/ESProductResolver.h @@ -71,6 +71,10 @@ namespace edm { virtual void initializeForNewIOV() {} + // Counts setWhatProduced calls if creating module class derives from ESProducer. + // Currently, all others cases always return 0 (CondDBESSource, unit tests...). + virtual unsigned int transitionID() const { return 0; } + protected: /**This is the function which does the real work of getting the data if it is not already cached. The returning 'void const*' must point to an instance of the class diff --git a/FWCore/Framework/interface/ESTagGetter.h b/FWCore/Framework/interface/ESTagGetter.h index 57812917d553f..e7cc5b68dc687 100644 --- a/FWCore/Framework/interface/ESTagGetter.h +++ b/FWCore/Framework/interface/ESTagGetter.h @@ -62,6 +62,8 @@ namespace edm { ///Returns true if the Record being searched contains no products of the proper type bool hasNothingToGet() const { return lookup_.empty(); } + std::vector const& lookup() const { return lookup_; } + private: std::vector lookup_; }; diff --git a/FWCore/Framework/interface/EventSetupProvider.h b/FWCore/Framework/interface/EventSetupProvider.h index a1960604921cf..11771caf87009 100644 --- a/FWCore/Framework/interface/EventSetupProvider.h +++ b/FWCore/Framework/interface/EventSetupProvider.h @@ -122,6 +122,9 @@ namespace edm { void fillKeys(std::set& keys) const; EventSetupRecordProvider* tryToGetRecordProvider(const EventSetupRecordKey& iKey); + EventSetupRecordProvider const* tryToGetRecordProvider(const EventSetupRecordKey& iKey) const; + + void fillAllESProductResolverProviders(std::vector&) const; private: std::shared_ptr& recordProvider(const EventSetupRecordKey& iKey); diff --git a/FWCore/Framework/interface/EventSetupRecordImpl.h b/FWCore/Framework/interface/EventSetupRecordImpl.h index e48ca71ec8554..e1c9f835d89de 100644 --- a/FWCore/Framework/interface/EventSetupRecordImpl.h +++ b/FWCore/Framework/interface/EventSetupRecordImpl.h @@ -150,6 +150,9 @@ namespace edm { void invalidateResolvers(); void resetIfTransientInResolvers(); + ComponentDescription const* componentDescription(ESResolverIndex iResolverIndex) const; + unsigned int transitionID(ESResolverIndex iResolverIndex) const; + private: void const* getFromResolverAfterPrefetch(ESResolverIndex iResolverIndex, bool iTransientAccessOnly, diff --git a/FWCore/Framework/interface/EventSetupRecordProvider.h b/FWCore/Framework/interface/EventSetupRecordProvider.h index 7c426715fa701..5bb5646bee354 100644 --- a/FWCore/Framework/interface/EventSetupRecordProvider.h +++ b/FWCore/Framework/interface/EventSetupRecordProvider.h @@ -159,6 +159,9 @@ namespace edm { IntervalStatus intervalStatus() const { return intervalStatus_; } + void fillAllESProductResolverProviders(std::vector&, + std::set& componentIDs) const; + void updateLookup(ESRecordsToProductResolverIndices const&); protected: diff --git a/FWCore/Framework/interface/PathsAndConsumesOfModules.h b/FWCore/Framework/interface/PathsAndConsumesOfModules.h index 46d709c7bfe64..08fa82f84318e 100644 --- a/FWCore/Framework/interface/PathsAndConsumesOfModules.h +++ b/FWCore/Framework/interface/PathsAndConsumesOfModules.h @@ -13,10 +13,12 @@ // Created: 11/5/2014 #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" #include "FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h" #include "FWCore/Framework/interface/ModuleProcessName.h" #include "FWCore/Utilities/interface/BranchType.h" +#include "FWCore/Utilities/interface/Transition.h" #include #include @@ -30,12 +32,20 @@ namespace edm { class ProductRegistry; class Schedule; + namespace eventsetup { + struct ComponentDescription; + class ESProductResolverProvider; + class EventSetupProvider; + } // namespace eventsetup + class PathsAndConsumesOfModules : public PathsAndConsumesOfModulesBase { public: PathsAndConsumesOfModules(); ~PathsAndConsumesOfModules() override; void initialize(Schedule const*, std::shared_ptr); + void initializeForEventSetup(eventsetup::EventSetupProvider const&); + void checkEventSetupInitialization() const; void removeModules(std::vector const& modules); @@ -54,10 +64,20 @@ namespace edm { std::vector const& doModulesWhoseProductsAreConsumedBy( unsigned int moduleID, BranchType branchType) const override; + std::vector const& doESModulesWhoseProductsAreConsumedBy( + unsigned int moduleID, Transition) const override; + std::vector doConsumesInfo(unsigned int moduleID) const override; + std::vector doEventSetupConsumesInfo(unsigned int moduleID) const override; unsigned int doLargestModuleID() const override; + std::vector const& doAllESProductResolverProviders() const override; + std::vector> const& + doESModulesWhoseProductsAreConsumedByESModule() const override; + std::vector> doEventSetupConsumesInfo( + ESProducer const& esProducer) const override; + unsigned int moduleIndex(unsigned int moduleID) const; // data members @@ -67,18 +87,27 @@ namespace edm { std::vector allModuleDescriptions_; - std::vector > modulesOnPaths_; - std::vector > modulesOnEndPaths_; + std::vector> modulesOnPaths_; + std::vector> modulesOnEndPaths_; // Gives a translation from the module ID to the index into the // following data member - std::vector > moduleIDToIndex_; + std::vector> moduleIDToIndex_; + + std::array>, NumBranchTypes> modulesWhoseProductsAreConsumedBy_; + std::vector> modulesInPreviousProcessesWhoseProductsAreConsumedBy_; + + std::array>, + static_cast(Transition::NumberOfEventSetupTransitions)> + esModulesWhoseProductsAreConsumedBy_; - std::array >, NumBranchTypes> modulesWhoseProductsAreConsumedBy_; - std::vector > modulesInPreviousProcessesWhoseProductsAreConsumedBy_; + std::vector allESProductResolverProviders_; + std::vector> esModulesWhoseProductsAreConsumedByESModule_; Schedule const* schedule_; + eventsetup::EventSetupProvider const* eventSetupProvider_; std::shared_ptr preg_; + bool eventSetupInfoInitialized_ = false; }; std::vector nonConsumedUnscheduledModules( diff --git a/FWCore/Framework/interface/Schedule.h b/FWCore/Framework/interface/Schedule.h index 4216862fae441..3bf9d937e52a0 100644 --- a/FWCore/Framework/interface/Schedule.h +++ b/FWCore/Framework/interface/Schedule.h @@ -81,6 +81,7 @@ #include "FWCore/Utilities/interface/StreamID.h" #include "FWCore/Utilities/interface/get_underlying_safe.h" #include "FWCore/Utilities/interface/propagate_const.h" +#include "FWCore/Utilities/interface/Transition.h" #include #include @@ -97,9 +98,11 @@ namespace edm { namespace service { class TriggerNamesService; } - namespace evetnsetup { + namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; - } + class EventSetupProvider; + } // namespace eventsetup class BranchIDListHelper; class EventTransitionInfo; @@ -254,6 +257,11 @@ namespace edm { std::vector>& modulesInPreviousProcessesWhoseProductsAreConsumedBy, ProductRegistry const& preg) const; + void fillESModuleAndConsumesInfo(eventsetup::EventSetupProvider const&, + std::array>, + static_cast(Transition::NumberOfEventSetupTransitions)>& + esModulesWhoseProductsAreConsumedBy) const; + /// Return the number of events this Schedule has tried to process /// (inclues both successes and failures, including failures due /// to exceptions during processing). diff --git a/FWCore/Framework/interface/SubProcess.h b/FWCore/Framework/interface/SubProcess.h index 5cc9ccce32ec9..7a037f7d11003 100644 --- a/FWCore/Framework/interface/SubProcess.h +++ b/FWCore/Framework/interface/SubProcess.h @@ -239,6 +239,8 @@ namespace edm { for_all(subProcesses_, [](auto& subProcess) { subProcess.clearCounters(); }); } + void initializePathsAndConsumes(); + private: void beginJob(); void endJob(ExceptionCollector&); diff --git a/FWCore/Framework/interface/es_impl/MayConsumeChooserBase.h b/FWCore/Framework/interface/es_impl/MayConsumeChooserBase.h index 167407a318df1..747c7e17611d1 100644 --- a/FWCore/Framework/interface/es_impl/MayConsumeChooserBase.h +++ b/FWCore/Framework/interface/es_impl/MayConsumeChooserBase.h @@ -39,7 +39,6 @@ namespace edm::eventsetup::impl { void setTagGetter(ESTagGetter iGetter) { getter_ = std::move(iGetter); } - protected: ESTagGetter const& tagGetter() const { return getter_; } private: diff --git a/FWCore/Framework/interface/maker/Worker.h b/FWCore/Framework/interface/maker/Worker.h index 06de21a714a68..ccbdfae1a5af7 100644 --- a/FWCore/Framework/interface/maker/Worker.h +++ b/FWCore/Framework/interface/maker/Worker.h @@ -37,6 +37,7 @@ the worker is reset(). #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" #include "FWCore/ServiceRegistry/interface/InternalContext.h" #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h" #include "FWCore/ServiceRegistry/interface/ParentContext.h" @@ -85,8 +86,10 @@ namespace edm { class CallImpl; } namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; - } + class EventSetupProvider; + } // namespace eventsetup class Worker { public: @@ -224,9 +227,15 @@ namespace edm { ProductRegistry const& preg, std::map const& labelsToDesc) const = 0; + virtual void esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const&, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const = 0; + virtual void convertCurrentProcessAlias(std::string const& processName) = 0; virtual std::vector consumesInfo() const = 0; + virtual std::vector eventSetupConsumesInfo(eventsetup::EventSetupProvider const&) const = 0; virtual Types moduleType() const = 0; virtual ConcurrencyTypes moduleConcurrencyType() const = 0; diff --git a/FWCore/Framework/interface/maker/WorkerT.h b/FWCore/Framework/interface/maker/WorkerT.h index 6878a753e63af..be06338a82096 100644 --- a/FWCore/Framework/interface/maker/WorkerT.h +++ b/FWCore/Framework/interface/maker/WorkerT.h @@ -13,7 +13,10 @@ WorkerT: Code common to all workers. #include "FWCore/Framework/interface/maker/Worker.h" #include "FWCore/Framework/interface/maker/WorkerParams.h" #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" +#include "FWCore/Utilities/interface/BranchType.h" #include "FWCore/Utilities/interface/propagate_const.h" +#include "FWCore/Utilities/interface/Transition.h" #include #include @@ -29,6 +32,11 @@ namespace edm { class ThinnedAssociationsHelper; class WaitingTaskWithArenaHolder; + namespace eventsetup { + struct ComponentDescription; + class EventSetupProvider; + } // namespace eventsetup + template class WorkerT : public Worker { public: @@ -132,11 +140,22 @@ namespace edm { modules, modulesInPreviousProcesses, preg, labelsToDesc, module_->moduleDescription().processName()); } + void esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const override { + module_->esModulesWhoseProductsAreConsumed(eventSetupProvider, esModules); + } + void convertCurrentProcessAlias(std::string const& processName) override { module_->convertCurrentProcessAlias(processName); } std::vector consumesInfo() const override { return module_->consumesInfo(); } + std::vector eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const override { + return module_->eventSetupConsumesInfo(eventSetupProvider); + } void itemsToGet(BranchType branchType, std::vector& indexes) const override { module_->itemsToGet(branchType, indexes); diff --git a/FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h b/FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h index dcc6429d2be55..b5f407cd49fbf 100644 --- a/FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h +++ b/FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h @@ -25,14 +25,15 @@ #include // user include files -#include "DataFormats/Provenance/interface/BranchType.h" #include "FWCore/Utilities/interface/ProductResolverIndex.h" #include "FWCore/Common/interface/FWCoreCommonFwd.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "DataFormats/Provenance/interface/ModuleDescription.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" #include "FWCore/Concurrency/interface/WaitingTaskHolder.h" +#include "FWCore/Utilities/interface/BranchType.h" #include "FWCore/Utilities/interface/StreamID.h" #include "FWCore/Utilities/interface/RunIndex.h" #include "FWCore/Utilities/interface/LuminosityBlockIndex.h" @@ -57,8 +58,10 @@ namespace edm { } namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; - } + class EventSetupProvider; + } // namespace eventsetup namespace stream { class EDAnalyzerBase; @@ -123,9 +126,15 @@ namespace edm { std::map const& labelsToDesc, std::string const& processName) const; + void esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const&, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const; + void convertCurrentProcessAlias(std::string const& processName); std::vector consumesInfo() const; + std::vector eventSetupConsumesInfo(eventsetup::EventSetupProvider const&) const; void deleteModulesEarly(); diff --git a/FWCore/Framework/interface/stream/ProducingModuleAdaptorBase.h b/FWCore/Framework/interface/stream/ProducingModuleAdaptorBase.h index 3c72dc17be85f..cc4d62a320d5e 100644 --- a/FWCore/Framework/interface/stream/ProducingModuleAdaptorBase.h +++ b/FWCore/Framework/interface/stream/ProducingModuleAdaptorBase.h @@ -26,21 +26,23 @@ #include // user include files -#include "DataFormats/Provenance/interface/BranchType.h" #include "FWCore/Utilities/interface/ProductResolverIndex.h" #include "FWCore/Common/interface/FWCoreCommonFwd.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "DataFormats/Provenance/interface/ModuleDescription.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" +#include "FWCore/Utilities/interface/BranchType.h" #include "FWCore/Utilities/interface/StreamID.h" #include "FWCore/Utilities/interface/RunIndex.h" #include "FWCore/Utilities/interface/LuminosityBlockIndex.h" #include "FWCore/Utilities/interface/ESIndices.h" +#include "FWCore/Utilities/interface/Transition.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/ProcessBlock.h" #include "FWCore/Framework/interface/Run.h" #include "FWCore/Framework/interface/LuminosityBlock.h" #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" // forward declarations @@ -63,8 +65,10 @@ namespace edm { } namespace eventsetup { + struct ComponentDescription; class ESRecordsToProductResolverIndices; - } + class EventSetupProvider; + } // namespace eventsetup namespace stream { template @@ -115,9 +119,15 @@ namespace edm { std::map const& labelsToDesc, std::string const& processName) const; + void esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const&, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const; + void convertCurrentProcessAlias(std::string const& processName); std::vector consumesInfo() const; + std::vector eventSetupConsumesInfo(eventsetup::EventSetupProvider const&) const; using ModuleToResolverIndicies = std::unordered_multimap>; diff --git a/FWCore/Framework/src/EDConsumerBase.cc b/FWCore/Framework/src/EDConsumerBase.cc index 3687e7db26fbb..aba85c94d737a 100644 --- a/FWCore/Framework/src/EDConsumerBase.cc +++ b/FWCore/Framework/src/EDConsumerBase.cc @@ -11,21 +11,22 @@ // // system include files -#include #include -#include #include #include -#include +#include // user include files +#include "DataFormats/Provenance/interface/BranchType.h" #include "FWCore/Framework/interface/EDConsumerBase.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/ESRecordsToProductResolverIndices.h" #include "FWCore/Framework/interface/ComponentDescription.h" +#include "FWCore/Framework/interface/EventSetupProvider.h" +#include "FWCore/Framework/interface/EventSetupRecordImpl.h" +#include "FWCore/Framework/interface/EventSetupRecordProvider.h" #include "FWCore/Framework/interface/ModuleProcessName.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/Utilities/interface/BranchType.h" #include "FWCore/Utilities/interface/Likely.h" #include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/Provenance/interface/ProductResolverIndexHelper.h" @@ -173,8 +174,10 @@ void EDConsumerBase::updateLookup(eventsetup::ESRecordsToProductResolverIndices for (auto& itemIndex : items) { if (itemIndex.value() == negIndex) { itemIndex = indexInRecord; - esRecordsToGetFromTransition_[&items - &esItemsToGetFromTransition_.front()][&itemIndex - &items.front()] = - iPI.recordIndexFor(it->m_record); + ResolverIndexContainer::size_type transitionIndex = &items - &esItemsToGetFromTransition_.front(); + std::vector::size_type indexToItemInTransition = &itemIndex - &items.front(); + esRecordsToGetFromTransition_[transitionIndex][indexToItemInTransition] = iPI.recordIndexFor(it->m_record); + consumesIndexToTransitionAndTokenIndex_.emplace_back(transitionIndex, indexToItemInTransition); negIndex = 1; break; } @@ -520,6 +523,34 @@ void EDConsumerBase::modulesWhoseProductsAreConsumed( } } +void EDConsumerBase::esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const { + std::array, static_cast(Transition::NumberOfEventSetupTransitions)> alreadyFound; + + unsigned int index = 0; + auto itResolver = m_esTokenInfo.begin(); + for (auto it = m_esTokenInfo.begin(); it != m_esTokenInfo.end(); + ++it, ++itResolver, ++index) { + eventsetup::EventSetupRecordProvider const* eventSetupRecordProvider = + eventSetupProvider.tryToGetRecordProvider(it->m_record); + if (eventSetupRecordProvider) { + eventsetup::EventSetupRecordImpl const& eventSetupRecordImpl = eventSetupRecordProvider->firstRecordImpl(); + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl.componentDescription(*itResolver); + if (componentDescription) { + std::string const& moduleLabel = + componentDescription->label_.empty() ? componentDescription->type_ : componentDescription->label_; + ResolverIndexContainer::size_type transitionIndex = consumesIndexToTransitionAndTokenIndex_[index].first; + if (alreadyFound[transitionIndex].insert(moduleLabel).second) { + esModules[transitionIndex]->push_back(componentDescription); + } + } + } + } +} + void EDConsumerBase::convertCurrentProcessAlias(std::string const& processName) { frozen_ = true; @@ -592,3 +623,50 @@ std::vector EDConsumerBase::consumesInfo() const { } return result; } + +std::vector EDConsumerBase::eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const { + std::vector result; + + EventSetupConsumesInfo info; + + unsigned int index = 0; + auto itResolver = m_esTokenInfo.begin(); + for (auto it = m_esTokenInfo.begin(); it != m_esTokenInfo.end(); + ++it, ++itResolver, ++index) { + info.eventSetupRecordType_ = it->m_record.name(); + info.productType_ = it->m_key.type().name(); + info.productLabel_ = it->m_key.name().value(); + info.requestedModuleLabel_ = &(m_tokenLabels[it->m_startOfComponentName]); + info.transitionOfConsumer_ = consumesIndexToTransitionAndTokenIndex_[index].first; + info.moduleLabelMismatch_ = *itResolver == ESResolverIndex::moduleLabelDoesNotMatch(); + + // Initial values used in the case where there isn't an EventSetup + // module to produce the requested data. Test whether moduleType + // is empty to identify this case because it will be empty if and + // only if this is true. + info.moduleType_ = {}; + info.moduleLabel_ = {}; + info.transitionOfProducer_ = 0; + info.isSource_ = false; + info.isLooper_ = false; + + eventsetup::EventSetupRecordProvider const* eventSetupRecordProvider = + eventSetupProvider.tryToGetRecordProvider(it->m_record); + if (eventSetupRecordProvider) { + eventsetup::EventSetupRecordImpl const& eventSetupRecordImpl = eventSetupRecordProvider->firstRecordImpl(); + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl.componentDescription(*itResolver); + if (componentDescription) { + info.moduleType_ = componentDescription->type_; + info.moduleLabel_ = + componentDescription->label_.empty() ? componentDescription->type_ : componentDescription->label_; + info.transitionOfProducer_ = eventSetupRecordImpl.transitionID(*itResolver); + info.isSource_ = componentDescription->isSource_; + info.isLooper_ = componentDescription->isLooper_; + } + } + result.push_back(info); + } + return result; +} diff --git a/FWCore/Framework/src/ESProducer.cc b/FWCore/Framework/src/ESProducer.cc index eee94fe0eec84..9558a253aed5b 100644 --- a/FWCore/Framework/src/ESProducer.cc +++ b/FWCore/Framework/src/ESProducer.cc @@ -11,10 +11,20 @@ // #include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/DataKey.h" +#include "FWCore/Framework/interface/ComponentDescription.h" #include "FWCore/Framework/interface/ESRecordsToProductResolverIndices.h" +#include "FWCore/Framework/interface/EventSetupProvider.h" +#include "FWCore/Framework/interface/EventSetupRecordImpl.h" +#include "FWCore/Framework/interface/EventSetupRecordKey.h" +#include "FWCore/Framework/interface/EventSetupRecordProvider.h" #include "FWCore/Framework/interface/SharedResourcesRegistry.h" #include "FWCore/Utilities/interface/ESIndices.h" +#include +#include +#include + namespace edm { ESProducer::ESProducer() : consumesInfos_{}, acquirer_{{{std::make_shared()}}} {} @@ -85,6 +95,163 @@ namespace edm { } } + void ESProducer::esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::vector& esModules) const { + std::set alreadyFound; + + // updateLookup should have already been called if we are here + // If it has been called, then this assert should not fail. + assert(consumesInfos_.size() == itemsToGetFromRecords_.size()); + + // Here transition identifies which call to setWhatProduced (each corresponding to a "produce" function) + // Often there is only one. + auto it = itemsToGetFromRecords_.begin(); + for (auto const& transition : consumesInfos_) { + auto itResolver = it->begin(); + for (auto const& esConsumesInfoEntry : *transition) { + eventsetup::EventSetupRecordImpl const* eventSetupRecordImpl = nullptr; + eventsetup::EventSetupRecordProvider const* eventSetupRecordProvider = + eventSetupProvider.tryToGetRecordProvider(esConsumesInfoEntry.recordKey_); + if (eventSetupRecordProvider) { + eventSetupRecordImpl = &eventSetupRecordProvider->firstRecordImpl(); + } + + // If there is a chooser this is the special case of a "may consumes" + if (esConsumesInfoEntry.chooser_) { + auto const& esTagGetterInfos = esConsumesInfoEntry.chooser_->tagGetter().lookup(); + + for (auto const& esTagGetterInfo : esTagGetterInfos) { + assert(eventSetupRecordProvider); + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl->componentDescription(esTagGetterInfo.index_); + assert(componentDescription); + if (alreadyFound.insert(componentDescription->id_).second) { + esModules.push_back(componentDescription); + } + } + + // Handle cases not involving "may consumes" + } else { + if (eventSetupRecordProvider) { + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl->componentDescription(*itResolver); + if (componentDescription) { + if (alreadyFound.insert(componentDescription->id_).second) { + esModules.push_back(componentDescription); + } + } + } + } + ++itResolver; + } + ++it; + } + } + + std::vector> ESProducer::eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const { + std::vector> result; + result.resize(consumesInfos_.size()); + + EventSetupConsumesInfo info; + + auto resultForTransition = result.begin(); + auto resolversForTransition = itemsToGetFromRecords_.begin(); + for (auto const& esConsumesInfo : consumesInfos_) { + auto itResolver = resolversForTransition->begin(); + for (auto const& esConsumesInfoEntry : *esConsumesInfo) { + info.eventSetupRecordType_ = esConsumesInfoEntry.recordKey_.name(); + info.productType_ = esConsumesInfoEntry.productKey_.type().name(); + info.moduleType_ = {}; + info.moduleLabel_ = {}; + info.transitionOfProducer_ = 0; + info.isSource_ = false; + info.isLooper_ = false; + info.moduleLabelMismatch_ = false; + + eventsetup::EventSetupRecordImpl const* eventSetupRecordImpl = nullptr; + + eventsetup::EventSetupRecordProvider const* eventSetupRecordProvider = + eventSetupProvider.tryToGetRecordProvider(esConsumesInfoEntry.recordKey_); + if (eventSetupRecordProvider) { + eventSetupRecordImpl = &eventSetupRecordProvider->firstRecordImpl(); + } + + // If there is a chooser this is the special case of a "may consumes" + if (esConsumesInfoEntry.chooser_) { + info.requestedModuleLabel_ = {}; + info.mayConsumes_ = true; + info.mayConsumesFirstEntry_ = true; + + auto const& esTagGetterInfos = esConsumesInfoEntry.chooser_->tagGetter().lookup(); + + if (esTagGetterInfos.empty()) { + info.productLabel_ = {}; + info.mayConsumesNoProducts_ = true; + resultForTransition->push_back(info); + } + + // In the "may consumes" case, we iterate over all the possible data products + // the EventSetup can produce with matching record type and product type. + // With the current design of the mayConsumes feature, there is no way to + // know in advance which productLabel or moduleLabel will be requested. + // Maybe none will be. requestedModuleLabel and moduleLabelMismatch + // are meaningless for "may consumes" cases. + for (auto const& esTagGetterInfo : esTagGetterInfos) { + info.productLabel_ = esTagGetterInfo.productLabel_; + info.moduleLabel_ = esTagGetterInfo.moduleLabel_; + info.mayConsumesNoProducts_ = false; + + assert(eventSetupRecordProvider); + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl->componentDescription(esTagGetterInfo.index_); + assert(componentDescription); + info.moduleType_ = componentDescription->type_; + assert(info.moduleLabel_ == + (componentDescription->label_.empty() ? componentDescription->type_ : componentDescription->label_)); + + info.transitionOfProducer_ = eventSetupRecordImpl->transitionID(esTagGetterInfo.index_); + info.isSource_ = componentDescription->isSource_; + info.isLooper_ = componentDescription->isLooper_; + + resultForTransition->push_back(info); + + info.mayConsumesFirstEntry_ = false; + } + + // Handle cases not involving "may consumes" + } else { + info.productLabel_ = esConsumesInfoEntry.productKey_.name().value(); + info.requestedModuleLabel_ = esConsumesInfoEntry.moduleLabel_; + info.moduleLabelMismatch_ = *itResolver == ESResolverIndex::moduleLabelDoesNotMatch(); + info.mayConsumes_ = false; + info.mayConsumesFirstEntry_ = false; + info.mayConsumesNoProducts_ = false; + + if (eventSetupRecordProvider) { + eventsetup::ComponentDescription const* componentDescription = + eventSetupRecordImpl->componentDescription(*itResolver); + if (componentDescription) { + info.moduleType_ = componentDescription->type_; + info.moduleLabel_ = + componentDescription->label_.empty() ? componentDescription->type_ : componentDescription->label_; + info.transitionOfProducer_ = eventSetupRecordImpl->transitionID(*itResolver); + info.isSource_ = componentDescription->isSource_; + info.isLooper_ = componentDescription->isLooper_; + } + } + resultForTransition->push_back(info); + } + ++itResolver; + } + ++resolversForTransition; + ++resultForTransition; + ++info.transitionOfConsumer_; + } + return result; + } + void ESProducer::usesResources(std::vector const& iResourceNames) { auto instance = SharedResourcesRegistry::instance(); if (not sharedResourceNames_ and !iResourceNames.empty()) { diff --git a/FWCore/Framework/src/EventProcessor.cc b/FWCore/Framework/src/EventProcessor.cc index a3c4999c7341a..a8aaaa1d4da02 100644 --- a/FWCore/Framework/src/EventProcessor.cc +++ b/FWCore/Framework/src/EventProcessor.cc @@ -762,6 +762,12 @@ namespace edm { std::rethrow_exception(firstException); } + pathsAndConsumesOfModules_.initializeForEventSetup(*esp_); + actReg_->lookupInitializationCompleteSignal_(pathsAndConsumesOfModules_, processContext_); + for (auto& subProcess : subProcesses_) { + subProcess.initializePathsAndConsumes(); + } + beginJobSucceeded_ = true; beginStreams(); } diff --git a/FWCore/Framework/src/EventSetupProvider.cc b/FWCore/Framework/src/EventSetupProvider.cc index f747a130ff756..00018aef3c910 100644 --- a/FWCore/Framework/src/EventSetupProvider.cc +++ b/FWCore/Framework/src/EventSetupProvider.cc @@ -75,6 +75,23 @@ namespace edm { return recordProviders_[index].get(); } + EventSetupRecordProvider const* EventSetupProvider::tryToGetRecordProvider(const EventSetupRecordKey& iKey) const { + auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), iKey); + if (lb == recordKeys_.end() || iKey != *lb) { + return nullptr; + } + auto index = std::distance(recordKeys_.begin(), lb); + return recordProviders_[index].get(); + } + + void EventSetupProvider::fillAllESProductResolverProviders( + std::vector& allESProductResolverProviders) const { + std::set componentIDs; + for (auto const& recordProvider : recordProviders_) { + recordProvider->fillAllESProductResolverProviders(allESProductResolverProviders, componentIDs); + } + } + void EventSetupProvider::insert(const EventSetupRecordKey& iKey, std::unique_ptr iProvider) { auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), iKey); diff --git a/FWCore/Framework/src/EventSetupRecordImpl.cc b/FWCore/Framework/src/EventSetupRecordImpl.cc index e2b37663e70c9..cf110e1655072 100644 --- a/FWCore/Framework/src/EventSetupRecordImpl.cc +++ b/FWCore/Framework/src/EventSetupRecordImpl.cc @@ -99,9 +99,9 @@ namespace edm { esproducers.clear(); esproducers.reserve(resolvers_.size()); for (auto const& iData : resolvers_) { - ComponentDescription const* componentDescription = iData->providerDescription(); - if (!componentDescription->isLooper_ && !componentDescription->isSource_) { - esproducers.push_back(componentDescription); + ComponentDescription const* description = iData->providerDescription(); + if (!description->isLooper_ && !description->isSource_) { + esproducers.push_back(description); } } } @@ -183,6 +183,26 @@ namespace edm { } } + ComponentDescription const* EventSetupRecordImpl::componentDescription(ESResolverIndex iResolverIndex) const { + auto index = iResolverIndex.value(); + if (index >= 0 && static_cast(index) < resolvers_.size()) { + const ESProductResolver* resolver = resolvers_[iResolverIndex.value()]; + assert(nullptr != resolver); + return resolver->providerDescription(); + } + return nullptr; + } + + unsigned int EventSetupRecordImpl::transitionID(ESResolverIndex iResolverIndex) const { + auto index = iResolverIndex.value(); + if (index >= 0 && static_cast(index) < resolvers_.size()) { + const ESProductResolver* resolver = resolvers_[iResolverIndex.value()]; + assert(nullptr != resolver); + return resolver->transitionID(); + } + return 0; + } + void const* EventSetupRecordImpl::getFromResolverAfterPrefetch(ESResolverIndex iResolverIndex, bool iTransientAccessOnly, ComponentDescription const*& iDesc, diff --git a/FWCore/Framework/src/EventSetupRecordProvider.cc b/FWCore/Framework/src/EventSetupRecordProvider.cc index 25597a8e3957a..3e5619f2a47c5 100644 --- a/FWCore/Framework/src/EventSetupRecordProvider.cc +++ b/FWCore/Framework/src/EventSetupRecordProvider.cc @@ -17,6 +17,7 @@ // user include files #include "FWCore/Framework/interface/EventSetupRecordProvider.h" +#include "FWCore/Framework/interface/ComponentDescription.h" #include "FWCore/Framework/interface/ParameterSetIDHolder.h" #include "FWCore/Framework/interface/EventSetupImpl.h" #include "FWCore/Framework/interface/EventSetupProvider.h" @@ -252,6 +253,16 @@ namespace edm { for_all(providers_, std::bind(&EventSetupRecordProvider::addResolversToRecordHelper, this, _1, iMap)); } + void EventSetupRecordProvider::fillAllESProductResolverProviders( + std::vector& allESProductResolverProviders, + std::set& componentIDs) const { + for (auto const& provider : providers_) { + if (componentIDs.insert(provider->description().id_).second) { + allESProductResolverProviders.push_back(provider.get()); + } + } + } + void EventSetupRecordProvider::updateLookup(ESRecordsToProductResolverIndices const& iResolverToIndices) { for (auto& productResolverProvider : providers_) { productResolverProvider->updateLookup(iResolverToIndices); diff --git a/FWCore/Framework/src/PathsAndConsumesOfModules.cc b/FWCore/Framework/src/PathsAndConsumesOfModules.cc index 89981a576fab0..4a67b60b571c2 100644 --- a/FWCore/Framework/src/PathsAndConsumesOfModules.cc +++ b/FWCore/Framework/src/PathsAndConsumesOfModules.cc @@ -1,5 +1,7 @@ #include "FWCore/Framework/interface/PathsAndConsumesOfModules.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/EventSetupProvider.h" #include "FWCore/Framework/interface/Schedule.h" #include "FWCore/Framework/interface/ModuleProcessName.h" #include "FWCore/Framework/interface/maker/Worker.h" @@ -51,6 +53,39 @@ namespace edm { *preg); } + void PathsAndConsumesOfModules::initializeForEventSetup(eventsetup::EventSetupProvider const& eventSetupProvider) { + eventSetupProvider_ = &eventSetupProvider; + schedule_->fillESModuleAndConsumesInfo(eventSetupProvider, esModulesWhoseProductsAreConsumedBy_); + eventSetupProvider.fillAllESProductResolverProviders(allESProductResolverProviders_); + + esModulesWhoseProductsAreConsumedByESModule_.resize(allESProductResolverProviders_.size()); + auto it = esModulesWhoseProductsAreConsumedByESModule_.begin(); + for (auto& provider : allESProductResolverProviders_) { + ESProducer const* esProducer = dynamic_cast(provider); + if (esProducer) { + esProducer->esModulesWhoseProductsAreConsumed(*eventSetupProvider_, *it); + } + ++it; + } + eventSetupInfoInitialized_ = true; + } + + void PathsAndConsumesOfModules::checkEventSetupInitialization() const { + // It is our intent to eventually migrate all Services using PathsAndConsumesOfModules + // to use the LookupInitializationComplete signal and eliminate that argument from + // the interface of the functions called for preBeginRun. Then everything related to + // this function can be deleted. + if (!eventSetupInfoInitialized_) { + throw cms::Exception("LogicError") + << "In PathsAndConsumesOfModules, a function used to access EventSetup information\n" + "was called before the EventSetup information was initialized. The most likely\n" + "fix for this is for the Service trying to access the information to use the\n" + "LookupInitializationComplete signal instead of the PreBeginJob signal to get\n" + "access to the PathsAndConsumesOfModules object. The EventSetup information is\n" + "not initialized yet at preBeginJob.\n"; + } + } + void PathsAndConsumesOfModules::removeModules(std::vector const& modules) { // First check that no modules on Paths are removed auto checkPath = [&modules](auto const& paths) { @@ -119,16 +154,46 @@ namespace edm { return modulesWhoseProductsAreConsumedBy_[branchType].at(moduleIndex(moduleID)); } + std::vector const& + PathsAndConsumesOfModules::doESModulesWhoseProductsAreConsumedBy(unsigned int moduleID, Transition transition) const { + checkEventSetupInitialization(); + return esModulesWhoseProductsAreConsumedBy_[static_cast(transition)].at(moduleIndex(moduleID)); + } + std::vector PathsAndConsumesOfModules::doConsumesInfo(unsigned int moduleID) const { Worker const* worker = schedule_->allWorkers().at(moduleIndex(moduleID)); return worker->consumesInfo(); } + std::vector PathsAndConsumesOfModules::doEventSetupConsumesInfo(unsigned int moduleID) const { + checkEventSetupInitialization(); + Worker const* worker = schedule_->allWorkers().at(moduleIndex(moduleID)); + return worker->eventSetupConsumesInfo(*eventSetupProvider_); + } + unsigned int PathsAndConsumesOfModules::doLargestModuleID() const { // moduleIDToIndex_ is sorted, so last element has the largest ID return moduleIDToIndex_.empty() ? 0 : moduleIDToIndex_.back().first; } + std::vector const& + PathsAndConsumesOfModules::doAllESProductResolverProviders() const { + checkEventSetupInitialization(); + return allESProductResolverProviders_; + } + + std::vector> const& + PathsAndConsumesOfModules::doESModulesWhoseProductsAreConsumedByESModule() const { + checkEventSetupInitialization(); + return esModulesWhoseProductsAreConsumedByESModule_; + } + + std::vector> PathsAndConsumesOfModules::doEventSetupConsumesInfo( + ESProducer const& esProducer) const { + checkEventSetupInitialization(); + return esProducer.eventSetupConsumesInfo(*eventSetupProvider_); + } + unsigned int PathsAndConsumesOfModules::moduleIndex(unsigned int moduleID) const { unsigned int dummy = 0; auto target = std::make_pair(moduleID, dummy); diff --git a/FWCore/Framework/src/Schedule.cc b/FWCore/Framework/src/Schedule.cc index fa70c32b5cde1..5ed0950700ade 100644 --- a/FWCore/Framework/src/Schedule.cc +++ b/FWCore/Framework/src/Schedule.cc @@ -1372,6 +1372,35 @@ namespace edm { } } + void Schedule::fillESModuleAndConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::array>, + static_cast(Transition::NumberOfEventSetupTransitions)>& + esModulesWhoseProductsAreConsumedBy) const { + for (auto& item : esModulesWhoseProductsAreConsumedBy) { + item.clear(); + item.resize(allWorkers().size()); + } + unsigned int i = 0; + for (auto const& worker : allWorkers()) { + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)> + esModules; + for (auto transition = 0U; transition < static_cast(Transition::NumberOfEventSetupTransitions); + ++transition) { + esModules[transition] = &esModulesWhoseProductsAreConsumedBy[transition].at(i); + } + try { + worker->esModulesWhoseProductsAreConsumed(eventSetupProvider, esModules); + } catch (cms::Exception& ex) { + ex.addContext("Calling Worker::esModulesWhoseProductsAreConsumed() for module " + + worker->description()->moduleLabel()); + throw; + } + ++i; + } + } + void Schedule::getTriggerReport(TriggerReport& rep) const { rep.eventSummary.totalEvents = 0; rep.eventSummary.totalEventsPassed = 0; diff --git a/FWCore/Framework/src/SubProcess.cc b/FWCore/Framework/src/SubProcess.cc index d62785eb57a7b..80d71244f33e5 100644 --- a/FWCore/Framework/src/SubProcess.cc +++ b/FWCore/Framework/src/SubProcess.cc @@ -298,6 +298,14 @@ namespace edm { void SubProcess::doEndJob(ExceptionCollector& collector) { endJob(collector); } + void SubProcess::initializePathsAndConsumes() { + pathsAndConsumesOfModules_.initializeForEventSetup(*esp_); + actReg_->lookupInitializationCompleteSignal_(pathsAndConsumesOfModules_, processContext_); + for (auto& subProcess : subProcesses_) { + subProcess.initializePathsAndConsumes(); + } + } + void SubProcess::beginJob() { // If event selection is being used, the SubProcess class reads TriggerResults // object(s) in the parent process from the event. This next call is needed for diff --git a/FWCore/Framework/src/stream/EDAnalyzerAdaptorBase.cc b/FWCore/Framework/src/stream/EDAnalyzerAdaptorBase.cc index 48e920b5db61e..07b2107c88893 100644 --- a/FWCore/Framework/src/stream/EDAnalyzerAdaptorBase.cc +++ b/FWCore/Framework/src/stream/EDAnalyzerAdaptorBase.cc @@ -11,7 +11,6 @@ // // system include files -#include #include // user include files @@ -142,6 +141,14 @@ void EDAnalyzerAdaptorBase::modulesWhoseProductsAreConsumed( modules, modulesInPreviousProcesses, preg, labelsToDesc, processName); } +void EDAnalyzerAdaptorBase::esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const { + assert(not m_streamModules.empty()); + return m_streamModules[0]->esModulesWhoseProductsAreConsumed(eventSetupProvider, esModules); +} + void EDAnalyzerAdaptorBase::convertCurrentProcessAlias(std::string const& processName) { for (auto mod : m_streamModules) { mod->convertCurrentProcessAlias(processName); @@ -153,6 +160,12 @@ std::vector EDAnalyzerAdaptorBase::consumesInfo() const { return m_streamModules[0]->consumesInfo(); } +std::vector EDAnalyzerAdaptorBase::eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const { + assert(not m_streamModules.empty()); + return m_streamModules[0]->eventSetupConsumesInfo(eventSetupProvider); +} + bool EDAnalyzerAdaptorBase::doEvent(EventTransitionInfo const& info, ActivityRegistry* act, ModuleCallingContext const* mcc) { diff --git a/FWCore/Framework/src/stream/ProducingModuleAdaptorBase.cc b/FWCore/Framework/src/stream/ProducingModuleAdaptorBase.cc index 8617f86d09ebf..af8cbf3553e61 100644 --- a/FWCore/Framework/src/stream/ProducingModuleAdaptorBase.cc +++ b/FWCore/Framework/src/stream/ProducingModuleAdaptorBase.cc @@ -11,7 +11,6 @@ // // system include files -#include #include // user include files @@ -140,6 +139,15 @@ namespace edm { modules, modulesInPreviousProcesses, preg, labelsToDesc, processName); } + template + void ProducingModuleAdaptorBase::esModulesWhoseProductsAreConsumed( + eventsetup::EventSetupProvider const& eventSetupProvider, + std::array*, + static_cast(Transition::NumberOfEventSetupTransitions)>& esModules) const { + assert(not m_streamModules.empty()); + return m_streamModules[0]->esModulesWhoseProductsAreConsumed(eventSetupProvider, esModules); + } + template void ProducingModuleAdaptorBase::convertCurrentProcessAlias(std::string const& processName) { for (auto mod : m_streamModules) { @@ -153,6 +161,13 @@ namespace edm { return m_streamModules[0]->consumesInfo(); } + template + std::vector ProducingModuleAdaptorBase::eventSetupConsumesInfo( + eventsetup::EventSetupProvider const& eventSetupProvider) const { + assert(not m_streamModules.empty()); + return m_streamModules[0]->eventSetupConsumesInfo(eventSetupProvider); + } + template void ProducingModuleAdaptorBase::updateLookup(BranchType iType, ProductResolverIndexHelper const& iHelper, diff --git a/FWCore/Framework/test/checkForModuleDependencyCorrectness_t.cppunit.cc b/FWCore/Framework/test/checkForModuleDependencyCorrectness_t.cppunit.cc index 752c3ce6a3c2c..00940600ade2e 100644 --- a/FWCore/Framework/test/checkForModuleDependencyCorrectness_t.cppunit.cc +++ b/FWCore/Framework/test/checkForModuleDependencyCorrectness_t.cppunit.cc @@ -11,14 +11,26 @@ #include #include #include +#include #include "FWCore/Framework/interface/PathsAndConsumesOfModules.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" #include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/Utilities/interface/Transition.h" #include "DataFormats/Provenance/interface/ParameterSetID.h" #include "DataFormats/Provenance/interface/ModuleDescription.h" #include "DataFormats/Provenance/interface/ProcessConfiguration.h" #include "cppunit/extensions/HelperMacros.h" +namespace edm { + class ESProducer; + + namespace eventsetup { + struct ComponentDescription; + class ESProductResolverProvider; + } // namespace eventsetup +} // namespace edm + using ModuleDependsOnMap = std::map>; using PathToModules = std::unordered_map>; @@ -42,9 +54,11 @@ namespace { unsigned int moduleID, edm::BranchType branchType) const final { return m_modulesWhoseProductsAreConsumedBy[moduleID]; } + std::vector doConsumesInfo(unsigned int moduleID) const final { return m_moduleConsumesInfo[moduleID]; } + unsigned int doLargestModuleID() const final { if (m_modules.empty()) { return 0; @@ -52,6 +66,24 @@ namespace { return m_modules.size() - 1; } + // The next 5 functions only exist to allow this to compile. These functions are + // pure virtual in the base class. They're not used in this test and never get called. + std::vector const& doESModulesWhoseProductsAreConsumedBy( + unsigned int, edm::Transition) const { + return m_dummy1; + } + std::vector doEventSetupConsumesInfo(unsigned int) const final { return {}; } + std::vector const& doAllESProductResolverProviders() const final { + return m_dummy2; + } + std::vector> const& + doESModulesWhoseProductsAreConsumedByESModule() const final { + return m_dummy3; + } + std::vector> doEventSetupConsumesInfo(edm::ESProducer const&) const { + return {}; + } + std::vector m_paths; std::vector m_endPaths; std::vector m_modules; @@ -59,7 +91,10 @@ namespace { std::vector> m_modulesOnPath; std::vector> m_modulesOnEndPath; std::vector> m_modulesWhoseProductsAreConsumedBy; + std::vector m_dummy1; std::vector m_cache; + std::vector m_dummy2; + std::vector> m_dummy3; static unsigned int indexForModule(std::string const& iName, std::unordered_map& modsToIndex, diff --git a/FWCore/Integration/plugins/BuildFile.xml b/FWCore/Integration/plugins/BuildFile.xml index 086c34c78f92e..e8f0a592f8c03 100644 --- a/FWCore/Integration/plugins/BuildFile.xml +++ b/FWCore/Integration/plugins/BuildFile.xml @@ -15,10 +15,11 @@ - - + + + @@ -137,5 +138,5 @@ - + diff --git a/FWCore/Integration/plugins/ConsumeIOVTestInfoAnalyzer.cc b/FWCore/Integration/plugins/ConsumeIOVTestInfoAnalyzer.cc new file mode 100644 index 0000000000000..7c936292b5d33 --- /dev/null +++ b/FWCore/Integration/plugins/ConsumeIOVTestInfoAnalyzer.cc @@ -0,0 +1,56 @@ +// -*- C++ -*- +// +// Package: FWCore/Integration +// Class: ConsumeIOVTestInfoAnalyzer +// +/**\class edmtest::ConsumeIOVTestInfoAnalyzer + + Description: Used in tests. Declares it consumes products + of type IOVTestInfo. The purpose is to cause the ESProducer + that produces that product to run. +*/ +// Original Author: W. David Dagenhart +// Created: 2 January 2025 + +#include "GadgetRcd.h" + +#include "FWCore/Framework/interface/global/EDAnalyzer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Integration/interface/IOVTestInfo.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/ESGetToken.h" +#include "FWCore/Utilities/interface/ESInputTag.h" +#include "FWCore/Utilities/interface/StreamID.h" + +namespace edmtest { + + class ConsumeIOVTestInfoAnalyzer : public edm::global::EDAnalyzer<> { + public: + explicit ConsumeIOVTestInfoAnalyzer(edm::ParameterSet const&); + + void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override; + + static void fillDescriptions(edm::ConfigurationDescriptions&); + + private: + edm::ESGetToken const esToken_; + }; + + ConsumeIOVTestInfoAnalyzer::ConsumeIOVTestInfoAnalyzer(edm::ParameterSet const& pset) + : esToken_{esConsumes(pset.getUntrackedParameter("esInputTag"))} {} + + void ConsumeIOVTestInfoAnalyzer::analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const {} + + void ConsumeIOVTestInfoAnalyzer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.addUntracked("esInputTag", edm::ESInputTag("", "")); + descriptions.addDefault(desc); + } + +} // namespace edmtest +using namespace edmtest; +DEFINE_FWK_MODULE(ConsumeIOVTestInfoAnalyzer); diff --git a/FWCore/Integration/plugins/ConsumeWhatsIt.cc b/FWCore/Integration/plugins/ConsumeWhatsIt.cc new file mode 100644 index 0000000000000..89d609d4f68c1 --- /dev/null +++ b/FWCore/Integration/plugins/ConsumeWhatsIt.cc @@ -0,0 +1,200 @@ +// -*- C++ -*- +// +// Package: FWCore/Integration +// Class: ConsumeWhatsIt +// +/**\class edmtest::ConsumeWhatsIt + + Description: + Consumes and produces EventSetup products. + This is used to test the printout from the Tracer + module related to EventSetup module dependencies. +*/ +// +// Original Author: W. David Dagenhart +// Created: 11 December 2024 + +#include +#include + +#include "Doodad.h" +#include "GadgetRcd.h" +#include "WhatsIt.h" + +#include "FWCore/Framework/interface/es_Label.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/ModuleFactory.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/ESGetToken.h" +#include "FWCore/Utilities/interface/ESInputTag.h" + +namespace edmtest { + + class ConsumeWhatsIt : public edm::ESProducer { + public: + ConsumeWhatsIt(edm::ParameterSet const& pset); + + using ReturnType = std::unique_ptr; + using ReturnTypeA = std::unique_ptr; + using ReturnTypeB = std::shared_ptr; + using ReturnTypeC = std::shared_ptr; + using ReturnTypeD = std::optional; + + ReturnType produce(const GadgetRcd&); + ReturnTypeA produceA(const GadgetRcd&); + ReturnTypeB produceB(const GadgetRcd&); + ReturnTypeC produceC(const GadgetRcd&); + ReturnTypeD produceD(const GadgetRcd&); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + private: + edm::ESGetToken token_; + edm::ESGetToken tokenA_; + edm::ESGetToken tokenB_; + edm::ESGetToken tokenC_; + edm::ESGetToken tokenD_; + + edm::ESGetToken token_in_produce_; + edm::ESGetToken tokenA_in_produce_; + edm::ESGetToken tokenB_in_produce_; + edm::ESGetToken tokenC_in_produce_; + edm::ESGetToken tokenD_in_produce_; + + edm::ESGetToken token_in_produceA_; + edm::ESGetToken tokenA_in_produceA_; + edm::ESGetToken tokenB_in_produceA_; + edm::ESGetToken tokenC_in_produceA_; + edm::ESGetToken tokenD_in_produceA_; + + edm::ESGetToken token_in_produceB_; + edm::ESGetToken tokenA_in_produceB_; + edm::ESGetToken tokenB_in_produceB_; + edm::ESGetToken tokenC_in_produceB_; + edm::ESGetToken tokenD_in_produceB_; + + edm::ESGetToken token_in_produceC_; + edm::ESGetToken tokenA_in_produceC_; + edm::ESGetToken tokenB_in_produceC_; + edm::ESGetToken tokenC_in_produceC_; + edm::ESGetToken tokenD_in_produceC_; + + edm::ESGetToken token_in_produceD_; + edm::ESGetToken tokenA_in_produceD_; + edm::ESGetToken tokenB_in_produceD_; + edm::ESGetToken tokenC_in_produceD_; + edm::ESGetToken tokenD_in_produceD_; + }; + + ConsumeWhatsIt::ConsumeWhatsIt(edm::ParameterSet const& pset) { + auto collector = setWhatProduced(this, "R"); + auto collectorA = setWhatProduced(this, &ConsumeWhatsIt::produceA, edm::es::Label("AR")); + auto collectorB = setWhatProduced(this, &ConsumeWhatsIt::produceB, edm::es::Label("BR")); + auto collectorC = setWhatProduced(this, &ConsumeWhatsIt::produceC, edm::es::Label("CR")); + auto collectorD = setWhatProduced(this, &ConsumeWhatsIt::produceD, edm::es::Label("DR")); + + token_ = collector.consumes(edm::ESInputTag{"", ""}); + tokenA_ = collectorA.consumes(edm::ESInputTag{"", ""}); + tokenB_ = collectorB.consumes(edm::ESInputTag{"", ""}); + tokenC_ = collectorC.consumes(edm::ESInputTag{"", ""}); + tokenD_ = collectorD.consumes(edm::ESInputTag{"", ""}); + + token_in_produce_ = collector.consumes(pset.getParameter("esInputTag_in_produce")); + tokenA_in_produce_ = collector.consumes(pset.getParameter("esInputTagA_in_produce")); + tokenB_in_produce_ = collector.consumes(pset.getParameter("esInputTagB_in_produce")); + tokenC_in_produce_ = collector.consumes(pset.getParameter("esInputTagC_in_produce")); + tokenD_in_produce_ = collector.consumes(pset.getParameter("esInputTagD_in_produce")); + + token_in_produceA_ = collectorA.consumes(pset.getParameter("esInputTag_in_produceA")); + tokenA_in_produceA_ = collectorA.consumes(pset.getParameter("esInputTagA_in_produceA")); + tokenB_in_produceA_ = collectorA.consumes(pset.getParameter("esInputTagB_in_produceA")); + tokenC_in_produceA_ = collectorA.consumes(pset.getParameter("esInputTagC_in_produceA")); + tokenD_in_produceA_ = collectorA.consumes(pset.getParameter("esInputTagD_in_produceA")); + + token_in_produceB_ = collectorB.consumes(pset.getParameter("esInputTag_in_produceB")); + tokenA_in_produceB_ = collectorB.consumes(pset.getParameter("esInputTagA_in_produceB")); + tokenB_in_produceB_ = collectorB.consumes(pset.getParameter("esInputTagB_in_produceB")); + tokenC_in_produceB_ = collectorB.consumes(pset.getParameter("esInputTagC_in_produceB")); + tokenD_in_produceB_ = collectorB.consumes(pset.getParameter("esInputTagD_in_produceB")); + + token_in_produceC_ = collectorC.consumes(pset.getParameter("esInputTag_in_produceC")); + tokenA_in_produceC_ = collectorC.consumes(pset.getParameter("esInputTagA_in_produceC")); + tokenB_in_produceC_ = collectorC.consumes(pset.getParameter("esInputTagB_in_produceC")); + tokenC_in_produceC_ = collectorC.consumes(pset.getParameter("esInputTagC_in_produceC")); + tokenD_in_produceC_ = collectorC.consumes(pset.getParameter("esInputTagD_in_produceC")); + + token_in_produceD_ = collectorD.consumes(pset.getParameter("esInputTag_in_produceD")); + tokenA_in_produceD_ = collectorD.consumes(pset.getParameter("esInputTagA_in_produceD")); + tokenB_in_produceD_ = collectorD.consumes(pset.getParameter("esInputTagB_in_produceD")); + tokenC_in_produceD_ = collectorD.consumes(pset.getParameter("esInputTagC_in_produceD")); + tokenD_in_produceD_ = collectorD.consumes(pset.getParameter("esInputTagD_in_produceD")); + } + + ConsumeWhatsIt::ReturnType ConsumeWhatsIt::produce(const GadgetRcd& iRecord) { + // For purposes of the tests this is currently intended for, we don't + // need to actually get the data. We only need to call consumes. + // At least initially this is only intended for testing the dumpPathsAndConsumes + // option of the Tracer. Possibly it may be useful to extended this in the future... + auto pWhatsIt = std::make_unique(); + return pWhatsIt; + } + + ConsumeWhatsIt::ReturnTypeA ConsumeWhatsIt::produceA(const GadgetRcd& iRecord) { + auto pWhatsIt = std::make_unique(); + return pWhatsIt; + } + + ConsumeWhatsIt::ReturnTypeB ConsumeWhatsIt::produceB(const GadgetRcd& iRecord) { + auto pWhatsIt = std::make_shared(); + return pWhatsIt; + } + + ConsumeWhatsIt::ReturnTypeC ConsumeWhatsIt::produceC(const GadgetRcd& iRecord) { + auto pWhatsIt = std::make_shared(); + return pWhatsIt; + } + + ConsumeWhatsIt::ReturnTypeD ConsumeWhatsIt::produceD(const GadgetRcd& iRecord) { + auto pWhatsIt = std::make_optional(); + return pWhatsIt; + } + + void ConsumeWhatsIt::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + + desc.add("esInputTag_in_produce"); + desc.add("esInputTagA_in_produce"); + desc.add("esInputTagB_in_produce"); + desc.add("esInputTagC_in_produce"); + desc.add("esInputTagD_in_produce"); + + desc.add("esInputTag_in_produceA"); + desc.add("esInputTagA_in_produceA"); + desc.add("esInputTagB_in_produceA"); + desc.add("esInputTagC_in_produceA"); + desc.add("esInputTagD_in_produceA"); + + desc.add("esInputTag_in_produceB"); + desc.add("esInputTagA_in_produceB"); + desc.add("esInputTagB_in_produceB"); + desc.add("esInputTagC_in_produceB"); + desc.add("esInputTagD_in_produceB"); + + desc.add("esInputTag_in_produceC"); + desc.add("esInputTagA_in_produceC"); + desc.add("esInputTagB_in_produceC"); + desc.add("esInputTagC_in_produceC"); + desc.add("esInputTagD_in_produceC"); + + desc.add("esInputTag_in_produceD"); + desc.add("esInputTagA_in_produceD"); + desc.add("esInputTagB_in_produceD"); + desc.add("esInputTagC_in_produceD"); + desc.add("esInputTagD_in_produceD"); + descriptions.addDefault(desc); + } +} // namespace edmtest +using namespace edmtest; +DEFINE_FWK_EVENTSETUP_MODULE(ConsumeWhatsIt); diff --git a/FWCore/Integration/plugins/MayConsumeWhatsIt.cc b/FWCore/Integration/plugins/MayConsumeWhatsIt.cc new file mode 100644 index 0000000000000..7bed62748711d --- /dev/null +++ b/FWCore/Integration/plugins/MayConsumeWhatsIt.cc @@ -0,0 +1,103 @@ +// -*- C++ -*- +// +// Package: FWCore/Integration +// Class: MayConsumeWhatsIt +// +/**\class edmtest::MayConsumeWhatsIt + + Description: + Consumes and produces EventSetup products. + This test module is similar to ConsumesWhatsIt, + but is focused on the "may consumes" variants + of the the consumes interface. + This is used to test the printout from the Tracer + module related to EventSetup module dependencies. +*/ +// +// Original Author: W. David Dagenhart +// Created: 27 December 2024 + +#include + +#include "Doodad.h" +#include "GadgetRcd.h" +#include "WhatsIt.h" + +#include "FWCore/Framework/interface/es_Label.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/ESTagGetter.h" +#include "FWCore/Framework/interface/ESTransientHandle.h" +#include "FWCore/Framework/interface/ModuleFactory.h" +#include "FWCore/Integration/interface/ESTestData.h" +#include "FWCore/Integration/interface/IOVTestInfo.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/ESGetToken.h" +#include "FWCore/Utilities/interface/ESProductTag.h" + +namespace edmtest { + + class MayConsumeWhatsIt : public edm::ESProducer { + public: + MayConsumeWhatsIt(edm::ParameterSet const&); + + using ReturnType = std::unique_ptr; + + ReturnType produce(const GadgetRcd&); + ReturnType produceMayConsumeTestDataA(const GadgetRcd&); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + private: + edm::ESGetToken token_for_produce_; + edm::ESGetToken token_for_produceMayConsumeTestDataA_; + }; + + MayConsumeWhatsIt::MayConsumeWhatsIt(edm::ParameterSet const& pset) { + auto collector = setWhatProduced(this, edm::es::Label("DependsOnMayConsume")); + collector.setMayConsume( + token_for_produce_, + [](edm::ESTagGetter get, edm::ESTransientHandle handle) { return get("", "DR"); }, + edm::ESProductTag("", "")); + + auto collector2 = setWhatProduced( + this, &edmtest::MayConsumeWhatsIt::produceMayConsumeTestDataA, edm::es::Label("DependsOnMayConsume2")); + collector2.setMayConsume( + token_for_produceMayConsumeTestDataA_, + [](edm::ESTagGetter get, edm::ESTransientHandle handle) { return get.nothing(); }, + edm::ESProductTag("", "")); + } + + MayConsumeWhatsIt::ReturnType MayConsumeWhatsIt::produce(const GadgetRcd& iRecord) { + auto handle = iRecord.getHandle(token_for_produce_); + if (!handle.isValid()) { + throw cms::Exception("TestFailure") << "MayConsumeWhatsIt::produceMayConsumeTestDataA, expected valid handle"; + } + + auto product = std::make_unique(); + return product; + } + + MayConsumeWhatsIt::ReturnType MayConsumeWhatsIt::produceMayConsumeTestDataA(const GadgetRcd& iRecord) { + // In the test, there will not be an ESProducer or ESSource that + // produces ESTestDataA. The purpose is test the output from the + // Tracer in that case. + + auto handle = iRecord.getHandle(token_for_produceMayConsumeTestDataA_); + if (handle.isValid()) { + throw cms::Exception("TestFailure") << "MayConsumeWhatsIt::produceMayConsumeTestDataA, expected invalid handle"; + } + + auto product = std::make_unique(); + return product; + } + + void MayConsumeWhatsIt::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + descriptions.addDefault(desc); + } + +} // namespace edmtest +using namespace edmtest; +DEFINE_FWK_EVENTSETUP_MODULE(MayConsumeWhatsIt); diff --git a/FWCore/Integration/plugins/RunLumiESAnalyzer.cc b/FWCore/Integration/plugins/RunLumiESAnalyzer.cc index 22ef96a86a3c0..2631bc7bfb6b1 100644 --- a/FWCore/Integration/plugins/RunLumiESAnalyzer.cc +++ b/FWCore/Integration/plugins/RunLumiESAnalyzer.cc @@ -12,6 +12,7 @@ // Original Author: W. David Dagenhart // Created: 18 April 2019 +#include "DataFormats/TestObjects/interface/ToyProducts.h" #include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" @@ -23,9 +24,11 @@ #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/EDGetToken.h" #include "FWCore/Utilities/interface/ESGetToken.h" #include "FWCore/Utilities/interface/ESInputTag.h" #include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/Utilities/interface/InputTag.h" #include @@ -74,18 +77,33 @@ namespace edmtest { const char* functionName) const; edm::ESGetToken const esToken_; + edm::ESGetToken const esTokenNonEmptyLabel_; edm::ESGetToken const tokenBeginRun_; edm::ESGetToken const tokenBeginLumi_; edm::ESGetToken const tokenEndLumi_; edm::ESGetToken const tokenEndRun_; + + bool checkDataProductContents_; + bool getIntProduct_; + + edm::EDGetTokenT token_; }; - RunLumiESAnalyzer::RunLumiESAnalyzer(edm::ParameterSet const&) - : esToken_{esConsumes(edm::ESInputTag("", ""))}, - tokenBeginRun_{esConsumes(edm::ESInputTag("", ""))}, - tokenBeginLumi_{esConsumes(edm::ESInputTag("", ""))}, - tokenEndLumi_{esConsumes(edm::ESInputTag("", ""))}, - tokenEndRun_{esConsumes(edm::ESInputTag("", ""))} {} + RunLumiESAnalyzer::RunLumiESAnalyzer(edm::ParameterSet const& pset) + : esToken_{esConsumes(pset.getParameter("esInputTag"))}, + esTokenNonEmptyLabel_{esConsumes(edm::ESInputTag("", "nonEmptyLabel"))}, + tokenBeginRun_{esConsumes(pset.getParameter("esInputTag"))}, + tokenBeginLumi_{ + esConsumes(pset.getParameter("esInputTag"))}, + tokenEndLumi_{ + esConsumes(pset.getParameter("esInputTag"))}, + tokenEndRun_{esConsumes(pset.getParameter("esInputTag"))}, + checkDataProductContents_(pset.getParameter("checkDataProductContents")), + getIntProduct_(pset.getParameter("getIntProduct")) { + if (getIntProduct_) { + token_ = consumes(edm::InputTag("intProducer", "")); + } + } std::unique_ptr RunLumiESAnalyzer::beginStream(edm::StreamID iID) const { return std::make_unique(); @@ -99,10 +117,12 @@ namespace edmtest { ESTestRecordC recordC = eventSetup.get(); edm::ValidityInterval iov = recordC.validityInterval(); - if (iovTestInfo->iovStartRun_ != run || iovTestInfo->iovEndRun_ != run || - iovTestInfo->iovStartLumi_ != lumiNumber || iovTestInfo->iovEndLumi_ != lumiNumber) { - throw cms::Exception("TestFailure") - << functionName << ": values read from EventSetup do not agree with auxiliary"; + if (checkDataProductContents_) { + if (iovTestInfo->iovStartRun_ != run || iovTestInfo->iovEndRun_ != run || + iovTestInfo->iovStartLumi_ != lumiNumber || iovTestInfo->iovEndLumi_ != lumiNumber) { + throw cms::Exception("TestFailure") + << functionName << ": values read from EventSetup do not agree with auxiliary"; + } } if (iov.first().eventID().run() != run || iov.last().eventID().run() != run || @@ -181,10 +201,21 @@ namespace edmtest { auto lumiNumber = event.eventAuxiliary().luminosityBlock(); edm::ESHandle iovTestInfo = eventSetup.getHandle(esToken_); checkIOVInfo(eventSetup, run, lumiNumber, iovTestInfo, "RunLumiESAnalyzer::analyzer"); + + { + edm::ESHandle iovTestInfo = eventSetup.getHandle(esTokenNonEmptyLabel_); + checkIOVInfo(eventSetup, run, lumiNumber, iovTestInfo, "RunLumiESAnalyzer::analyzer"); + } + if (getIntProduct_) { + event.get(token_); + } } void RunLumiESAnalyzer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; + desc.add("esInputTag", edm::ESInputTag()); + desc.add("checkDataProductContents", true); + desc.add("getIntProduct", false); descriptions.addDefault(desc); } } // namespace edmtest diff --git a/FWCore/Integration/plugins/RunLumiESSource.cc b/FWCore/Integration/plugins/RunLumiESSource.cc index a01e7f4653411..bc6daf3adee39 100644 --- a/FWCore/Integration/plugins/RunLumiESSource.cc +++ b/FWCore/Integration/plugins/RunLumiESSource.cc @@ -32,6 +32,7 @@ namespace edmtest { RunLumiESSource(edm::ParameterSet const&); std::unique_ptr produce(ESTestRecordC const&); + std::unique_ptr produceNonEmptyLabel(ESTestRecordC const&); static void fillDescriptions(edm::ConfigurationDescriptions&); @@ -46,6 +47,7 @@ namespace edmtest { RunLumiESSource::RunLumiESSource(edm::ParameterSet const&) { findingRecord(); setWhatProduced(this); + setWhatProduced(this, &edmtest::RunLumiESSource::produceNonEmptyLabel, edm::es::Label("nonEmptyLabel")); } std::unique_ptr RunLumiESSource::produce(ESTestRecordC const& record) { @@ -66,6 +68,24 @@ namespace edmtest { return data; } + std::unique_ptr RunLumiESSource::produceNonEmptyLabel(ESTestRecordC const& record) { + auto data = std::make_unique(); + + edm::ValidityInterval iov = record.validityInterval(); + edm::LogAbsolute("RunLumiESSource") << "RunLumiESSource::produceNonEmptyLabel startIOV = " + << iov.first().eventID().run() << ":" << iov.first().luminosityBlockNumber() + << " endIOV = " << iov.last().eventID().run() << ":" + << iov.last().luminosityBlockNumber() << " IOV index = " << record.iovIndex() + << " cache identifier = " << record.cacheIdentifier(); + data->iovStartRun_ = iov.first().eventID().run(); + data->iovStartLumi_ = iov.first().luminosityBlockNumber(); + data->iovEndRun_ = iov.last().eventID().run(); + data->iovEndLumi_ = iov.last().luminosityBlockNumber(); + data->iovIndex_ = record.iovIndex(); + data->cacheIdentifier_ = record.cacheIdentifier(); + return data; + } + void RunLumiESSource::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; descriptions.addDefault(desc); diff --git a/FWCore/Integration/test/run_TestGetBy.sh b/FWCore/Integration/test/run_TestGetBy.sh index 24509322bfd84..e3290f3e33b81 100755 --- a/FWCore/Integration/test/run_TestGetBy.sh +++ b/FWCore/Integration/test/run_TestGetBy.sh @@ -20,7 +20,7 @@ LOCAL_TEST_DIR=${SCRAM_TEST_PATH} echo "testConsumesInfo" cmsRun ${LOCAL_TEST_DIR}/testConsumesInfo_cfg.py > testConsumesInfo.log 2>/dev/null || die "cmsRun testConsumesInfo_cfg.py" $? - grep -v '++\|LegacyModules' testConsumesInfo.log > testConsumesInfo_1.log + grep -v '++\|LegacyModules\|time' testConsumesInfo.log > testConsumesInfo_1.log rm testConsumesInfo.log rm testConsumesInfo.root diff ${LOCAL_TEST_DIR}/unit_test_outputs/testConsumesInfo_1.log testConsumesInfo_1.log || die "comparing testConsumesInfo_1.log" $? diff --git a/FWCore/Integration/test/testConsumesInfo_cfg.py b/FWCore/Integration/test/testConsumesInfo_cfg.py index 14383ca93cbef..f09ee4ce67cfc 100644 --- a/FWCore/Integration/test/testConsumesInfo_cfg.py +++ b/FWCore/Integration/test/testConsumesInfo_cfg.py @@ -137,6 +137,84 @@ ) ) +process.runLumiESSource = cms.ESSource("RunLumiESSource") + +process.testReadLumiESSource = cms.EDAnalyzer("RunLumiESAnalyzer") + +process.testReadLumiESSource1 = cms.EDAnalyzer("RunLumiESAnalyzer", + esInputTag = cms.ESInputTag('runLumiESSource', ''), + getIntProduct = cms.bool(True) +) + +process.testReadLumiESSource2 = cms.EDAnalyzer("RunLumiESAnalyzer", + esInputTag = cms.ESInputTag('runLumiESSource', 'productLabelThatDoesNotExist'), + checkDataProductContents = cms.bool(False) +) + +process.testReadLumiESSource3 = cms.EDAnalyzer("RunLumiESAnalyzer", + esInputTag = cms.ESInputTag('moduleLabelThatDoesNotMatch', ''), + checkDataProductContents = cms.bool(False) +) + +process.concurrentIOVESSource = cms.ESSource("ConcurrentIOVESSource", + iovIsRunNotTime = cms.bool(True), + firstValidLumis = cms.vuint32(1, 4, 6, 7, 8, 9), + invalidLumis = cms.vuint32(), + concurrentFinder = cms.bool(True) +) + +process.concurrentIOVESProducer = cms.ESProducer("ConcurrentIOVESProducer") + +process.concurrentIOVAnalyzer = cms.EDAnalyzer("ConcurrentIOVAnalyzer", + checkExpectedValues = cms.untracked.bool(False) +) + +process.WhatsItAnalyzer = cms.EDAnalyzer("WhatsItAnalyzer", + expectedValues = cms.untracked.vint32(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) + + +process.WhatsItESProducer = cms.ESProducer("WhatsItESProducer") + +process.DoodadESSource = cms.ESSource("DoodadESSource") + +process.consumeWhatsIt = cms.ESProducer("ConsumeWhatsIt", + esInputTag_in_produce = cms.ESInputTag("", ""), + esInputTagA_in_produce = cms.ESInputTag("", "A"), + esInputTagB_in_produce = cms.ESInputTag("", "B"), + esInputTagC_in_produce = cms.ESInputTag("", "C"), + esInputTagD_in_produce = cms.ESInputTag("", "D"), + esInputTag_in_produceA = cms.ESInputTag("", ""), + esInputTagA_in_produceA = cms.ESInputTag("", "A"), + esInputTagB_in_produceA = cms.ESInputTag("", "B"), + esInputTagC_in_produceA = cms.ESInputTag("", "C"), + esInputTagD_in_produceA = cms.ESInputTag("", "D"), + esInputTag_in_produceB = cms.ESInputTag("", ""), + esInputTagA_in_produceB = cms.ESInputTag("", "A"), + esInputTagB_in_produceB = cms.ESInputTag("", "B"), + esInputTagC_in_produceB = cms.ESInputTag("", "C"), + esInputTagD_in_produceB = cms.ESInputTag("", "D"), + esInputTag_in_produceC = cms.ESInputTag("", "productLabelThatDoesNotExist"), + esInputTagA_in_produceC = cms.ESInputTag("", "productLabelThatDoesNotExist"), + esInputTagB_in_produceC = cms.ESInputTag("moduleLabelThatDoesNotMatch", "B"), + esInputTagC_in_produceC = cms.ESInputTag("moduleLabelThatDoesNotMatch", "C"), + esInputTagD_in_produceC = cms.ESInputTag("moduleLabelThatDoesNotMatch", "D"), + esInputTag_in_produceD = cms.ESInputTag("WhatsItESProducer", ""), + esInputTagA_in_produceD = cms.ESInputTag("WhatsItESProducer", "A"), + esInputTagB_in_produceD = cms.ESInputTag("WhatsItESProducer", "B"), + esInputTagC_in_produceD = cms.ESInputTag("WhatsItESProducer", "C"), + esInputTagD_in_produceD = cms.ESInputTag("WhatsItESProducer", "D") +) + +process.mayConsumeWhatsIt = cms.ESProducer("MayConsumeWhatsIt") + +process.consumeIOVTestInfoAnalyzer = cms.EDAnalyzer("ConsumeIOVTestInfoAnalyzer", + esInputTag = cms.untracked.ESInputTag("", "DependsOnMayConsume") +) + +process.consumeIOVTestInfoAnalyzer2 = cms.EDAnalyzer("ConsumeIOVTestInfoAnalyzer", + esInputTag = cms.untracked.ESInputTag("", "DependsOnMayConsume2") +) + process.p = cms.Path(process.intProducer * process.a1 * process.a2 * process.a3 * process.a4 * process.test * process.testView1 * @@ -158,6 +236,17 @@ process.p11 = cms.Path() +process.testEventSetupPath = cms.Path( + process.testReadLumiESSource * + process.testReadLumiESSource1 * + process.testReadLumiESSource2 * + process.testReadLumiESSource3 * + process.concurrentIOVAnalyzer * + process.WhatsItAnalyzer * + process.consumeIOVTestInfoAnalyzer * + process.consumeIOVTestInfoAnalyzer2 +) + process.t = cms.Task( process.intProducerU, process.intProducerA, @@ -470,10 +559,29 @@ expectedProductsFromInputKept = cms.untracked.bool(False) ) +copyProcess.runLumiESSourceCopy = cms.ESSource("RunLumiESSource") + +copyProcess.testReadLumiESSource = cms.EDAnalyzer("RunLumiESAnalyzer") + +copyProcess.concurrentIOVESSource = cms.ESSource("ConcurrentIOVESSource", + iovIsRunNotTime = cms.bool(True), + firstValidLumis = cms.vuint32(1, 4, 6, 7, 8, 9), + invalidLumis = cms.vuint32(), + concurrentFinder = cms.bool(True) +) + +copyProcess.concurrentIOVESProducer = cms.ESProducer("ConcurrentIOVESProducer") + +copyProcess.concurrentIOVAnalyzer = cms.EDAnalyzer("ConcurrentIOVAnalyzer", + checkExpectedValues = cms.untracked.bool(False) +) + copyProcess.path3 = cms.Path( copyProcess.intProducerBeginProcessBlock * copyProcess.intProducerEndProcessBlock * copyProcess.processBlockTest1 ) +copyProcess.testEventSetupPath = cms.Path(copyProcess.testReadLumiESSource * copyProcess.concurrentIOVAnalyzer) + copyProcess.endPath = cms.EndPath(copyProcess.testOneOutput) diff --git a/FWCore/Integration/test/unit_test_outputs/testConsumesInfo_1.log b/FWCore/Integration/test/unit_test_outputs/testConsumesInfo_1.log index 43d77c2682141..d0b079d26b076 100644 --- a/FWCore/Integration/test/unit_test_outputs/testConsumesInfo_1.log +++ b/FWCore/Integration/test/unit_test_outputs/testConsumesInfo_1.log @@ -4,6 +4,7 @@ paths: p2 p3 p11 + testEventSetupPath end paths: e p1ep2 @@ -31,13 +32,24 @@ modules on path p3: intProducerD intProducerE modules on path p11: -modules on end path e: + --- there are no modules on this path --- +modules on path testEventSetupPath: + testReadLumiESSource + testReadLumiESSource1 + testReadLumiESSource2 + testReadLumiESSource3 + concurrentIOVAnalyzer + WhatsItAnalyzer + consumeIOVTestInfoAnalyzer + consumeIOVTestInfoAnalyzer2 +modules on endpath e: testManyConsumingProducer out -modules on end path p1ep2: +modules on endpath p1ep2: + --- there are no modules on this endpath --- All modules and modules in the current process whose products they consume: (This does not include modules from previous processes or the source) -(Exclusively considers Event products, not Run, Lumi, or ProcessBlock products) +(Exclusively considers consumed Event and EventSetup products, not Run, Lumi, or ProcessBlock products) IntProducer/'intProducerA' IntProducer/'intProducerF' IntProducer/'intProducerG' @@ -47,18 +59,23 @@ All modules and modules in the current process whose products they consume: IntVectorProducer/'intVectorProducer' IntProducer/'intProducer' TestFindProduct/'a1' - TestFindProduct/'a2' consumes products from these modules: - IntProducer/'intProducerA' - TestFindProduct/'a3' consumes products from these modules: - IntProducer/'intProducerA' - TestFindProduct/'a4' consumes products from these modules: - IntProducer/'intProducerA' + TestFindProduct/'a2' + consumes products from these modules: + IntProducer/'intProducerA' + TestFindProduct/'a3' + consumes products from these modules: + IntProducer/'intProducerA' + TestFindProduct/'a4' + consumes products from these modules: + IntProducer/'intProducerA' TestContextAnalyzer/'test' - TestFindProduct/'testView1' consumes products from these modules: - IntVectorProducer/'intVectorProducer' + TestFindProduct/'testView1' + consumes products from these modules: + IntVectorProducer/'intVectorProducer' IntProducer/'testStreamingProducer' - ConsumingStreamAnalyzer/'testStreamingAnalyzer' consumes products from these modules: - IntProducer/'testStreamingProducer' + ConsumingStreamAnalyzer/'testStreamingAnalyzer' + consumes products from these modules: + IntProducer/'testStreamingProducer' IntProducerBeginProcessBlock/'intProducerBeginProcessBlock' IntProducerEndProcessBlock/'intProducerEndProcessBlock' TestFindProduct/'processBlockTest1' @@ -66,29 +83,100 @@ All modules and modules in the current process whose products they consume: IntProducer/'intProducerC' IntProducer/'intProducerD' IntProducer/'intProducerE' - ConsumingIntProducer/'testManyConsumingProducer' consumes products from these modules: - TriggerResultInserter/'TriggerResults' - PoolOutputModule/'out' consumes products from these modules: - TriggerResultInserter/'TriggerResults' - IntProducer/'intProducerA' - IntProducer/'intProducer' - IntProducer/'intProducerU' - ConsumingIntProducer/'testManyConsumingProducer' - IntProducer/'testStreamingProducer' - IntVectorProducer/'intVectorProducer' + RunLumiESAnalyzer/'testReadLumiESSource' + consumes products during Event from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during BeginLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during EndLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during BeginRun from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during EndRun from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + RunLumiESAnalyzer/'testReadLumiESSource1' + consumes products from these modules: + IntProducer/'intProducer' + consumes products during Event from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during BeginLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during EndLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during BeginRun from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + consumes products during EndRun from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + RunLumiESAnalyzer/'testReadLumiESSource2' + consumes products during Event from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + RunLumiESAnalyzer/'testReadLumiESSource3' + consumes products during Event from these EventSetup modules: + RunLumiESSource/'runLumiESSource' ESSource + ConcurrentIOVAnalyzer/'concurrentIOVAnalyzer' + consumes products during Event from these EventSetup modules: + ConcurrentIOVESSource/'concurrentIOVESSource' ESSource + ConcurrentIOVESProducer/'concurrentIOVESProducer' ESProducer + WhatsItAnalyzer/'WhatsItAnalyzer' + consumes products during Event from these EventSetup modules: + WhatsItESProducer/'' ESProducer + ConsumeIOVTestInfoAnalyzer/'consumeIOVTestInfoAnalyzer' + consumes products during Event from these EventSetup modules: + MayConsumeWhatsIt/'mayConsumeWhatsIt' ESProducer + ConsumeIOVTestInfoAnalyzer/'consumeIOVTestInfoAnalyzer2' + consumes products during Event from these EventSetup modules: + MayConsumeWhatsIt/'mayConsumeWhatsIt' ESProducer + ConsumingIntProducer/'testManyConsumingProducer' + consumes products from these modules: + TriggerResultInserter/'TriggerResults' + PoolOutputModule/'out' + consumes products from these modules: + TriggerResultInserter/'TriggerResults' + IntProducer/'intProducerA' + IntProducer/'intProducer' + IntProducer/'intProducerU' + ConsumingIntProducer/'testManyConsumingProducer' + IntProducer/'testStreamingProducer' + IntVectorProducer/'intVectorProducer' TriggerResultInserter/'TriggerResults' PathStatusInserter/'p' PathStatusInserter/'p2' PathStatusInserter/'p3' PathStatusInserter/'p11' + PathStatusInserter/'testEventSetupPath' EndPathStatusInserter/'e' EndPathStatusInserter/'p1ep2' +All EventSetup modules: + RunLumiESSource/'runLumiESSource' + ConcurrentIOVESProducer/'concurrentIOVESProducer' + consumes products from these EventSetup modules: + ConcurrentIOVESSource/'concurrentIOVESSource' + ConcurrentIOVESSource/'concurrentIOVESSource' + ConsumeWhatsIt/'consumeWhatsIt' + consumes products from these EventSetup modules: + DoodadESSource/'DoodadESSource' + WhatsItESProducer/'WhatsItESProducer' + MayConsumeWhatsIt/'mayConsumeWhatsIt' + consumes products from these EventSetup modules: + DoodadESSource/'DoodadESSource' + WhatsItESProducer/'WhatsItESProducer' + ConsumeWhatsIt/'consumeWhatsIt' + WhatsItESProducer/'WhatsItESProducer' + consumes products from these EventSetup modules: + DoodadESSource/'DoodadESSource' + DoodadESSource/'DoodadESSource' All modules (listed by class and label) and all their consumed products. Consumed products are listed by type, label, instance, process. For products not in the event, 'processBlock', 'run' or 'lumi' is added to indicate the TTree they are from. For products that are declared with mayConsume, 'may consume' is added. For products consumed for Views, 'element type' is added For products only read from previous processes, 'skip current process' is added +Consumed EventSetup products are listed by record type, data type, product label, +transition of request, whether module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. IntProducer/'intProducerA' IntProducer/'intProducerF' IntProducer/'intProducerG' @@ -97,87 +185,253 @@ For products only read from previous processes, 'skip current process' is added IntProducer/'intProducerU' IntVectorProducer/'intVectorProducer' IntProducer/'intProducer' - TestFindProduct/'a1' consumes: - edmtest::IntProduct 'source' '' '' - edmtest::IntProduct 'source' '' '', skip current process - edmtest::IntProduct 'intProducer' '' '', skip current process - edmtest::IntProduct 'intProducerU' '' '', skip current process - TestFindProduct/'a2' consumes: - edmtest::IntProduct 'intProducerA' '' '' - TestFindProduct/'a3' consumes: - edmtest::IntProduct 'aliasForInt' '' '' - TestFindProduct/'a4' consumes: - edmtest::IntProduct 'intProducerA' '' 'PROD1' + TestFindProduct/'a1' + consumes: + edmtest::IntProduct 'source' '' '' + edmtest::IntProduct 'source' '' '', skip current process + edmtest::IntProduct 'intProducer' '' '', skip current process + edmtest::IntProduct 'intProducerU' '' '', skip current process + TestFindProduct/'a2' + consumes: + edmtest::IntProduct 'intProducerA' '' '' + TestFindProduct/'a3' + consumes: + edmtest::IntProduct 'aliasForInt' '' '' + TestFindProduct/'a4' + consumes: + edmtest::IntProduct 'intProducerA' '' 'PROD1' TestContextAnalyzer/'test' - TestFindProduct/'testView1' consumes: - int 'intVectorProducer' '' 'PROD1', element type + TestFindProduct/'testView1' + consumes: + int 'intVectorProducer' '' 'PROD1', element type IntProducer/'testStreamingProducer' - ConsumingStreamAnalyzer/'testStreamingAnalyzer' consumes: - edmtest::IntProduct 'testStreamingProducer' '' '', may consume + ConsumingStreamAnalyzer/'testStreamingAnalyzer' + consumes: + edmtest::IntProduct 'testStreamingProducer' '' '', may consume IntProducerBeginProcessBlock/'intProducerBeginProcessBlock' IntProducerEndProcessBlock/'intProducerEndProcessBlock' - TestFindProduct/'processBlockTest1' consumes: - edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' '', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock + TestFindProduct/'processBlockTest1' + consumes: + edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' '', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock IntProducer/'intProducerB' IntProducer/'intProducerC' IntProducer/'intProducerD' IntProducer/'intProducerE' - ConsumingIntProducer/'testManyConsumingProducer' consumes: - edm::TriggerResults 'TriggerResults' '' '' - edm::TriggerResults 'TriggerResults' '' 'PROD1' - PoolOutputModule/'out' consumes: - edm::TriggerResults 'TriggerResults' '' 'PROD1' - edmtest::IntProduct 'aliasForInt' '' 'PROD1' - edmtest::IntProduct 'intProducer' '' 'PROD1' - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'PROD1', processBlock - edmtest::IntProduct 'intProducerU' '' 'PROD1' - edmtest::IntProduct 'source' '' 'PROD1' - edmtest::IntProduct 'testManyConsumingProducer' '' 'PROD1' - edmtest::IntProduct 'testStreamingProducer' '' 'PROD1' - std::vector 'intVectorProducer' '' 'PROD1' + RunLumiESAnalyzer/'testReadLumiESSource' + consumes from EventSetup: + ESTestRecordC edmtest::IOVTestInfo '' Event ESSource RunLumiESSource/'runLumiESSource' 0 + ESTestRecordC edmtest::IOVTestInfo 'nonEmptyLabel' Event ESSource RunLumiESSource/'runLumiESSource' 1 + ESTestRecordC edmtest::IOVTestInfo '' BeginRun ESSource RunLumiESSource/'runLumiESSource' 0 + ESTestRecordC edmtest::IOVTestInfo '' BeginLuminosityBlock ESSource RunLumiESSource/'runLumiESSource' 0 + ESTestRecordC edmtest::IOVTestInfo '' EndLuminosityBlock ESSource RunLumiESSource/'runLumiESSource' 0 + ESTestRecordC edmtest::IOVTestInfo '' EndRun ESSource RunLumiESSource/'runLumiESSource' 0 + RunLumiESAnalyzer/'testReadLumiESSource1' + consumes: + edmtest::IntProduct 'intProducer' '' '' + consumes from EventSetup: + ESTestRecordC edmtest::IOVTestInfo '' Event ESSource RunLumiESSource/'runLumiESSource' 0 (module label matches requested label) + ESTestRecordC edmtest::IOVTestInfo 'nonEmptyLabel' Event ESSource RunLumiESSource/'runLumiESSource' 1 + ESTestRecordC edmtest::IOVTestInfo '' BeginRun ESSource RunLumiESSource/'runLumiESSource' 0 (module label matches requested label) + ESTestRecordC edmtest::IOVTestInfo '' BeginLuminosityBlock ESSource RunLumiESSource/'runLumiESSource' 0 (module label matches requested label) + ESTestRecordC edmtest::IOVTestInfo '' EndLuminosityBlock ESSource RunLumiESSource/'runLumiESSource' 0 (module label matches requested label) + ESTestRecordC edmtest::IOVTestInfo '' EndRun ESSource RunLumiESSource/'runLumiESSource' 0 (module label matches requested label) + RunLumiESAnalyzer/'testReadLumiESSource2' + consumes from EventSetup: + ESTestRecordC edmtest::IOVTestInfo 'productLabelThatDoesNotExist' Event, No EventSetup module configured to produce this data. + ESTestRecordC edmtest::IOVTestInfo 'nonEmptyLabel' Event ESSource RunLumiESSource/'runLumiESSource' 1 + ESTestRecordC edmtest::IOVTestInfo 'productLabelThatDoesNotExist' BeginRun, No EventSetup module configured to produce this data. + ESTestRecordC edmtest::IOVTestInfo 'productLabelThatDoesNotExist' BeginLuminosityBlock, No EventSetup module configured to produce this data. + ESTestRecordC edmtest::IOVTestInfo 'productLabelThatDoesNotExist' EndLuminosityBlock, No EventSetup module configured to produce this data. + ESTestRecordC edmtest::IOVTestInfo 'productLabelThatDoesNotExist' EndRun, No EventSetup module configured to produce this data. + RunLumiESAnalyzer/'testReadLumiESSource3' + consumes from EventSetup: + ESTestRecordC edmtest::IOVTestInfo '' Event, EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + ESTestRecordC edmtest::IOVTestInfo 'nonEmptyLabel' Event ESSource RunLumiESSource/'runLumiESSource' 1 + ESTestRecordC edmtest::IOVTestInfo '' BeginRun, EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + ESTestRecordC edmtest::IOVTestInfo '' BeginLuminosityBlock, EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + ESTestRecordC edmtest::IOVTestInfo '' EndLuminosityBlock, EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + ESTestRecordC edmtest::IOVTestInfo '' EndRun, EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + ConcurrentIOVAnalyzer/'concurrentIOVAnalyzer' + consumes from EventSetup: + ESTestRecordI edmtest::IOVTestInfo '' Event ESSource ConcurrentIOVESSource/'concurrentIOVESSource' 0 + ESTestRecordI edmtest::IOVTestInfo 'fromESProducer' Event ESProducer ConcurrentIOVESProducer/'concurrentIOVESProducer' 0 + WhatsItAnalyzer/'WhatsItAnalyzer' + consumes from EventSetup: + GadgetRcd edmtest::WhatsIt '' Event ESProducer WhatsItESProducer/'WhatsItESProducer' 0 + GadgetRcd edmtest::WhatsIt 'A' Event ESProducer WhatsItESProducer/'WhatsItESProducer' 1 + GadgetRcd edmtest::WhatsIt 'B' Event ESProducer WhatsItESProducer/'WhatsItESProducer' 2 + GadgetRcd edmtest::WhatsIt 'C' Event ESProducer WhatsItESProducer/'WhatsItESProducer' 3 + GadgetRcd edmtest::WhatsIt 'D' Event ESProducer WhatsItESProducer/'WhatsItESProducer' 4 + ConsumeIOVTestInfoAnalyzer/'consumeIOVTestInfoAnalyzer' + consumes from EventSetup: + GadgetRcd edmtest::IOVTestInfo 'DependsOnMayConsume' Event ESProducer MayConsumeWhatsIt/'mayConsumeWhatsIt' 0 + ConsumeIOVTestInfoAnalyzer/'consumeIOVTestInfoAnalyzer2' + consumes from EventSetup: + GadgetRcd edmtest::IOVTestInfo 'DependsOnMayConsume2' Event ESProducer MayConsumeWhatsIt/'mayConsumeWhatsIt' 1 + ConsumingIntProducer/'testManyConsumingProducer' + consumes: + edm::TriggerResults 'TriggerResults' '' '' + edm::TriggerResults 'TriggerResults' '' 'PROD1' + PoolOutputModule/'out' + consumes: + edm::TriggerResults 'TriggerResults' '' 'PROD1' + edmtest::IntProduct 'aliasForInt' '' 'PROD1' + edmtest::IntProduct 'intProducer' '' 'PROD1' + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'PROD1', processBlock + edmtest::IntProduct 'intProducerU' '' 'PROD1' + edmtest::IntProduct 'source' '' 'PROD1' + edmtest::IntProduct 'testManyConsumingProducer' '' 'PROD1' + edmtest::IntProduct 'testStreamingProducer' '' 'PROD1' + std::vector 'intVectorProducer' '' 'PROD1' TriggerResultInserter/'TriggerResults' PathStatusInserter/'p' PathStatusInserter/'p2' PathStatusInserter/'p3' PathStatusInserter/'p11' + PathStatusInserter/'testEventSetupPath' EndPathStatusInserter/'e' EndPathStatusInserter/'p1ep2' +All EventSetup modules (listed by class and label) and all their consumed products. +These modules can only consume EventSetup products. These are listed by record type, +data type, product label, whether the module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. + RunLumiESSource/'runLumiESSource' + Consumed products for consumer transition: 0 + --- no products consumed --- + Consumed products for consumer transition: 1 + --- no products consumed --- + ConcurrentIOVESProducer/'concurrentIOVESProducer' + Consumed products for consumer transition: 0 + ESTestRecordI edmtest::IOVTestInfo '' ESSource ConcurrentIOVESSource/'concurrentIOVESSource' 0 + ConcurrentIOVESSource/'concurrentIOVESSource' + Consumed products for consumer transition: 0 + --- no products consumed --- + ConsumeWhatsIt/'consumeWhatsIt' + Consumed products for consumer transition: 0 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt '' ESProducer WhatsItESProducer/'WhatsItESProducer' 0 + GadgetRcd edmtest::WhatsIt 'A' ESProducer WhatsItESProducer/'WhatsItESProducer' 1 + GadgetRcd edmtest::WhatsIt 'B' ESProducer WhatsItESProducer/'WhatsItESProducer' 2 + GadgetRcd edmtest::WhatsIt 'C' ESProducer WhatsItESProducer/'WhatsItESProducer' 3 + GadgetRcd edmtest::WhatsIt 'D' ESProducer WhatsItESProducer/'WhatsItESProducer' 4 + Consumed products for consumer transition: 1 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt '' ESProducer WhatsItESProducer/'WhatsItESProducer' 0 + GadgetRcd edmtest::WhatsIt 'A' ESProducer WhatsItESProducer/'WhatsItESProducer' 1 + GadgetRcd edmtest::WhatsIt 'B' ESProducer WhatsItESProducer/'WhatsItESProducer' 2 + GadgetRcd edmtest::WhatsIt 'C' ESProducer WhatsItESProducer/'WhatsItESProducer' 3 + GadgetRcd edmtest::WhatsIt 'D' ESProducer WhatsItESProducer/'WhatsItESProducer' 4 + Consumed products for consumer transition: 2 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt '' ESProducer WhatsItESProducer/'WhatsItESProducer' 0 + GadgetRcd edmtest::WhatsIt 'A' ESProducer WhatsItESProducer/'WhatsItESProducer' 1 + GadgetRcd edmtest::WhatsIt 'B' ESProducer WhatsItESProducer/'WhatsItESProducer' 2 + GadgetRcd edmtest::WhatsIt 'C' ESProducer WhatsItESProducer/'WhatsItESProducer' 3 + GadgetRcd edmtest::WhatsIt 'D' ESProducer WhatsItESProducer/'WhatsItESProducer' 4 + Consumed products for consumer transition: 3 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt 'productLabelThatDoesNotExist', No EventSetup module configured to produce this data. + GadgetRcd edmtest::WhatsIt 'productLabelThatDoesNotExist', No EventSetup module configured to produce this data. + GadgetRcd edmtest::WhatsIt 'B', EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + GadgetRcd edmtest::WhatsIt 'C', EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + GadgetRcd edmtest::WhatsIt 'D', EventSetup module label mismatch, requested 'moduleLabelThatDoesNotMatch' + Consumed products for consumer transition: 4 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt '' ESProducer WhatsItESProducer/'WhatsItESProducer' 0 (module label matches requested label) + GadgetRcd edmtest::WhatsIt 'A' ESProducer WhatsItESProducer/'WhatsItESProducer' 1 (module label matches requested label) + GadgetRcd edmtest::WhatsIt 'B' ESProducer WhatsItESProducer/'WhatsItESProducer' 2 (module label matches requested label) + GadgetRcd edmtest::WhatsIt 'C' ESProducer WhatsItESProducer/'WhatsItESProducer' 3 (module label matches requested label) + GadgetRcd edmtest::WhatsIt 'D' ESProducer WhatsItESProducer/'WhatsItESProducer' 4 (module label matches requested label) + MayConsumeWhatsIt/'mayConsumeWhatsIt' + Consumed products for consumer transition: 0 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd edmtest::WhatsIt + May Consumes, available products that might be consumed (they match record type and product type): + '' ESProducer WhatsItESProducer/'WhatsItESProducer' 0 + 'A' ESProducer WhatsItESProducer/'WhatsItESProducer' 1 + 'AR' ESProducer ConsumeWhatsIt/'consumeWhatsIt' 1 + 'B' ESProducer WhatsItESProducer/'WhatsItESProducer' 2 + 'BR' ESProducer ConsumeWhatsIt/'consumeWhatsIt' 2 + 'C' ESProducer WhatsItESProducer/'WhatsItESProducer' 3 + 'CR' ESProducer ConsumeWhatsIt/'consumeWhatsIt' 3 + 'D' ESProducer WhatsItESProducer/'WhatsItESProducer' 4 + 'DR' ESProducer ConsumeWhatsIt/'consumeWhatsIt' 4 + 'R' ESProducer ConsumeWhatsIt/'consumeWhatsIt' 0 + Consumed products for consumer transition: 1 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + GadgetRcd ESTestDataA + May Consumes, available products that might be consumed (they match record type and product type): + --- no available products that match --- + WhatsItESProducer/'WhatsItESProducer' + Consumed products for consumer transition: 0 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + Consumed products for consumer transition: 1 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + Consumed products for consumer transition: 2 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + Consumed products for consumer transition: 3 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + Consumed products for consumer transition: 4 + GadgetRcd edmtest::Doodad '' ESSource DoodadESSource/'DoodadESSource' 0 + DoodadESSource/'DoodadESSource' + Consumed products for consumer transition: 0 + --- no products consumed --- Process name = PROD2 paths: path1 end paths: + --- there are no endpaths --- modules on path path1: intProducerB intProducerD All modules and modules in the current process whose products they consume: (This does not include modules from previous processes or the source) -(Exclusively considers Event products, not Run, Lumi, or ProcessBlock products) +(Exclusively considers consumed Event and EventSetup products, not Run, Lumi, or ProcessBlock products) IntProducer/'intProducerF' IntProducer/'intProducerH' IntProducer/'intProducerB' IntProducer/'intProducerD' TriggerResultInserter/'TriggerResults' PathStatusInserter/'path1' +All EventSetup modules: + --- there are no EventSetup modules --- All modules (listed by class and label) and all their consumed products. Consumed products are listed by type, label, instance, process. For products not in the event, 'processBlock', 'run' or 'lumi' is added to indicate the TTree they are from. For products that are declared with mayConsume, 'may consume' is added. For products consumed for Views, 'element type' is added For products only read from previous processes, 'skip current process' is added +Consumed EventSetup products are listed by record type, data type, product label, +transition of request, whether module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. IntProducer/'intProducerF' IntProducer/'intProducerH' IntProducer/'intProducerB' IntProducer/'intProducerD' TriggerResultInserter/'TriggerResults' PathStatusInserter/'path1' +All EventSetup modules (listed by class and label) and all their consumed products. +These modules can only consume EventSetup products. These are listed by record type, +data type, product label, whether the module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. + --- there are no EventSetup modules --- Process name = COPY paths: @@ -185,6 +439,7 @@ paths: path1 path2 path3 + testEventSetupPath end paths: ep1 ep2 @@ -232,15 +487,19 @@ modules on path path3: intProducerBeginProcessBlock intProducerEndProcessBlock processBlockTest1 -modules on end path ep1: +modules on path testEventSetupPath: + testReadLumiESSource + concurrentIOVAnalyzer +modules on endpath ep1: intVectorProducer testManyConsumingProducer -modules on end path ep2: -modules on end path endPath: +modules on endpath ep2: + --- there are no modules on this endpath --- +modules on endpath endPath: testOneOutput All modules and modules in the current process whose products they consume: (This does not include modules from previous processes or the source) -(Exclusively considers Event products, not Run, Lumi, or ProcessBlock products) +(Exclusively considers consumed Event and EventSetup products, not Run, Lumi, or ProcessBlock products) IntProducer/'intProducerF' IntProducer/'intProducerG' IntVectorProducer/'intVectorProducer' @@ -248,261 +507,375 @@ All modules and modules in the current process whose products they consume: ThingWithMergeProducer/'thingWithMergeProducer' TestMergeResults/'testMergeResults' TestFindProduct/'testView1' - TestFindProduct/'testView2' consumes products from these modules: - IntVectorProducer/'intVectorProducer' - TestFindProduct/'testView3' consumes products from these modules: - IntVectorProducer/'intVectorProducer' + TestFindProduct/'testView2' + consumes products from these modules: + IntVectorProducer/'intVectorProducer' + TestFindProduct/'testView3' + consumes products from these modules: + IntVectorProducer/'intVectorProducer' IntProducer/'testStreamingProducer' - ConsumingStreamAnalyzer/'testStreamingAnalyzer' consumes products from these modules: - IntProducer/'testStreamingProducer' + ConsumingStreamAnalyzer/'testStreamingAnalyzer' + consumes products from these modules: + IntProducer/'testStreamingProducer' IntProducer/'intProducerB' IntProducer/'intProducerC' - TestFindProduct/'a1' consumes products from these modules: - IntProducer/'intProducerB' + TestFindProduct/'a1' + consumes products from these modules: + IntProducer/'intProducerB' TestFindProduct/'a2' - TestFindProduct/'a3' consumes products from these modules: - IntProducer/'intProducerC' + TestFindProduct/'a3' + consumes products from these modules: + IntProducer/'intProducerC' TestFindProduct/'a4' TestFindProduct/'a5' TestFindProduct/'a6' TestFindProduct/'a7' TestFindProduct/'a8' - TestFindProduct/'a9' consumes products from these modules: - IntProducer/'intProducerF' + TestFindProduct/'a9' + consumes products from these modules: + IntProducer/'intProducerF' TestFindProduct/'a10' - TestFindProduct/'a11' consumes products from these modules: - IntProducer/'intProducerG' + TestFindProduct/'a11' + consumes products from these modules: + IntProducer/'intProducerG' TestFindProduct/'a12' TestFindProduct/'a13' TestFindProduct/'a14' TestFindProduct/'a15' TestFindProduct/'a16' - TestFindProduct/'a17' consumes products from these modules: - IntProducer/'intProducerB' - TestFindProduct/'a18' consumes products from these modules: - IntProducer/'intProducerC' + TestFindProduct/'a17' + consumes products from these modules: + IntProducer/'intProducerB' + TestFindProduct/'a18' + consumes products from these modules: + IntProducer/'intProducerC' TestFindProduct/'a19' TestFindProduct/'a20' - TestFindProduct/'a21' consumes products from these modules: - IntProducer/'intProducerF' - TestFindProduct/'a22' consumes products from these modules: - IntProducer/'intProducerG' + TestFindProduct/'a21' + consumes products from these modules: + IntProducer/'intProducerF' + TestFindProduct/'a22' + consumes products from these modules: + IntProducer/'intProducerG' TestFindProduct/'a23' TestFindProduct/'a24' - TestFindProduct/'a25' consumes products from these modules: - IntProducer/'intProducerB' - IntProducer/'intProducerC' - IntProducer/'intProducerF' - IntProducer/'intProducerG' + TestFindProduct/'a25' + consumes products from these modules: + IntProducer/'intProducerB' + IntProducer/'intProducerC' + IntProducer/'intProducerF' + IntProducer/'intProducerG' IntProducerBeginProcessBlock/'intProducerBeginProcessBlock' IntProducerEndProcessBlock/'intProducerEndProcessBlock' TestFindProduct/'processBlockTest1' - ConsumingIntProducer/'testManyConsumingProducer' consumes products from these modules: - TriggerResultInserter/'TriggerResults' - TestOneOutput/'testOneOutput' consumes products from these modules: - TriggerResultInserter/'TriggerResults' - IntProducer/'intProducerB' - IntProducer/'intProducerC' - IntProducer/'intProducerF' - IntProducer/'intProducerG' - ConsumingIntProducer/'testManyConsumingProducer' - IntProducer/'testStreamingProducer' - IntVectorProducer/'intVectorProducer' + RunLumiESAnalyzer/'testReadLumiESSource' + consumes products during Event from these EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' ESSource + consumes products during BeginLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' ESSource + consumes products during EndLuminosityBlock from these EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' ESSource + consumes products during BeginRun from these EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' ESSource + consumes products during EndRun from these EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' ESSource + ConcurrentIOVAnalyzer/'concurrentIOVAnalyzer' + consumes products during Event from these EventSetup modules: + ConcurrentIOVESSource/'concurrentIOVESSource' ESSource + ConcurrentIOVESProducer/'concurrentIOVESProducer' ESProducer + ConsumingIntProducer/'testManyConsumingProducer' + consumes products from these modules: + TriggerResultInserter/'TriggerResults' + TestOneOutput/'testOneOutput' + consumes products from these modules: + TriggerResultInserter/'TriggerResults' + IntProducer/'intProducerB' + IntProducer/'intProducerC' + IntProducer/'intProducerF' + IntProducer/'intProducerG' + ConsumingIntProducer/'testManyConsumingProducer' + IntProducer/'testStreamingProducer' + IntVectorProducer/'intVectorProducer' TriggerResultInserter/'TriggerResults' PathStatusInserter/'p3' PathStatusInserter/'path1' PathStatusInserter/'path2' PathStatusInserter/'path3' + PathStatusInserter/'testEventSetupPath' EndPathStatusInserter/'ep1' EndPathStatusInserter/'ep2' EndPathStatusInserter/'endPath' +All EventSetup modules: + RunLumiESSource/'runLumiESSourceCopy' + ConcurrentIOVESProducer/'concurrentIOVESProducer' + consumes products from these EventSetup modules: + ConcurrentIOVESSource/'concurrentIOVESSource' + ConcurrentIOVESSource/'concurrentIOVESSource' All modules (listed by class and label) and all their consumed products. Consumed products are listed by type, label, instance, process. For products not in the event, 'processBlock', 'run' or 'lumi' is added to indicate the TTree they are from. For products that are declared with mayConsume, 'may consume' is added. For products consumed for Views, 'element type' is added For products only read from previous processes, 'skip current process' is added +Consumed EventSetup products are listed by record type, data type, product label, +transition of request, whether module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. IntProducer/'intProducerF' IntProducer/'intProducerG' IntVectorProducer/'intVectorProducer' TestContextAnalyzer/'test' ThingWithMergeProducer/'thingWithMergeProducer' - TestMergeResults/'testMergeResults' consumes: - edmtest::Thing 'thingWithMergeProducer' 'event' 'PROD' - edmtest::Thing 'thingWithMergeProducer' 'beginRun' 'PROD', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' 'PROD', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' 'PROD', run - edmtest::Thing 'thingWithMergeProducer' 'beginRun' '', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' '', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' '', run - edmtest::Thing 'thingWithMergeProducer' 'endRun' 'PROD', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' 'PROD', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' 'PROD', run - edmtest::Thing 'thingWithMergeProducer' 'endRun' '', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' '', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' '', run - edmtest::Thing 'thingWithMergeProducer' 'endLumi' 'PROD', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' 'PROD', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' 'PROD', lumi - edmtest::Thing 'thingWithMergeProducer' 'endLumi' '', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' '', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' '', lumi - edmtest::Thing 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi - edmtest::Thing 'thingWithMergeProducer' 'beginLumi' '', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' '', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' '', lumi - TestFindProduct/'testView1' consumes: - int 'intVectorProducer' '' 'PROD1', element type - TestFindProduct/'testView2' consumes: - int 'intVectorProducer' '' 'COPY', element type - TestFindProduct/'testView3' consumes: - int 'intVectorProducer' '' 'COPY', element type + TestMergeResults/'testMergeResults' + consumes: + edmtest::Thing 'thingWithMergeProducer' 'event' 'PROD' + edmtest::Thing 'thingWithMergeProducer' 'beginRun' 'PROD', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' 'PROD', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' 'PROD', run + edmtest::Thing 'thingWithMergeProducer' 'beginRun' '', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' '', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' '', run + edmtest::Thing 'thingWithMergeProducer' 'endRun' 'PROD', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' 'PROD', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' 'PROD', run + edmtest::Thing 'thingWithMergeProducer' 'endRun' '', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' '', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' '', run + edmtest::Thing 'thingWithMergeProducer' 'endLumi' 'PROD', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' 'PROD', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' 'PROD', lumi + edmtest::Thing 'thingWithMergeProducer' 'endLumi' '', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' '', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' '', lumi + edmtest::Thing 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' 'PROD', lumi + edmtest::Thing 'thingWithMergeProducer' 'beginLumi' '', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' '', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' '', lumi + TestFindProduct/'testView1' + consumes: + int 'intVectorProducer' '' 'PROD1', element type + TestFindProduct/'testView2' + consumes: + int 'intVectorProducer' '' 'COPY', element type + TestFindProduct/'testView3' + consumes: + int 'intVectorProducer' '' 'COPY', element type IntProducer/'testStreamingProducer' - ConsumingStreamAnalyzer/'testStreamingAnalyzer' consumes: - edmtest::IntProduct 'testStreamingProducer' '' '', may consume + ConsumingStreamAnalyzer/'testStreamingAnalyzer' + consumes: + edmtest::IntProduct 'testStreamingProducer' '' '', may consume IntProducer/'intProducerB' IntProducer/'intProducerC' - TestFindProduct/'a1' consumes: - edmtest::IntProduct 'intProducerB' '' '' - TestFindProduct/'a2' consumes: - edmtest::IntProduct 'intProducerB' '' '', skip current process - TestFindProduct/'a3' consumes: - edmtest::IntProduct 'intProducerC' '' '' - TestFindProduct/'a4' consumes: - edmtest::IntProduct 'intProducerC' '' '', skip current process - TestFindProduct/'a5' consumes: - edmtest::IntProduct 'intProducerD' '' '' - TestFindProduct/'a6' consumes: - edmtest::IntProduct 'intProducerD' '' '', skip current process - TestFindProduct/'a7' consumes: - edmtest::IntProduct 'intProducerE' '' '' - TestFindProduct/'a8' consumes: - edmtest::IntProduct 'intProducerE' '' '', skip current process - TestFindProduct/'a9' consumes: - edmtest::IntProduct 'intProducerF' '' '' - TestFindProduct/'a10' consumes: - edmtest::IntProduct 'intProducerF' '' '', skip current process - TestFindProduct/'a11' consumes: - edmtest::IntProduct 'intProducerG' '' '' - TestFindProduct/'a12' consumes: - edmtest::IntProduct 'intProducerG' '' '', skip current process - TestFindProduct/'a13' consumes: - edmtest::IntProduct 'intProducerH' '' '' - TestFindProduct/'a14' consumes: - edmtest::IntProduct 'intProducerH' '' '', skip current process - TestFindProduct/'a15' consumes: - edmtest::IntProduct 'intProducerI' '' '' - TestFindProduct/'a16' consumes: - edmtest::IntProduct 'intProducerI' '' '', skip current process - TestFindProduct/'a17' consumes: - edmtest::IntProduct 'intProducerB' '' 'COPY' - TestFindProduct/'a18' consumes: - edmtest::IntProduct 'intProducerC' '' 'COPY' - TestFindProduct/'a19' consumes: - edmtest::IntProduct 'intProducerD' '' 'COPY' - TestFindProduct/'a20' consumes: - edmtest::IntProduct 'intProducerE' '' 'COPY' - TestFindProduct/'a21' consumes: - edmtest::IntProduct 'intProducerF' '' 'COPY' - TestFindProduct/'a22' consumes: - edmtest::IntProduct 'intProducerG' '' 'COPY' - TestFindProduct/'a23' consumes: - edmtest::IntProduct 'intProducerH' '' 'COPY' - TestFindProduct/'a24' consumes: - edmtest::IntProduct 'intProducerI' '' 'COPY' - TestFindProduct/'a25' consumes: - edmtest::IntProduct 'intProducerB' '' 'COPY' - edmtest::IntProduct 'intProducerC' '' '' - edmtest::IntProduct 'intProducerD' '' '' - edmtest::IntProduct 'intProducerF' '' 'COPY' - edmtest::IntProduct 'intProducerG' '' 'COPY' - edmtest::IntProduct 'intProducerI' '' '' - edmtest::IntProduct 'intProducerE' '' 'COPY' - edmtest::IntProduct 'intProducerH' '' 'COPY' - edmtest::IntProduct 'intProducerQ' 'INSTANCE' 'DOESNOTEXIST' + TestFindProduct/'a1' + consumes: + edmtest::IntProduct 'intProducerB' '' '' + TestFindProduct/'a2' + consumes: + edmtest::IntProduct 'intProducerB' '' '', skip current process + TestFindProduct/'a3' + consumes: + edmtest::IntProduct 'intProducerC' '' '' + TestFindProduct/'a4' + consumes: + edmtest::IntProduct 'intProducerC' '' '', skip current process + TestFindProduct/'a5' + consumes: + edmtest::IntProduct 'intProducerD' '' '' + TestFindProduct/'a6' + consumes: + edmtest::IntProduct 'intProducerD' '' '', skip current process + TestFindProduct/'a7' + consumes: + edmtest::IntProduct 'intProducerE' '' '' + TestFindProduct/'a8' + consumes: + edmtest::IntProduct 'intProducerE' '' '', skip current process + TestFindProduct/'a9' + consumes: + edmtest::IntProduct 'intProducerF' '' '' + TestFindProduct/'a10' + consumes: + edmtest::IntProduct 'intProducerF' '' '', skip current process + TestFindProduct/'a11' + consumes: + edmtest::IntProduct 'intProducerG' '' '' + TestFindProduct/'a12' + consumes: + edmtest::IntProduct 'intProducerG' '' '', skip current process + TestFindProduct/'a13' + consumes: + edmtest::IntProduct 'intProducerH' '' '' + TestFindProduct/'a14' + consumes: + edmtest::IntProduct 'intProducerH' '' '', skip current process + TestFindProduct/'a15' + consumes: + edmtest::IntProduct 'intProducerI' '' '' + TestFindProduct/'a16' + consumes: + edmtest::IntProduct 'intProducerI' '' '', skip current process + TestFindProduct/'a17' + consumes: + edmtest::IntProduct 'intProducerB' '' 'COPY' + TestFindProduct/'a18' + consumes: + edmtest::IntProduct 'intProducerC' '' 'COPY' + TestFindProduct/'a19' + consumes: + edmtest::IntProduct 'intProducerD' '' 'COPY' + TestFindProduct/'a20' + consumes: + edmtest::IntProduct 'intProducerE' '' 'COPY' + TestFindProduct/'a21' + consumes: + edmtest::IntProduct 'intProducerF' '' 'COPY' + TestFindProduct/'a22' + consumes: + edmtest::IntProduct 'intProducerG' '' 'COPY' + TestFindProduct/'a23' + consumes: + edmtest::IntProduct 'intProducerH' '' 'COPY' + TestFindProduct/'a24' + consumes: + edmtest::IntProduct 'intProducerI' '' 'COPY' + TestFindProduct/'a25' + consumes: + edmtest::IntProduct 'intProducerB' '' 'COPY' + edmtest::IntProduct 'intProducerC' '' '' + edmtest::IntProduct 'intProducerD' '' '' + edmtest::IntProduct 'intProducerF' '' 'COPY' + edmtest::IntProduct 'intProducerG' '' 'COPY' + edmtest::IntProduct 'intProducerI' '' '' + edmtest::IntProduct 'intProducerE' '' 'COPY' + edmtest::IntProduct 'intProducerH' '' 'COPY' + edmtest::IntProduct 'intProducerQ' 'INSTANCE' 'DOESNOTEXIST' IntProducerBeginProcessBlock/'intProducerBeginProcessBlock' IntProducerEndProcessBlock/'intProducerEndProcessBlock' - TestFindProduct/'processBlockTest1' consumes: - edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' '', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock - ConsumingIntProducer/'testManyConsumingProducer' consumes: - edm::TriggerResults 'TriggerResults' '' '' - edm::TriggerResults 'TriggerResults' '' 'COPY' - edm::TriggerResults 'TriggerResults' '' 'PROD1' - edm::TriggerResults 'TriggerResults' '' 'PROD2' - TestOneOutput/'testOneOutput' consumes: - edm::TriggerResults 'TriggerResults' '' 'COPY' - edm::TriggerResults 'TriggerResults' '' 'PROD1' - edm::TriggerResults 'TriggerResults' '' 'PROD2' - edmtest::IntProduct 'aliasForInt' '' 'PROD1' - edmtest::IntProduct 'intProducer' '' 'PROD1' - edmtest::IntProduct 'intProducerB' '' 'COPY' - edmtest::IntProduct 'intProducerB' '' 'PROD1' - edmtest::IntProduct 'intProducerB' '' 'PROD2' - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock - edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerC' '' 'COPY' - edmtest::IntProduct 'intProducerC' '' 'PROD1' - edmtest::IntProduct 'intProducerD' '' 'PROD1' - edmtest::IntProduct 'intProducerD' '' 'PROD2' - edmtest::IntProduct 'intProducerE' '' 'PROD1' - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'PROD1', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'COPY', processBlock - edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'PROD1', processBlock - edmtest::IntProduct 'intProducerF' '' 'COPY' - edmtest::IntProduct 'intProducerF' '' 'PROD1' - edmtest::IntProduct 'intProducerF' '' 'PROD2' - edmtest::IntProduct 'intProducerG' '' 'COPY' - edmtest::IntProduct 'intProducerG' '' 'PROD1' - edmtest::IntProduct 'intProducerH' '' 'PROD1' - edmtest::IntProduct 'intProducerH' '' 'PROD2' - edmtest::IntProduct 'intProducerI' '' 'PROD1' - edmtest::IntProduct 'intProducerU' '' 'PROD1' - edmtest::IntProduct 'source' '' 'PROD1' - edmtest::IntProduct 'testManyConsumingProducer' '' 'COPY' - edmtest::IntProduct 'testManyConsumingProducer' '' 'PROD1' - edmtest::IntProduct 'testStreamingProducer' '' 'COPY' - edmtest::IntProduct 'testStreamingProducer' '' 'PROD1' - edmtest::Thing 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi - edmtest::Thing 'thingWithMergeProducer' 'beginRun' 'COPY', run - edmtest::Thing 'thingWithMergeProducer' 'endLumi' 'COPY', lumi - edmtest::Thing 'thingWithMergeProducer' 'endRun' 'COPY', run - edmtest::Thing 'thingWithMergeProducer' 'event' 'COPY' - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' 'COPY', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' 'COPY', lumi - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' 'COPY', run - edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'event' 'COPY' - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' 'COPY', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' 'COPY', lumi - edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' 'COPY', run - edmtest::ThingWithMerge 'thingWithMergeProducer' 'event' 'COPY' - std::vector 'intVectorProducer' '' 'COPY' - std::vector 'intVectorProducer' '' 'PROD1' + TestFindProduct/'processBlockTest1' + consumes: + edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' '', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' '', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock + RunLumiESAnalyzer/'testReadLumiESSource' + consumes from EventSetup: + ESTestRecordC edmtest::IOVTestInfo '' Event ESSource RunLumiESSource/'runLumiESSourceCopy' 0 + ESTestRecordC edmtest::IOVTestInfo 'nonEmptyLabel' Event ESSource RunLumiESSource/'runLumiESSourceCopy' 1 + ESTestRecordC edmtest::IOVTestInfo '' BeginRun ESSource RunLumiESSource/'runLumiESSourceCopy' 0 + ESTestRecordC edmtest::IOVTestInfo '' BeginLuminosityBlock ESSource RunLumiESSource/'runLumiESSourceCopy' 0 + ESTestRecordC edmtest::IOVTestInfo '' EndLuminosityBlock ESSource RunLumiESSource/'runLumiESSourceCopy' 0 + ESTestRecordC edmtest::IOVTestInfo '' EndRun ESSource RunLumiESSource/'runLumiESSourceCopy' 0 + ConcurrentIOVAnalyzer/'concurrentIOVAnalyzer' + consumes from EventSetup: + ESTestRecordI edmtest::IOVTestInfo '' Event ESSource ConcurrentIOVESSource/'concurrentIOVESSource' 0 + ESTestRecordI edmtest::IOVTestInfo 'fromESProducer' Event ESProducer ConcurrentIOVESProducer/'concurrentIOVESProducer' 0 + ConsumingIntProducer/'testManyConsumingProducer' + consumes: + edm::TriggerResults 'TriggerResults' '' '' + edm::TriggerResults 'TriggerResults' '' 'COPY' + edm::TriggerResults 'TriggerResults' '' 'PROD1' + edm::TriggerResults 'TriggerResults' '' 'PROD2' + TestOneOutput/'testOneOutput' + consumes: + edm::TriggerResults 'TriggerResults' '' 'COPY' + edm::TriggerResults 'TriggerResults' '' 'PROD1' + edm::TriggerResults 'TriggerResults' '' 'PROD2' + edmtest::IntProduct 'aliasForInt' '' 'PROD1' + edmtest::IntProduct 'intProducer' '' 'PROD1' + edmtest::IntProduct 'intProducerB' '' 'COPY' + edmtest::IntProduct 'intProducerB' '' 'PROD1' + edmtest::IntProduct 'intProducerB' '' 'PROD2' + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'COPY', processBlock + edmtest::IntProduct 'intProducerBeginProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerC' '' 'COPY' + edmtest::IntProduct 'intProducerC' '' 'PROD1' + edmtest::IntProduct 'intProducerD' '' 'PROD1' + edmtest::IntProduct 'intProducerD' '' 'PROD2' + edmtest::IntProduct 'intProducerE' '' 'PROD1' + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' '' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'four' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'three' 'PROD1', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'COPY', processBlock + edmtest::IntProduct 'intProducerEndProcessBlock' 'two' 'PROD1', processBlock + edmtest::IntProduct 'intProducerF' '' 'COPY' + edmtest::IntProduct 'intProducerF' '' 'PROD1' + edmtest::IntProduct 'intProducerF' '' 'PROD2' + edmtest::IntProduct 'intProducerG' '' 'COPY' + edmtest::IntProduct 'intProducerG' '' 'PROD1' + edmtest::IntProduct 'intProducerH' '' 'PROD1' + edmtest::IntProduct 'intProducerH' '' 'PROD2' + edmtest::IntProduct 'intProducerI' '' 'PROD1' + edmtest::IntProduct 'intProducerU' '' 'PROD1' + edmtest::IntProduct 'source' '' 'PROD1' + edmtest::IntProduct 'testManyConsumingProducer' '' 'COPY' + edmtest::IntProduct 'testManyConsumingProducer' '' 'PROD1' + edmtest::IntProduct 'testStreamingProducer' '' 'COPY' + edmtest::IntProduct 'testStreamingProducer' '' 'PROD1' + edmtest::Thing 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi + edmtest::Thing 'thingWithMergeProducer' 'beginRun' 'COPY', run + edmtest::Thing 'thingWithMergeProducer' 'endLumi' 'COPY', lumi + edmtest::Thing 'thingWithMergeProducer' 'endRun' 'COPY', run + edmtest::Thing 'thingWithMergeProducer' 'event' 'COPY' + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'beginRun' 'COPY', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endLumi' 'COPY', lumi + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'endRun' 'COPY', run + edmtest::ThingWithIsEqual 'thingWithMergeProducer' 'event' 'COPY' + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginLumi' 'COPY', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'beginRun' 'COPY', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endLumi' 'COPY', lumi + edmtest::ThingWithMerge 'thingWithMergeProducer' 'endRun' 'COPY', run + edmtest::ThingWithMerge 'thingWithMergeProducer' 'event' 'COPY' + std::vector 'intVectorProducer' '' 'COPY' + std::vector 'intVectorProducer' '' 'PROD1' TriggerResultInserter/'TriggerResults' PathStatusInserter/'p3' PathStatusInserter/'path1' PathStatusInserter/'path2' PathStatusInserter/'path3' + PathStatusInserter/'testEventSetupPath' EndPathStatusInserter/'ep1' EndPathStatusInserter/'ep2' EndPathStatusInserter/'endPath' +All EventSetup modules (listed by class and label) and all their consumed products. +These modules can only consume EventSetup products. These are listed by record type, +data type, product label, whether the module is ESSource, ESProducer, or ESProducerLooper, +and the module type and module label of the EventSetup module producing the product. +Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0). +If the requested module label was specified, then there is a remark in parentheses +stating whether it matched the actual module label of the producer. + RunLumiESSource/'runLumiESSourceCopy' + Consumed products for consumer transition: 0 + --- no products consumed --- + Consumed products for consumer transition: 1 + --- no products consumed --- + ConcurrentIOVESProducer/'concurrentIOVESProducer' + Consumed products for consumer transition: 0 + ESTestRecordI edmtest::IOVTestInfo '' ESSource ConcurrentIOVESSource/'concurrentIOVESSource' 0 + ConcurrentIOVESSource/'concurrentIOVESSource' + Consumed products for consumer transition: 0 + --- no products consumed --- +RunLumiESSource::produce startIOV = 1:0 endIOV = 1:0 IOV index = 0 cache identifier = 2 +RunLumiESSource::produce startIOV = 1:0 endIOV = 1:0 IOV index = 0 cache identifier = 2 +RunLumiESSource::produce startIOV = 1:1 endIOV = 1:1 IOV index = 0 cache identifier = 3 +RunLumiESSource::produce startIOV = 1:1 endIOV = 1:1 IOV index = 0 cache identifier = 3 +RunLumiESSource::produceNonEmptyLabel startIOV = 1:1 endIOV = 1:1 IOV index = 0 cache identifier = 3 +RunLumiESSource::produceNonEmptyLabel startIOV = 1:1 endIOV = 1:1 IOV index = 0 cache identifier = 3 +RunLumiESSource::produce startIOV = 1:4294967295 endIOV = 1:4294967295 IOV index = 0 cache identifier = 4 +RunLumiESSource::produce startIOV = 1:4294967295 endIOV = 1:4294967295 IOV index = 0 cache identifier = 4 TestFindProduct sum = 12 TestFindProduct sum = 300 TestFindProduct sum = 300 diff --git a/FWCore/ServiceRegistry/interface/ActivityRegistry.h b/FWCore/ServiceRegistry/interface/ActivityRegistry.h index 62cbd79d7eecf..525fc8b435f53 100644 --- a/FWCore/ServiceRegistry/interface/ActivityRegistry.h +++ b/FWCore/ServiceRegistry/interface/ActivityRegistry.h @@ -197,6 +197,16 @@ namespace edm { void watchPostEndJob(PostEndJob::slot_type const& iSlot) { postEndJobSignal_.connect_front(iSlot); } AR_WATCH_USING_METHOD_0(watchPostEndJob) + typedef signalslot::Signal + LookupInitializationComplete; + ///signal is emitted after all lookup objects have been initialized + LookupInitializationComplete lookupInitializationCompleteSignal_; + ///convenience function for attaching to signal + void watchLookupInitializationComplete(LookupInitializationComplete::slot_type const& iSlot) { + lookupInitializationCompleteSignal_.connect(iSlot); + } + AR_WATCH_USING_METHOD_2(watchLookupInitializationComplete) + typedef signalslot::Signal PreBeginStream; PreBeginStream preBeginStreamSignal_; void watchPreBeginStream(PreBeginStream::slot_type const& iSlot) { preBeginStreamSignal_.connect(iSlot); } diff --git a/FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h b/FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h new file mode 100644 index 0000000000000..72f9f98a07948 --- /dev/null +++ b/FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h @@ -0,0 +1,66 @@ +#ifndef FWCore_ServiceRegistry_EventSetupConsumesInfo_h +#define FWCore_ServiceRegistry_EventSetupConsumesInfo_h + +/**\class edm::EventSetupConsumesInfo + + Description: Contains information about a product + a module declares it will consume from the EventSetup. + + Normally, there will be one object per consumes call. + But in the case of a "may consumes", there will be multiple + objects with each object corresponding to one of the products + that might be consumed. + + Usage: These are typically returned by the PathsAndConsumesOfModules + object while EventProcessor::beginJob is running. +*/ +// +// Original Author: W. David Dagenhart +// Created: 11/14/2024 + +#include "FWCore/Utilities/interface/Transition.h" + +#include + +namespace edm { + struct EventSetupConsumesInfo { + public: + EventSetupConsumesInfo(); + + std::string_view moduleBaseType() const; + + // These are created by EDConsumerBase or ESProducer. + + // An empty moduleLabel_ indicates there is not an + // ESProducer, ESSource, or Looper configured to deliver + // the product with the requested EventSetupRecordKey and + // DataKey. Even if such a module exists, if the requested + // module label does not match an exception will be thrown + // if there is an attempt to actually get the data (or + // when the ESHandle is dereferenced if one gets that). + std::string_view eventSetupRecordType_; + std::string_view productType_; + std::string_view productLabel_; + std::string_view requestedModuleLabel_; + std::string_view moduleType_; + std::string_view moduleLabel_; + // This has the same value as the edm::Transition enum for the consumes items of + // an ED module. For EventSetup modules, it counts the calls to setWhatProduced that + // correspond to the functions that produce the data (starting the count at 0). Usually + // there is only one such function with the name "produce", but the Framework allows + // multiple such functions (at most one actually named "produce"). In the Framework, + // dependences and prefetching data are handled at the level of these functions and + // not at the module level. + unsigned int transitionOfConsumer_; + // Similar to the previous but this is the transition number of the produce method that + // creates the data product. + unsigned int transitionOfProducer_; + bool isSource_; + bool isLooper_; + bool moduleLabelMismatch_; + bool mayConsumes_; + bool mayConsumesFirstEntry_; + bool mayConsumesNoProducts_; + }; +} // namespace edm +#endif diff --git a/FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h b/FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h index a7a1ac7df77ad..c4e56d8b53c30 100644 --- a/FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h +++ b/FWCore/ServiceRegistry/interface/PathsAndConsumesOfModulesBase.h @@ -23,15 +23,24 @@ // Created: 11/5/2014 #include "FWCore/ServiceRegistry/interface/ConsumesInfo.h" +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" #include "FWCore/Utilities/interface/BranchType.h" +#include "FWCore/Utilities/interface/Transition.h" +#include #include #include namespace edm { + class ESProducer; class ModuleDescription; + namespace eventsetup { + struct ComponentDescription; + class ESProductResolverProvider; + } // namespace eventsetup + class PathsAndConsumesOfModulesBase { public: virtual ~PathsAndConsumesOfModulesBase(); @@ -51,11 +60,11 @@ namespace edm { return doModulesOnEndPath(endPathIndex); } - // The modules in the returned vector will be from the current process - // (not the prior process, and it will never include the source even + // The ED modules in the returned vector will be from the current process + // (not a prior process, and it will never include the source even // though the source can make products) and these modules will declare // they produce (they might or might not really produce) at least one - // product in the event (not run, not lumi) that the module corresponding + // product associated with the branchType that the module corresponding // to the moduleID argument declares it consumes (includes declarations using // consumes or maybeConsumes). Note that if a module declares // it consumes a module label that is an EDAlias, the corresponding module @@ -66,17 +75,72 @@ namespace edm { return doModulesWhoseProductsAreConsumedBy(moduleID, branchType); } - // This returns the declared consumes information for a module. - // Note the other functions above return a reference to an object - // that is held in memory throughout the job, while the following - // function returns a newly created object each time. We do not - // expect this to be called during a normal production job where + // The EventSetup modules in the returned vector are associated with + // the ED module identified by the moduleID argument. The other + // argument named transition could for example be beginRun. The + // returned EventSetup modules produce the data products consumed + // by the ED module during the specified transition. In cases + // where more than one module produces a product, only the preferred + // producer is included. There may be some consumed products without + // a producing module. + std::vector const& esModulesWhoseProductsAreConsumedBy( + unsigned int moduleID, Transition transition) const { + return doESModulesWhoseProductsAreConsumedBy(moduleID, transition); + } + + // These next two functions return the declared consumes information + // for a single EDModule (the one associated with the moduleID). + // ConsumesInfo objects for all transitions are in the same vector, + // although the elements contain a member that indicates the branch type + // for ED products and the transition associated with the consumes call + // for EventSetup products. + // Note the other functions above return a reference to + // an object that is held in memory throughout the job, while the + // following function returns a newly created object each time. We + // do not expect this to be called during a normal production job where // performance and memory are important. These objects are bigger // than just a pointer. std::vector consumesInfo(unsigned int moduleID) const { return doConsumesInfo(moduleID); } + std::vector eventSetupConsumesInfo(unsigned int moduleID) const { + return doEventSetupConsumesInfo(moduleID); + } unsigned int largestModuleID() const { return doLargestModuleID(); } + // The returned vector contains an entry for every EventSetup module. + std::vector const& allESProductResolverProviders() const { + return doAllESProductResolverProviders(); + } + + // The returned container indicates which EventSetup modules depend on which other + // EventSetup modules. Each entry in the outer vector corresponds to an entry + // in the vector returned by allESProductResolverProviders (same size and order). + // The inner vector will contain an entry for each EventSetup module that can produce + // a consumed data product. In the case of "may consumes", the producers for + // all the products that might be consumed are included. The inner vector + // includes producers for all transitions together in the same vector and + // has had duplicates removed. + std::vector> const& + esModulesWhoseProductsAreConsumedByESModule() const { + return doESModulesWhoseProductsAreConsumedByESModule(); + } + + // Returns a container of information for one ESProducer. The outer vector is + // indexed by the transitionID, which is a counter of setWhatProduced calls in + // the order they occur in the ESProducer constructor. The inner vector has + // elements that correspond to the individual calls to the consumes function. + // In an individual element, an empty module type indicates there is no + // ESProducer or ESSource to produce the consumed data. + // There is also a flag to indicate a module labeled mismatch. + // "May consumes" elements are different because there can be multiple entries + // for one "may consumes" function call, one for each available product that + // matches the EventSetupRecordKey type and product type. If there are no + // matches there is still one entry with a flag indicating there were + // no matches. + std::vector> eventSetupConsumesInfo(ESProducer const& esProducer) const { + return doEventSetupConsumesInfo(esProducer); + } + private: virtual std::vector const& doPaths() const = 0; virtual std::vector const& doEndPaths() const = 0; @@ -86,8 +150,16 @@ namespace edm { virtual std::vector const& doModulesOnEndPath(unsigned int endPathIndex) const = 0; virtual std::vector const& doModulesWhoseProductsAreConsumedBy( unsigned int moduleID, BranchType branchType) const = 0; + virtual std::vector const& doESModulesWhoseProductsAreConsumedBy( + unsigned int moduleID, Transition) const = 0; virtual std::vector doConsumesInfo(unsigned int moduleID) const = 0; + virtual std::vector doEventSetupConsumesInfo(unsigned int moduleID) const = 0; virtual unsigned int doLargestModuleID() const = 0; + virtual std::vector const& doAllESProductResolverProviders() const = 0; + virtual std::vector> const& + doESModulesWhoseProductsAreConsumedByESModule() const = 0; + virtual std::vector> doEventSetupConsumesInfo( + ESProducer const& esProducer) const = 0; }; } // namespace edm #endif diff --git a/FWCore/ServiceRegistry/src/ActivityRegistry.cc b/FWCore/ServiceRegistry/src/ActivityRegistry.cc index 38556bc64d6ad..28584ab938b2e 100644 --- a/FWCore/ServiceRegistry/src/ActivityRegistry.cc +++ b/FWCore/ServiceRegistry/src/ActivityRegistry.cc @@ -99,6 +99,7 @@ namespace edm { void ActivityRegistry::connectLocals(ActivityRegistry& iOther) { preBeginJobSignal_.connect(std::cref(iOther.preBeginJobSignal_)); + lookupInitializationCompleteSignal_.connect(std::cref(iOther.lookupInitializationCompleteSignal_)); preBeginStreamSignal_.connect(std::cref(iOther.preBeginStreamSignal_)); postBeginStreamSignal_.connect(std::cref(iOther.postBeginStreamSignal_)); @@ -278,6 +279,7 @@ namespace edm { copySlotsToFrom(postBeginJobSignal_, iOther.postBeginJobSignal_); copySlotsToFromReverse(preEndJobSignal_, iOther.preEndJobSignal_); copySlotsToFromReverse(postEndJobSignal_, iOther.postEndJobSignal_); + copySlotsToFrom(lookupInitializationCompleteSignal_, iOther.lookupInitializationCompleteSignal_); copySlotsToFromReverse(jobFailureSignal_, iOther.jobFailureSignal_); diff --git a/FWCore/ServiceRegistry/src/EventSetupConsumesInfo.cc b/FWCore/ServiceRegistry/src/EventSetupConsumesInfo.cc new file mode 100644 index 0000000000000..b54e14d160704 --- /dev/null +++ b/FWCore/ServiceRegistry/src/EventSetupConsumesInfo.cc @@ -0,0 +1,24 @@ +#include "FWCore/ServiceRegistry/interface/EventSetupConsumesInfo.h" + +namespace edm { + + EventSetupConsumesInfo::EventSetupConsumesInfo() + : transitionOfConsumer_(0), + transitionOfProducer_(0), + isSource_(false), + isLooper_(false), + moduleLabelMismatch_(false), + mayConsumes_(false), + mayConsumesFirstEntry_(false), + mayConsumesNoProducts_(false) {} + + std::string_view EventSetupConsumesInfo::moduleBaseType() const { + if (isLooper_) { + return "ESProducerLooper"; + } else if (isSource_) { + return "ESSource"; + } + return "ESProducer"; + } + +} // namespace edm diff --git a/FWCore/Services/plugins/Tracer.cc b/FWCore/Services/plugins/Tracer.cc index 4f8756dbc2438..1f20e6a4eff4d 100644 --- a/FWCore/Services/plugins/Tracer.cc +++ b/FWCore/Services/plugins/Tracer.cc @@ -12,6 +12,8 @@ #include "FWCore/Framework/interface/ComponentDescription.h" #include "FWCore/Framework/interface/DataKey.h" +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/Framework/interface/ESProductResolverProvider.h" #include "FWCore/Framework/interface/EventSetupRecordKey.h" #include "FWCore/Framework/interface/IOVSyncValue.h" @@ -67,6 +69,7 @@ namespace edm { void postBeginJob(); void preEndJob(); void postEndJob(); + void lookupInitializationComplete(PathsAndConsumesOfModulesBase const&, ProcessContext const&); void preBeginStream(StreamContext const&); void postBeginStream(StreamContext const&); @@ -226,6 +229,26 @@ namespace edm { void preESModuleAcquire(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&); void postESModuleAcquire(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&); + void printPaths(LogAbsolute& out, PathsAndConsumesOfModulesBase const& pathsAndConsumes) const; + + void printEDModulesWithDependentModules(LogAbsolute& out, + std::vector const& allModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const; + + void printESModulesWithDependentModules( + LogAbsolute& out, + std::vector const& allEventSetupModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const; + + void printEDModulesWithConsumes(LogAbsolute& out, + std::vector const& allModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const; + + void printESModulesWithConsumes( + LogAbsolute& out, + std::vector const& allEventSetupModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const; + private: std::string indention_; std::set dumpContextForLabels_; @@ -277,6 +300,7 @@ Tracer::Tracer(ParameterSet const& iPS, ActivityRegistry& iRegistry) iRegistry.watchPostBeginJob(this, &Tracer::postBeginJob); iRegistry.watchPreEndJob(this, &Tracer::preEndJob); iRegistry.watchPostEndJob(this, &Tracer::postEndJob); + iRegistry.watchLookupInitializationComplete(this, &Tracer::lookupInitializationComplete); iRegistry.watchPreBeginStream(this, &Tracer::preBeginStream); iRegistry.watchPostBeginStream(this, &Tracer::postBeginStream); @@ -525,104 +549,306 @@ void Tracer::preallocate(service::SystemBounds const& bounds) { void Tracer::preBeginJob(PathsAndConsumesOfModulesBase const& pathsAndConsumes, ProcessContext const& pc) { LogAbsolute out("Tracer"); out << TimeStamper(printTimestamps_) << indention_ << " starting: begin job"; +} + +void Tracer::postBeginJob() { + LogAbsolute out("Tracer"); + out << TimeStamper(printTimestamps_) << indention_ << " finished: begin job"; +} + +void Tracer::preEndJob() { + LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " starting: end job"; +} + +void Tracer::postEndJob() { + LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: end job"; +} + +void Tracer::lookupInitializationComplete(PathsAndConsumesOfModulesBase const& pathsAndConsumes, + ProcessContext const& pc) { if (dumpPathsAndConsumes_) { + LogAbsolute out("Tracer"); + out << TimeStamper(printTimestamps_) << indention_ << " lookupInitializationComplete"; out << "\n" << "Process name = " << pc.processName() << "\n"; - out << "paths:\n"; - std::vector const& paths = pathsAndConsumes.paths(); - for (auto const& path : paths) { - out << " " << path << "\n"; + std::vector const& allModules = pathsAndConsumes.allModules(); + std::vector const& allEventSetupModules = + pathsAndConsumes.allESProductResolverProviders(); + + printPaths(out, pathsAndConsumes); + printEDModulesWithDependentModules(out, allModules, pathsAndConsumes); + printESModulesWithDependentModules(out, allEventSetupModules, pathsAndConsumes); + printEDModulesWithConsumes(out, allModules, pathsAndConsumes); + printESModulesWithConsumes(out, allEventSetupModules, pathsAndConsumes); + } +} + +void Tracer::printPaths(LogAbsolute& out, PathsAndConsumesOfModulesBase const& pathsAndConsumes) const { + out << "paths:\n"; + std::vector const& paths = pathsAndConsumes.paths(); + if (paths.empty()) { + out << " --- there are no paths ---\n"; + } + for (auto const& path : paths) { + out << " " << path << "\n"; + } + out << "end paths:\n"; + std::vector const& endpaths = pathsAndConsumes.endPaths(); + if (endpaths.empty()) { + out << " --- there are no endpaths ---\n"; + } + for (auto const& endpath : endpaths) { + out << " " << endpath << "\n"; + } + for (unsigned int j = 0; j < paths.size(); ++j) { + std::vector const& modulesOnPath = pathsAndConsumes.modulesOnPath(j); + out << "modules on path " << paths.at(j) << ":\n"; + if (modulesOnPath.empty()) { + out << " --- there are no modules on this path ---\n"; + } + for (auto const& desc : modulesOnPath) { + out << " " << desc->moduleLabel() << "\n"; + } + } + for (unsigned int j = 0; j < endpaths.size(); ++j) { + std::vector const& modulesOnEndPath = pathsAndConsumes.modulesOnEndPath(j); + out << "modules on endpath " << endpaths.at(j) << ":\n"; + if (modulesOnEndPath.empty()) { + out << " --- there are no modules on this endpath ---\n"; + } + for (auto const& desc : modulesOnEndPath) { + out << " " << desc->moduleLabel() << "\n"; } - out << "end paths:\n"; - std::vector const& endpaths = pathsAndConsumes.endPaths(); - for (auto const& endpath : endpaths) { - out << " " << endpath << "\n"; + } +} + +void Tracer::printEDModulesWithDependentModules(LogAbsolute& out, + std::vector const& allModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const { + out << "All modules and modules in the current process whose products they consume:\n" + "(This does not include modules from previous processes or the source)\n" + "(Exclusively considers consumed Event and EventSetup products, not Run, Lumi, or ProcessBlock products)\n"; + if (allModules.empty()) { + out << " --- there are no modules ---\n"; + } + for (auto const& module : allModules) { + out << " " << module->moduleName() << "/'" << module->moduleLabel() << "'\n"; + unsigned int moduleID = module->id(); + if (pathsAndConsumes.moduleDescription(moduleID) != module) { + throw cms::Exception("TestFailure") + << "Tracer::printEDModulesWithDependentModules, moduleDescription returns incorrect value"; } - for (unsigned int j = 0; j < paths.size(); ++j) { - std::vector const& modulesOnPath = pathsAndConsumes.modulesOnPath(j); - out << "modules on path " << paths.at(j) << ":\n"; - for (auto const& desc : modulesOnPath) { - out << " " << desc->moduleLabel() << "\n"; + std::vector const& modulesWhoseProductsAreConsumedBy = + pathsAndConsumes.modulesWhoseProductsAreConsumedBy(moduleID); + if (!modulesWhoseProductsAreConsumedBy.empty()) { + out << " consumes products from these modules:\n"; + for (auto const& producingModule : modulesWhoseProductsAreConsumedBy) { + out << " " << producingModule->moduleName() << "/'" << producingModule->moduleLabel() << "'\n"; } } - for (unsigned int j = 0; j < endpaths.size(); ++j) { - std::vector const& modulesOnEndPath = pathsAndConsumes.modulesOnEndPath(j); - out << "modules on end path " << endpaths.at(j) << ":\n"; - for (auto const& desc : modulesOnEndPath) { - out << " " << desc->moduleLabel() << "\n"; + + for (unsigned int i = 0; i < static_cast(Transition::NumberOfEventSetupTransitions); ++i) { + Transition transition = static_cast(i); + std::vector const& esModulesWhoseProductsAreConsumedBy = + pathsAndConsumes.esModulesWhoseProductsAreConsumedBy(moduleID, transition); + if (!esModulesWhoseProductsAreConsumedBy.empty()) { + const char* transitionString = "Event"; + if (transition == Transition::BeginLuminosityBlock) { + transitionString = "BeginLuminosityBlock"; + } else if (transition == Transition::EndLuminosityBlock) { + transitionString = "EndLuminosityBlock"; + } else if (transition == Transition::BeginRun) { + transitionString = "BeginRun"; + } else if (transition == Transition::EndRun) { + transitionString = "EndRun"; + } + out << " consumes products during " << transitionString << " from these EventSetup modules:\n"; + for (auto const& component : esModulesWhoseProductsAreConsumedBy) { + std::string moduleBaseType("ESProducer"); + if (component->isSource_) { + moduleBaseType = "ESSource"; + } else if (component->isLooper_) { + moduleBaseType = "Looper producing EventSetup data"; + } + out << " " << component->type_ << "/'" << component->label_ << "' " << moduleBaseType << "\n"; + } } } - std::vector const& allModules = pathsAndConsumes.allModules(); - out << "All modules and modules in the current process whose products they consume:\n"; - out << "(This does not include modules from previous processes or the source)\n"; - out << "(Exclusively considers Event products, not Run, Lumi, or ProcessBlock products)\n"; - for (auto const& module : allModules) { - out << " " << module->moduleName() << "/\'" << module->moduleLabel() << "\'"; - unsigned int moduleID = module->id(); - if (pathsAndConsumes.moduleDescription(moduleID) != module) { - throw cms::Exception("TestFailure") << "Tracer::preBeginJob, moduleDescription returns incorrect value"; + } +} + +void Tracer::printESModulesWithDependentModules( + LogAbsolute& out, + std::vector const& allEventSetupModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const { + out << "All EventSetup modules:\n"; + std::vector> const& esModules = + pathsAndConsumes.esModulesWhoseProductsAreConsumedByESModule(); + auto it = esModules.begin(); + if (allEventSetupModules.empty()) { + out << " --- there are no EventSetup modules ---\n"; + } + for (auto const& provider : allEventSetupModules) { + eventsetup::ComponentDescription const& componentDescription = provider->description(); + out << " " << componentDescription.type_ << "/'" + << (componentDescription.label_.empty() ? componentDescription.type_ : componentDescription.label_) << "'\n"; + if (!it->empty()) { + out << " consumes products from these EventSetup modules:\n"; + for (auto const& consumedComponentDescription : *it) { + out << " " << consumedComponentDescription->type_ << "/'" + << (consumedComponentDescription->label_.empty() ? consumedComponentDescription->type_ + : consumedComponentDescription->label_) + << "'\n"; } - std::vector const& modulesWhoseProductsAreConsumedBy = - pathsAndConsumes.modulesWhoseProductsAreConsumedBy(moduleID); - if (!modulesWhoseProductsAreConsumedBy.empty()) { - out << " consumes products from these modules:\n"; - for (auto const& producingModule : modulesWhoseProductsAreConsumedBy) { - out << " " << producingModule->moduleName() << "/\'" << producingModule->moduleLabel() << "\'\n"; + } + ++it; + } +} + +void Tracer::printEDModulesWithConsumes(LogAbsolute& out, + std::vector const& allModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const { + out << "All modules (listed by class and label) and all their consumed products.\n" + "Consumed products are listed by type, label, instance, process.\n" + "For products not in the event, 'processBlock', 'run' or 'lumi' is added to indicate the TTree they " + "are from.\n" + "For products that are declared with mayConsume, 'may consume' is added.\n" + "For products consumed for Views, 'element type' is added\n" + "For products only read from previous processes, 'skip current process' is added\n" + "Consumed EventSetup products are listed by record type, data type, product label,\n" + "transition of request, whether module is ESSource, ESProducer, or ESProducerLooper,\n" + "and the module type and module label of the EventSetup module producing the product.\n" + "Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0).\n" + "If the requested module label was specified, then there is a remark in parentheses\n" + "stating whether it matched the actual module label of the producer.\n"; + if (allModules.empty()) { + out << " --- there are no modules ---\n"; + } + for (auto const* module : allModules) { + out << " " << module->moduleName() << "/'" << module->moduleLabel() << "'\n"; + std::vector consumesInfo = pathsAndConsumes.consumesInfo(module->id()); + if (!consumesInfo.empty()) { + out << " consumes:\n"; + for (auto const& info : consumesInfo) { + out << " " << info.type() << " '" << info.label() << "' '" << info.instance(); + out << "' '" << info.process() << "'"; + if (info.branchType() == InLumi) { + out << ", lumi"; + } else if (info.branchType() == InRun) { + out << ", run"; + } else if (info.branchType() == InProcess) { + out << ", processBlock"; + } + if (!info.alwaysGets()) { + out << ", may consume"; + } + if (info.kindOfType() == ELEMENT_TYPE) { + out << ", element type"; + } + if (info.skipCurrentProcess()) { + out << ", skip current process"; } - } else { out << "\n"; } } - out << "All modules (listed by class and label) and all their consumed products.\n"; - out << "Consumed products are listed by type, label, instance, process.\n"; - out << "For products not in the event, \'processBlock\', \'run\' or \'lumi\' is added to indicate the TTree they " - "are from.\n"; - out << "For products that are declared with mayConsume, \'may consume\' is added.\n"; - out << "For products consumed for Views, \'element type\' is added\n"; - out << "For products only read from previous processes, \'skip current process\' is added\n"; - for (auto const* module : allModules) { - out << " " << module->moduleName() << "/\'" << module->moduleLabel() << "\'"; - std::vector consumesInfo = pathsAndConsumes.consumesInfo(module->id()); - if (!consumesInfo.empty()) { - out << " consumes:\n"; - for (auto const& info : consumesInfo) { - out << " " << info.type() << " \'" << info.label() << "\' \'" << info.instance(); - out << "\' \'" << info.process() << "\'"; - if (info.branchType() == InLumi) { - out << ", lumi"; - } else if (info.branchType() == InRun) { - out << ", run"; - } else if (info.branchType() == InProcess) { - out << ", processBlock"; - } - if (!info.alwaysGets()) { - out << ", may consume"; - } - if (info.kindOfType() == ELEMENT_TYPE) { - out << ", element type"; - } - if (info.skipCurrentProcess()) { - out << ", skip current process"; + std::vector eventSetupConsumesInfo = pathsAndConsumes.eventSetupConsumesInfo(module->id()); + if (!eventSetupConsumesInfo.empty()) { + out << " consumes from EventSetup:\n"; + for (auto const& info : eventSetupConsumesInfo) { + out << " " << info.eventSetupRecordType_ << " " << info.productType_ << " '" << info.productLabel_ << "'"; + const char* transitionString = "Event"; + Transition transition = static_cast(info.transitionOfConsumer_); + if (transition == Transition::BeginLuminosityBlock) { + transitionString = "BeginLuminosityBlock"; + } else if (transition == Transition::EndLuminosityBlock) { + transitionString = "EndLuminosityBlock"; + } else if (transition == Transition::BeginRun) { + transitionString = "BeginRun"; + } else if (transition == Transition::EndRun) { + transitionString = "EndRun"; + } + out << " " << transitionString; + if (info.moduleLabelMismatch_) { + out << ", EventSetup module label mismatch, requested '" << info.requestedModuleLabel_ << "'"; + } else if (info.moduleType_.empty()) { + out << ", No EventSetup module configured to produce this data."; + } else { + out << " " << info.moduleBaseType() << " " << info.moduleType_ << "/'" << info.moduleLabel_ << "' " + << info.transitionOfProducer_; + if (!info.requestedModuleLabel_.empty()) { + assert(info.requestedModuleLabel_ == info.moduleLabel_); + out << " (module label matches requested label)"; } - out << "\n"; } - } else { out << "\n"; } } } } -void Tracer::postBeginJob() { - LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: begin job"; -} - -void Tracer::preEndJob() { - LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " starting: end job"; -} - -void Tracer::postEndJob() { - LogAbsolute("Tracer") << TimeStamper(printTimestamps_) << indention_ << " finished: end job"; +void Tracer::printESModulesWithConsumes( + LogAbsolute& out, + std::vector const& allEventSetupModules, + PathsAndConsumesOfModulesBase const& pathsAndConsumes) const { + out << "All EventSetup modules (listed by class and label) and all their consumed products.\n" + "These modules can only consume EventSetup products. These are listed by record type,\n" + "data type, product label, whether the module is ESSource, ESProducer, or ESProducerLooper,\n" + "and the module type and module label of the EventSetup module producing the product.\n" + "Next is the transitionID (counts setWhatProduced calls in ESProducers, otherwise 0).\n" + "If the requested module label was specified, then there is a remark in parentheses\n" + "stating whether it matched the actual module label of the producer.\n"; + if (allEventSetupModules.empty()) { + out << " --- there are no EventSetup modules ---\n"; + } + for (auto const& provider : allEventSetupModules) { + eventsetup::ComponentDescription const& componentDescription = provider->description(); + out << " " << componentDescription.type_ << "/'" + << (componentDescription.label_.empty() ? componentDescription.type_ : componentDescription.label_) << "'\n"; + ESProducer const* esProducer = dynamic_cast(provider); + if (esProducer) { + std::vector> eventSetupConsumesInfos = + pathsAndConsumes.eventSetupConsumesInfo(*esProducer); + unsigned int transition = 0; + for (auto const& infosForOneTransition : eventSetupConsumesInfos) { + out << " Consumed products for consumer transition: " << transition << "\n"; + if (infosForOneTransition.empty()) { + out << " --- no products consumed ---\n"; + } + for (auto const& info : infosForOneTransition) { + if (info.mayConsumes_) { + if (info.mayConsumesFirstEntry_) { + out << " " << info.eventSetupRecordType_ << " " << info.productType_ << "\n" + << " May Consumes, available products that might be consumed (they match record type and " + "product type):\n"; + } + if (info.mayConsumesNoProducts_) { + out << " --- no available products that match ---\n"; + } else { + out << " '" << info.productLabel_ << "' " << info.moduleBaseType() << " " << info.moduleType_ + << "/'" << info.moduleLabel_ << "' " << info.transitionOfProducer_ << "\n"; + } + } else { + out << " " << info.eventSetupRecordType_ << " " << info.productType_ << " '" << info.productLabel_ + << "'"; + if (info.moduleLabelMismatch_) { + out << ", EventSetup module label mismatch, requested '" << info.requestedModuleLabel_ << "'"; + } else if (info.moduleType_.empty()) { + out << ", No EventSetup module configured to produce this data."; + } else { + out << " " << info.moduleBaseType() << " " << info.moduleType_ << "/'" << info.moduleLabel_ << "' " + << info.transitionOfProducer_; + if (!info.requestedModuleLabel_.empty()) { + assert(info.requestedModuleLabel_ == info.moduleLabel_); + out << " (module label matches requested label)"; + } + } + out << "\n"; + } + } + ++transition; + } + } + } } void Tracer::preBeginStream(StreamContext const& sc) {