diff --git a/FWCore/Framework/interface/EDAnalyzer.h b/FWCore/Framework/interface/EDAnalyzer.h index 423dd569c827d..d254e9e0919a4 100644 --- a/FWCore/Framework/interface/EDAnalyzer.h +++ b/FWCore/Framework/interface/EDAnalyzer.h @@ -8,6 +8,7 @@ #include "FWCore/Framework/interface/SharedResourcesAcquirer.h" #include "FWCore/Concurrency/interface/SerialTaskQueue.h" #include "FWCore/Concurrency/interface/WaitingTaskHolder.h" +#include "FWCore/Utilities/interface/deprecated_macro.h" #include @@ -25,7 +26,7 @@ namespace edm { class ModuleHolderT; } - class EDAnalyzer : public EDConsumerBase { + class CMS_DEPRECATED EDAnalyzer : public EDConsumerBase { public: template friend class maker::ModuleHolderT; diff --git a/FWCore/Framework/interface/EDFilter.h b/FWCore/Framework/interface/EDFilter.h index 1a82c85252dd8..552c8613201d2 100644 --- a/FWCore/Framework/interface/EDFilter.h +++ b/FWCore/Framework/interface/EDFilter.h @@ -19,6 +19,7 @@ These products should be informational products about the filter decision. #include "FWCore/Concurrency/interface/WaitingTaskHolder.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "DataFormats/Provenance/interface/ModuleDescription.h" +#include "FWCore/Utilities/interface/deprecated_macro.h" #include #include @@ -35,7 +36,7 @@ namespace edm { class ActivityRegistry; class ThinnedAssociationsHelper; - class EDFilter : public ProducerBase, public EDConsumerBase { + class CMS_DEPRECATED EDFilter : public ProducerBase, public EDConsumerBase { public: template friend class maker::ModuleHolderT; diff --git a/FWCore/Framework/interface/EDProducer.h b/FWCore/Framework/interface/EDProducer.h index ed0778b9a522b..ae029cf6c80b9 100644 --- a/FWCore/Framework/interface/EDProducer.h +++ b/FWCore/Framework/interface/EDProducer.h @@ -16,6 +16,7 @@ EDProducts into an Event. #include "DataFormats/Provenance/interface/ModuleDescription.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/Concurrency/interface/WaitingTaskHolder.h" +#include "FWCore/Utilities/interface/deprecated_macro.h" #include #include @@ -32,7 +33,7 @@ namespace edm { class ModuleHolderT; } - class EDProducer : public ProducerBase, public EDConsumerBase { + class CMS_DEPRECATED EDProducer : public ProducerBase, public EDConsumerBase { public: template friend class maker::ModuleHolderT; diff --git a/FWCore/Framework/interface/EventSetup.h b/FWCore/Framework/interface/EventSetup.h index b0a1eb656f398..7b2e4b902e7b4 100644 --- a/FWCore/Framework/interface/EventSetup.h +++ b/FWCore/Framework/interface/EventSetup.h @@ -38,6 +38,7 @@ #include "FWCore/Framework/interface/data_default_record_trait.h" #include "FWCore/Utilities/interface/Transition.h" #include "FWCore/Utilities/interface/ESIndices.h" +#include "FWCore/Utilities/interface/deprecated_macro.h" // forward declarations @@ -124,18 +125,19 @@ namespace edm { /** can directly access data if data_default_record_trait<> is defined for this data type **/ template - bool getData(T& iHolder) const { - return getData(std::string{}, iHolder); + CMS_DEPRECATED bool getData(T& iHolder) const { + auto const& rec = this->get>(); + return rec.get(std::string{}, iHolder); } template - bool getData(const std::string& iLabel, T& iHolder) const { + CMS_DEPRECATED bool getData(const std::string& iLabel, T& iHolder) const { auto const& rec = this->get>(); return rec.get(iLabel, iHolder); } template - bool getData(const ESInputTag& iTag, T& iHolder) const { + CMS_DEPRECATED bool getData(const ESInputTag& iTag, T& iHolder) const { auto const& rec = this->get>(); return rec.get(iTag, iHolder); } diff --git a/FWCore/Framework/interface/EventSetupRecord.h b/FWCore/Framework/interface/EventSetupRecord.h index 3e3ef03952369..d2153b4455aa2 100644 --- a/FWCore/Framework/interface/EventSetupRecord.h +++ b/FWCore/Framework/interface/EventSetupRecord.h @@ -49,6 +49,7 @@ #include "FWCore/Utilities/interface/ESInputTag.h" #include "FWCore/Utilities/interface/ESIndices.h" #include "FWCore/Utilities/interface/Likely.h" +#include "FWCore/Utilities/interface/deprecated_macro.h" // system include files #include @@ -108,37 +109,22 @@ namespace edm { } template - bool get(HolderT& iHolder) const { - return get("", iHolder); + CMS_DEPRECATED bool get(HolderT& iHolder) const { + return deprecated_get("", iHolder); } template - bool get(char const* iName, HolderT& iHolder) const { - if UNLIKELY (requireTokens_) { - throwCalledGetWithoutToken(heterocontainer::className(), iName); - } - typename HolderT::value_type const* value = nullptr; - ComponentDescription const* desc = nullptr; - std::shared_ptr whyFailedFactory; - impl_->getImplementation( - value, iName, desc, iHolder.transientAccessOnly, whyFailedFactory, *context_, eventSetupImpl_); - - if (value) { - iHolder = HolderT(value, desc); - return true; - } else { - iHolder = HolderT(std::move(whyFailedFactory)); - return false; - } + CMS_DEPRECATED bool get(char const* iName, HolderT& iHolder) const { + return deprecated_get(iName, iHolder); } template - bool get(std::string const& iName, HolderT& iHolder) const { - return get(iName.c_str(), iHolder); + CMS_DEPRECATED bool get(std::string const& iName, HolderT& iHolder) const { + return deprecated_get(iName.c_str(), iHolder); } template - bool get(ESInputTag const& iTag, HolderT& iHolder) const { + CMS_DEPRECATED bool get(ESInputTag const& iTag, HolderT& iHolder) const { if UNLIKELY (requireTokens_) { throwCalledGetWithoutToken(heterocontainer::className(), iTag.data().c_str()); } @@ -258,6 +244,26 @@ namespace edm { bool requireTokens() const { return requireTokens_; } private: + template + bool deprecated_get(char const* iName, HolderT& iHolder) const { + if UNLIKELY (requireTokens_) { + throwCalledGetWithoutToken(heterocontainer::className(), iName); + } + typename HolderT::value_type const* value = nullptr; + ComponentDescription const* desc = nullptr; + std::shared_ptr whyFailedFactory; + impl_->getImplementation( + value, iName, desc, iHolder.transientAccessOnly, whyFailedFactory, *context_, eventSetupImpl_); + + if (value) { + iHolder = HolderT(value, desc); + return true; + } else { + iHolder = HolderT(std::move(whyFailedFactory)); + return false; + } + } + template