diff --git a/DataFormats/Common/interface/ProductData.h b/DataFormats/Common/interface/ProductData.h index f9489df5c515a..0518b0f648acb 100644 --- a/DataFormats/Common/interface/ProductData.h +++ b/DataFormats/Common/interface/ProductData.h @@ -9,11 +9,11 @@ is the storage unit of such information. ----------------------------------------------------------------------*/ #include "DataFormats/Provenance/interface/Provenance.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" #include namespace edm { - class ProductDescription; class MergeableRunProductMetadataBase; class WrapperBase; diff --git a/DataFormats/Common/interface/setIsMergeable.h b/DataFormats/Common/interface/setIsMergeable.h index 29a29555dc6c5..afb917ea04778 100644 --- a/DataFormats/Common/interface/setIsMergeable.h +++ b/DataFormats/Common/interface/setIsMergeable.h @@ -29,11 +29,9 @@ // Original Author: W. David Dagenhart // Created: 21 June 2018 // +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" namespace edm { - - class ProductDescription; - void setIsMergeable(ProductDescription&); } // namespace edm diff --git a/DataFormats/FWLite/interface/ChainEvent.h b/DataFormats/FWLite/interface/ChainEvent.h index 1c8469a82b1f6..a498645f3d299 100644 --- a/DataFormats/FWLite/interface/ChainEvent.h +++ b/DataFormats/FWLite/interface/ChainEvent.h @@ -26,6 +26,7 @@ // user include files #include "DataFormats/FWLite/interface/Event.h" #include "DataFormats/FWLite/interface/EventBase.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/propagate_const.h" // forward declarations @@ -33,7 +34,6 @@ namespace edm { class WrapperBase; class ProductRegistry; class ProcessHistory; - class ProductDescription; class EDProductGetter; class EventAux; class TriggerResults; diff --git a/DataFormats/FWLite/interface/DataGetterHelper.h b/DataFormats/FWLite/interface/DataGetterHelper.h index 5f091cfbd24a6..0762369f6413a 100644 --- a/DataFormats/FWLite/interface/DataGetterHelper.h +++ b/DataFormats/FWLite/interface/DataGetterHelper.h @@ -20,6 +20,7 @@ // user include files #include "DataFormats/Common/interface/EDProductGetter.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "DataFormats/FWLite/interface/HistoryGetterBase.h" #include "DataFormats/FWLite/interface/InternalDataKey.h" #include "FWCore/FWLite/interface/BranchMapReader.h" @@ -41,7 +42,6 @@ class TTreeCache; class TTree; namespace edm { - class ProductDescription; class BranchID; class ObjectWithDict; class ProductID; diff --git a/DataFormats/FWLite/interface/Event.h b/DataFormats/FWLite/interface/Event.h index ea42314df72c4..5d05a29b5beec 100644 --- a/DataFormats/FWLite/interface/Event.h +++ b/DataFormats/FWLite/interface/Event.h @@ -63,13 +63,13 @@ #include "DataFormats/Provenance/interface/EventProcessHistoryID.h" #include "DataFormats/Provenance/interface/EventAuxiliary.h" #include "DataFormats/Provenance/interface/EventID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" // forward declarations namespace edm { class WrapperBase; class ProductRegistry; - class ProductDescription; class EDProductGetter; class EventAux; class Timestamp; diff --git a/DataFormats/FWLite/interface/LuminosityBlock.h b/DataFormats/FWLite/interface/LuminosityBlock.h index bd17489dd07db..e93b0de2f34f9 100644 --- a/DataFormats/FWLite/interface/LuminosityBlock.h +++ b/DataFormats/FWLite/interface/LuminosityBlock.h @@ -33,13 +33,13 @@ #include "DataFormats/FWLite/interface/EntryFinder.h" #include "DataFormats/Provenance/interface/ProcessHistoryRegistry.h" #include "DataFormats/Provenance/interface/LuminosityBlockAuxiliary.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" // forward declarations namespace edm { class WrapperBase; class ProductRegistry; - class ProductDescription; class EDProductGetter; class LuminosityBlockAux; class Timestamp; diff --git a/DataFormats/FWLite/interface/MultiChainEvent.h b/DataFormats/FWLite/interface/MultiChainEvent.h index a94d72971a0c4..b92eab92ace3e 100644 --- a/DataFormats/FWLite/interface/MultiChainEvent.h +++ b/DataFormats/FWLite/interface/MultiChainEvent.h @@ -26,6 +26,7 @@ // user include files #include "DataFormats/FWLite/interface/EventBase.h" #include "DataFormats/FWLite/interface/ChainEvent.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/propagate_const.h" // forward declarations @@ -33,7 +34,6 @@ namespace edm { class WrapperBase; class ProductRegistry; class ProcessHistory; - class ProductDescription; class EDProductGetter; class EventAux; class TriggerResults; diff --git a/DataFormats/FWLite/interface/Run.h b/DataFormats/FWLite/interface/Run.h index f1fa42f8a5d20..1d93c1fdd9de5 100644 --- a/DataFormats/FWLite/interface/Run.h +++ b/DataFormats/FWLite/interface/Run.h @@ -33,6 +33,7 @@ #include "DataFormats/Provenance/interface/ProcessHistoryRegistry.h" #include "DataFormats/Provenance/interface/RunAuxiliary.h" #include "DataFormats/Provenance/interface/RunID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/FWLite/interface/BranchMapReader.h" #include "DataFormats/FWLite/interface/DataGetterHelper.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" @@ -41,7 +42,6 @@ namespace edm { class WrapperBase; class ProductRegistry; - class ProductDescription; class EDProductGetter; class RunAux; class Timestamp; diff --git a/DataFormats/FWLite/src/DataGetterHelper.cc b/DataFormats/FWLite/src/DataGetterHelper.cc index 1f73998dc9acc..c2015868b44bc 100644 --- a/DataFormats/FWLite/src/DataGetterHelper.cc +++ b/DataFormats/FWLite/src/DataGetterHelper.cc @@ -338,8 +338,8 @@ namespace fwlite { } bool DataGetterHelper::getByProductDescription(edm::ProductDescription const& bDesc, - Long_t eventEntry, - KeyToDataMap::iterator& itData) const { + Long_t eventEntry, + KeyToDataMap::iterator& itData) const { if (!bDesc.branchID().isValid()) { return false; } diff --git a/DataFormats/FWLite/src/EventBase.cc b/DataFormats/FWLite/src/EventBase.cc index e72610560abcb..dddda2d27d7c4 100644 --- a/DataFormats/FWLite/src/EventBase.cc +++ b/DataFormats/FWLite/src/EventBase.cc @@ -26,7 +26,8 @@ static const edm::ProductID s_id; static edm::ProductDescription const s_branch = edm::ProductDescription(edm::ProductDescription()); -static const edm::Provenance s_prov(std::shared_ptr(&s_branch, edm::do_nothing_deleter()), +static const edm::Provenance s_prov(std::shared_ptr(&s_branch, + edm::do_nothing_deleter()), s_id); namespace fwlite { diff --git a/DataFormats/FWLite/src/LuminosityBlockBase.cc b/DataFormats/FWLite/src/LuminosityBlockBase.cc index 6b63ff7d32476..ed1c81e95471b 100644 --- a/DataFormats/FWLite/src/LuminosityBlockBase.cc +++ b/DataFormats/FWLite/src/LuminosityBlockBase.cc @@ -28,7 +28,8 @@ static const edm::ProductID s_id; static edm::ProductDescription const s_branch = edm::ProductDescription(edm::ProductDescription()); -static const edm::Provenance s_prov(std::shared_ptr(&s_branch, edm::do_nothing_deleter()), +static const edm::Provenance s_prov(std::shared_ptr(&s_branch, + edm::do_nothing_deleter()), s_id); namespace fwlite { diff --git a/DataFormats/FWLite/src/RunBase.cc b/DataFormats/FWLite/src/RunBase.cc index 5cbd7d51655e6..421ee52f4aad0 100644 --- a/DataFormats/FWLite/src/RunBase.cc +++ b/DataFormats/FWLite/src/RunBase.cc @@ -28,7 +28,8 @@ static const edm::ProductID s_id; static edm::ProductDescription const s_branch = edm::ProductDescription(edm::ProductDescription()); -static const edm::Provenance s_prov(std::shared_ptr(&s_branch, edm::do_nothing_deleter()), +static const edm::Provenance s_prov(std::shared_ptr(&s_branch, + edm::do_nothing_deleter()), s_id); namespace fwlite { diff --git a/DataFormats/Provenance/interface/BranchChildren.h b/DataFormats/Provenance/interface/BranchChildren.h index 0d223f9941f4f..d3389ea219f65 100644 --- a/DataFormats/Provenance/interface/BranchChildren.h +++ b/DataFormats/Provenance/interface/BranchChildren.h @@ -10,11 +10,10 @@ BranchChildren: Dependency information between branches. #include #include #include "DataFormats/Provenance/interface/BranchID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" namespace edm { - class ProductDescription; - class BranchChildren { private: typedef std::set BranchIDSet; diff --git a/DataFormats/Provenance/interface/BranchDescription.h b/DataFormats/Provenance/interface/BranchDescription.h index 81793d8551e7a..cc111d2c8d344 100644 --- a/DataFormats/Provenance/interface/BranchDescription.h +++ b/DataFormats/Provenance/interface/BranchDescription.h @@ -20,6 +20,9 @@ This description also applies to every product instance on the branch. #include #include +#if !defined(DataFormats_Provenance_ProductDescription_h) +#error The name BranchDescription is deprecated, please use ProductDescription instead. +#endif /* BranchDescription diff --git a/DataFormats/Provenance/interface/BranchKey.h b/DataFormats/Provenance/interface/BranchKey.h index 8e560c428d49c..31ce72a1528a8 100644 --- a/DataFormats/Provenance/interface/BranchKey.h +++ b/DataFormats/Provenance/interface/BranchKey.h @@ -11,8 +11,9 @@ is determined entirely from the BranchKey. #include #include +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" + namespace edm { - class ProductDescription; class BranchKey { public: diff --git a/DataFormats/Provenance/interface/ProductDescription.h b/DataFormats/Provenance/interface/ProductDescription.h new file mode 100644 index 0000000000000..1b751104f7631 --- /dev/null +++ b/DataFormats/Provenance/interface/ProductDescription.h @@ -0,0 +1,9 @@ +#if !defined(DataFormats_Provenance_ProductDescription_h) +#define DataFormats_Provenance_ProductDescription_h +#include "DataFormats/Provenance/interface/BranchDescription.h" + +namespace edm { + using ProductDescription = BranchDescription; +} + +#endif diff --git a/DataFormats/Provenance/interface/ProductDescriptionFwd.h b/DataFormats/Provenance/interface/ProductDescriptionFwd.h new file mode 100644 index 0000000000000..7a30a84522803 --- /dev/null +++ b/DataFormats/Provenance/interface/ProductDescriptionFwd.h @@ -0,0 +1,9 @@ +#if !defined(DataFormats_Provenance_ProductDescriptionFwd_h) +#define DataFormats_Provenance_ProductDescriptionFwd_h + +namespace edm { + class BranchDescription; + using ProductDescription = BranchDescription; +} // namespace edm + +#endif diff --git a/DataFormats/Provenance/interface/Provenance.h b/DataFormats/Provenance/interface/Provenance.h index 26f173921d27a..a7a3d0385532b 100644 --- a/DataFormats/Provenance/interface/Provenance.h +++ b/DataFormats/Provenance/interface/Provenance.h @@ -83,7 +83,9 @@ namespace edm { mergeableRunProductMetadata_ = mrpm; } - void setProductDescription(std::shared_ptr const& p) { stable().setProductDescription(p); } + void setProductDescription(std::shared_ptr const& p) { + stable().setProductDescription(p); + } void swap(Provenance&); diff --git a/DataFormats/Provenance/interface/ProvenanceFwd.h b/DataFormats/Provenance/interface/ProvenanceFwd.h index 250c64cb452c4..adc3e8924cc56 100644 --- a/DataFormats/Provenance/interface/ProvenanceFwd.h +++ b/DataFormats/Provenance/interface/ProvenanceFwd.h @@ -2,13 +2,10 @@ #define DataFormats_Provenance_ProvenanceFwd_h namespace edm { - class ProductDescription; class BranchIDListHelper; class Parentage; class BranchID; class BranchKey; - class ProductDescription; - class ProductProvenance; class ProductProvenance; class EventAuxiliary; class EventID; @@ -41,4 +38,5 @@ namespace cms { #include "DataFormats/Provenance/interface/ReleaseVersion.h" #include "DataFormats/Provenance/interface/ProcessHistoryID.h" #include "DataFormats/Provenance/interface/ProcessConfigurationID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #endif diff --git a/DataFormats/Provenance/interface/SelectedProducts.h b/DataFormats/Provenance/interface/SelectedProducts.h index f40b70c551969..0c7862c91fd47 100644 --- a/DataFormats/Provenance/interface/SelectedProducts.h +++ b/DataFormats/Provenance/interface/SelectedProducts.h @@ -5,10 +5,10 @@ #include #include "DataFormats/Provenance/interface/BranchType.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/EDGetToken.h" namespace edm { - class ProductDescription; typedef std::vector> SelectedProducts; typedef std::array SelectedProductsForBranchType; } // namespace edm diff --git a/DataFormats/Provenance/interface/ThinnedAssociationsHelper.h b/DataFormats/Provenance/interface/ThinnedAssociationsHelper.h index 4524e68ac25eb..d581e8d0f5bea 100644 --- a/DataFormats/Provenance/interface/ThinnedAssociationsHelper.h +++ b/DataFormats/Provenance/interface/ThinnedAssociationsHelper.h @@ -6,6 +6,7 @@ */ #include "DataFormats/Provenance/interface/BranchID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include #include @@ -13,8 +14,6 @@ namespace edm { - class ProductDescription; - class ThinnedAssociationBranches { public: ThinnedAssociationBranches(); diff --git a/DataFormats/Provenance/src/BranchDescription.cc b/DataFormats/Provenance/src/BranchDescription.cc index d3029d36b6e01..da68e1643fa50 100644 --- a/DataFormats/Provenance/src/BranchDescription.cc +++ b/DataFormats/Provenance/src/BranchDescription.cc @@ -1,4 +1,4 @@ -#include "DataFormats/Provenance/interface/BranchDescription.h" +#include "DataFormats/Provenance/interface/ProductDescription.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/FWCore/Framework/interface/Event.h b/FWCore/Framework/interface/Event.h index 97f8b536b58d1..cfeda8c2d5384 100644 --- a/FWCore/Framework/interface/Event.h +++ b/FWCore/Framework/interface/Event.h @@ -29,6 +29,7 @@ For its usage, see "FWCore/Framework/interface/PrincipalGetAdapter.h" #include "DataFormats/Provenance/interface/EventSelectionID.h" #include "DataFormats/Provenance/interface/ProductID.h" #include "DataFormats/Provenance/interface/RunID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Common/interface/EventBase.h" #include "FWCore/Framework/interface/Frameworkfwd.h" @@ -55,7 +56,6 @@ class testEvent; namespace edm { - class ProductDescription; class ModuleCallingContext; class TriggerResultsByName; class TriggerResults; diff --git a/FWCore/Framework/interface/EventForOutput.h b/FWCore/Framework/interface/EventForOutput.h index 60044062a9dcf..44427aad32490 100644 --- a/FWCore/Framework/interface/EventForOutput.h +++ b/FWCore/Framework/interface/EventForOutput.h @@ -21,6 +21,7 @@ #include "DataFormats/Provenance/interface/EventID.h" #include "DataFormats/Provenance/interface/EventSelectionID.h" #include "DataFormats/Provenance/interface/RunID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/OccurrenceForOutput.h" @@ -42,7 +43,6 @@ namespace edmtest { namespace edm { - class ProductDescription; class ModuleCallingContext; class ProductProvenanceRetriever; class EDConsumerBase; diff --git a/FWCore/Framework/interface/FileBlock.h b/FWCore/Framework/interface/FileBlock.h index 85f6f31b3d183..429e467068e7f 100644 --- a/FWCore/Framework/interface/FileBlock.h +++ b/FWCore/Framework/interface/FileBlock.h @@ -9,6 +9,7 @@ FileBlock: Properties of an input file. #include "DataFormats/Provenance/interface/FileFormatVersion.h" #include "DataFormats/Provenance/interface/BranchChildren.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Utilities/interface/BranchType.h" class TTree; #include @@ -18,7 +19,6 @@ class TTree; #include namespace edm { - class ProductDescription; class FileBlock { public: // bit mask for reasons fast cloning can be disabled or not applicable diff --git a/FWCore/Framework/interface/OccurrenceForOutput.h b/FWCore/Framework/interface/OccurrenceForOutput.h index 36ae20f030b50..aa2065ca85710 100644 --- a/FWCore/Framework/interface/OccurrenceForOutput.h +++ b/FWCore/Framework/interface/OccurrenceForOutput.h @@ -17,6 +17,7 @@ #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Common/interface/Wrapper.h" #include "DataFormats/Provenance/interface/BranchListIndex.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/PrincipalGetAdapter.h" @@ -37,7 +38,6 @@ namespace edmtest { namespace edm { - class ProductDescription; class ModuleCallingContext; class Principal; class EDConsumerBase; diff --git a/FWCore/Framework/interface/ProducerBase.h b/FWCore/Framework/interface/ProducerBase.h index f971b708a44ab..1d864e9d5740e 100644 --- a/FWCore/Framework/interface/ProducerBase.h +++ b/FWCore/Framework/interface/ProducerBase.h @@ -11,6 +11,7 @@ EDProducts into an Event. #include "FWCore/Framework/interface/ProductRegistryHelper.h" #include "FWCore/Framework/interface/ProducesCollector.h" #include "FWCore/Utilities/interface/ProductResolverIndex.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include #include @@ -19,7 +20,6 @@ EDProducts into an Event. #include namespace edm { - class ProductDescription; class ModuleDescription; class ProducesCollector; class SignallingProductRegistry; diff --git a/FWCore/Framework/interface/ProductSelector.h b/FWCore/Framework/interface/ProductSelector.h index e4c2b36c4c608..8ac8606015e7a 100644 --- a/FWCore/Framework/interface/ProductSelector.h +++ b/FWCore/Framework/interface/ProductSelector.h @@ -10,6 +10,7 @@ ////////////////////////////////////////////////////////////////////// #include "DataFormats/Provenance/interface/BranchID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include #include @@ -17,8 +18,6 @@ #include namespace edm { - class ProductDescription; - class BranchID; class ProductRegistry; class ProductSelectorRules; class ParameterSet; @@ -28,7 +27,8 @@ namespace edm { ProductSelector(); // N.B.: we assume there are not null pointers in the vector allBranches. - void initialize(ProductSelectorRules const& rules, std::vector const& productDescriptions); + void initialize(ProductSelectorRules const& rules, + std::vector const& productDescriptions); bool selected(ProductDescription const& desc) const; @@ -37,8 +37,8 @@ namespace edm { bool initialized() const { return initialized_; } - static void checkForDuplicateKeptBranch(ProductDescription const& desc, - std::map& trueBranchIDToKeptBranchDesc); + static void checkForDuplicateKeptBranch( + ProductDescription const& desc, std::map& trueBranchIDToKeptBranchDesc); static void fillDroppedToKept(ProductRegistry const& preg, std::map const& trueBranchIDToKeptBranchDesc, diff --git a/FWCore/Framework/interface/ProductSelectorRules.h b/FWCore/Framework/interface/ProductSelectorRules.h index 26c54f0c9c96b..a7f566c51959d 100644 --- a/FWCore/Framework/interface/ProductSelectorRules.h +++ b/FWCore/Framework/interface/ProductSelectorRules.h @@ -14,9 +14,9 @@ #include #include +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" namespace edm { - class ProductDescription; class ProductSelector; class ParameterSet; class ParameterSetDescription; diff --git a/FWCore/Framework/interface/SubProcess.h b/FWCore/Framework/interface/SubProcess.h index 6fc21622748d1..1f9d141b6ecce 100644 --- a/FWCore/Framework/interface/SubProcess.h +++ b/FWCore/Framework/interface/SubProcess.h @@ -2,6 +2,7 @@ #define FWCore_Framework_SubProcess_h #include "DataFormats/Provenance/interface/BranchID.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Common/interface/FWCoreCommonFwd.h" #include "FWCore/Framework/interface/EventSetupProvider.h" #include "FWCore/Framework/interface/EDConsumerBase.h" @@ -30,7 +31,6 @@ namespace edm { class ActivityRegistry; - class ProductDescription; class BranchIDListHelper; class EventPrincipal; class EventSetupImpl; diff --git a/FWCore/Framework/interface/TransformerBase.h b/FWCore/Framework/interface/TransformerBase.h index 4f8e38f60e870..a95f23bcc3696 100644 --- a/FWCore/Framework/interface/TransformerBase.h +++ b/FWCore/Framework/interface/TransformerBase.h @@ -13,6 +13,7 @@ #include "FWCore/Utilities/interface/StreamID.h" #include "FWCore/Utilities/interface/TypeID.h" #include "FWCore/Utilities/interface/ProductResolverIndex.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include #include @@ -24,7 +25,6 @@ namespace edm { class TypeID; class WrapperBase; class EventForTransformer; - class ProductDescription; class ProductResolverIndexHelper; class ModuleDescription; class WaitingTaskWithArenaHolder; diff --git a/FWCore/Framework/interface/WillGetIfMatch.h b/FWCore/Framework/interface/WillGetIfMatch.h index add59b3ca72e9..77fdf0e09e17f 100644 --- a/FWCore/Framework/interface/WillGetIfMatch.h +++ b/FWCore/Framework/interface/WillGetIfMatch.h @@ -27,8 +27,9 @@ namespace edm { EDGetTokenT operator()(ProductDescription const& productDescription) { if (match_(productDescription)) { auto transition = productDescription.branchType(); - edm::InputTag tag{ - productDescription.moduleLabel(), productDescription.productInstanceName(), productDescription.processName()}; + edm::InputTag tag{productDescription.moduleLabel(), + productDescription.productInstanceName(), + productDescription.processName()}; if (transition == edm::InEvent) { return module_->template consumes(tag); } else if (transition == edm::InLumi) { diff --git a/FWCore/Framework/src/Principal.cc b/FWCore/Framework/src/Principal.cc index f051ad3b74bcf..8363a01fedd6b 100644 --- a/FWCore/Framework/src/Principal.cc +++ b/FWCore/Framework/src/Principal.cc @@ -312,7 +312,8 @@ namespace edm { << "\n" << "Workaround: change process name or product instance name of " << newProduct.branchName() << "\n"; } else { - assert(nullptr == phb || BranchKey(productResolver.productDescription()) == BranchKey(phb->productDescription())); + assert(nullptr == phb || + BranchKey(productResolver.productDescription()) == BranchKey(phb->productDescription())); } } return phb; diff --git a/FWCore/Framework/src/PrincipalGetAdapter.cc b/FWCore/Framework/src/PrincipalGetAdapter.cc index 22956fcb05e67..b83afb5df8468 100644 --- a/FWCore/Framework/src/PrincipalGetAdapter.cc +++ b/FWCore/Framework/src/PrincipalGetAdapter.cc @@ -209,7 +209,7 @@ namespace edm { } ProductDescription const& PrincipalGetAdapter::getProductDescription(TypeID const& type, - std::string const& productInstanceName) const { + std::string const& productInstanceName) const { ProductResolverIndexHelper const& productResolverIndexHelper = principal_.productLookup(); ProductResolverIndex index = productResolverIndexHelper.index( PRODUCT_TYPE, type, md_.moduleLabel().c_str(), productInstanceName.c_str(), md_.processName().c_str()); diff --git a/FWCore/Framework/src/ProductRegistryHelper.cc b/FWCore/Framework/src/ProductRegistryHelper.cc index 2cc80412b2c58..290cdccaac1a6 100644 --- a/FWCore/Framework/src/ProductRegistryHelper.cc +++ b/FWCore/Framework/src/ProductRegistryHelper.cc @@ -76,14 +76,14 @@ namespace edm { TypeWithDict type(p->typeID_.typeInfo()); ProductDescription pdesc(branchType, - iDesc.moduleLabel(), - iDesc.processName(), - p->typeID_.userClassName(), - p->typeID_.friendlyClassName(), - p->productInstanceName_, - type, - true, - isEndTransition(p->transition_)); + iDesc.moduleLabel(), + iDesc.processName(), + p->typeID_.userClassName(), + p->typeID_.friendlyClassName(), + p->productInstanceName_, + type, + true, + isEndTransition(p->transition_)); if (p->aliasType_ == TypeLabelItem::AliasType::kSwitchAlias) { if (p->branchAlias_.empty()) { throw edm::Exception(edm::errors::LogicError) diff --git a/FWCore/Framework/src/insertSelectedProcesses.h b/FWCore/Framework/src/insertSelectedProcesses.h index 49623defd6586..a1ba520980962 100644 --- a/FWCore/Framework/src/insertSelectedProcesses.h +++ b/FWCore/Framework/src/insertSelectedProcesses.h @@ -3,11 +3,10 @@ #include #include +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" namespace edm { - class ProductDescription; - void insertSelectedProcesses(ProductDescription const& desc, std::set& processes, std::set& processesWithKeptProcessBlockProducts); diff --git a/FWCore/Framework/test/Event_t.cpp b/FWCore/Framework/test/Event_t.cpp index 0867e70d594d2..be9d0f15c163e 100644 --- a/FWCore/Framework/test/Event_t.cpp +++ b/FWCore/Framework/test/Event_t.cpp @@ -217,12 +217,12 @@ void testEvent::registerProduct(std::string const& tag, TypeWithDict product_type(typeid(T)); ProductDescription branch(InEvent, - moduleLabel, - processName, - product_type.userClassName(), - product_type.friendlyClassName(), - productInstanceName, - product_type); + moduleLabel, + processName, + product_type.userClassName(), + product_type.friendlyClassName(), + productInstanceName, + product_type); moduleDescriptions_[tag] = ModuleDescription( moduleParams.id(), moduleClassName, moduleLabel, processX.get(), ModuleDescription::getUniqueID()); @@ -364,12 +364,12 @@ testEvent::testEvent() std::string productInstanceName("int1"); ProductDescription branch(InEvent, - moduleLabel, - processName, - product_type.userClassName(), - product_type.friendlyClassName(), - productInstanceName, - product_type); + moduleLabel, + processName, + product_type.userClassName(), + product_type.friendlyClassName(), + productInstanceName, + product_type); availableProducts_->addProduct(branch); diff --git a/FWCore/Framework/test/eventprincipal_t.cppunit.cc b/FWCore/Framework/test/eventprincipal_t.cppunit.cc index 4a30bf445daf7..83195de9c0101 100644 --- a/FWCore/Framework/test/eventprincipal_t.cppunit.cc +++ b/FWCore/Framework/test/eventprincipal_t.cppunit.cc @@ -103,8 +103,8 @@ std::shared_ptr test_ep::fake_single_module_process(s } std::shared_ptr test_ep::fake_single_process_branch(std::string const& tag, - std::string const& processName, - std::string const& productInstanceName) { + std::string const& processName, + std::string const& productInstanceName) { std::string moduleLabel = processName + "dummyMod"; std::string moduleClass("DummyModule"); edm::TypeWithDict dummyType(typeid(edmtest::DummyProduct)); @@ -117,12 +117,12 @@ std::shared_ptr test_ep::fake_single_process_branch(std std::shared_ptr process(fake_single_module_process(tag, processName, modParams)); auto result = std::make_shared(edm::InEvent, - moduleLabel, - processName, - productClassName, - friendlyProductClassName, - productInstanceName, - dummyType); + moduleLabel, + processName, + productClassName, + friendlyProductClassName, + productInstanceName, + dummyType); productDescriptions_[tag] = result; return result; } diff --git a/FWCore/Framework/test/productregistry.cppunit.cc b/FWCore/Framework/test/productregistry.cppunit.cc index 15738c0a70eca..780014acbd681 100644 --- a/FWCore/Framework/test/productregistry.cppunit.cc +++ b/FWCore/Framework/test/productregistry.cppunit.cc @@ -76,12 +76,12 @@ namespace { pc->setParameterSetID(dummyProcessPset.id()); edm::ProductDescription prod(iDesc.branchType(), - name_, - iDesc.processName(), - iDesc.fullClassName(), - iDesc.friendlyClassName(), - iDesc.productInstanceName() + "-" + name_, - iDesc.unwrappedType()); + name_, + iDesc.processName(), + iDesc.fullClassName(), + iDesc.friendlyClassName(), + iDesc.productInstanceName() + "-" + name_, + iDesc.unwrappedType()); reg_->addProduct(prod); } }; @@ -108,20 +108,20 @@ void testProductRegistry::setUp() { simpleVecBranch_ = std::make_shared(edm::InEvent, - "labelovsimple", - "PROD", - "edm::OwnVector", - "edmtestSimplesOwned", - "ovsimple", - edm::TypeWithDict(typeid(edm::OwnVector))); + "labelovsimple", + "PROD", + "edm::OwnVector", + "edmtestSimplesOwned", + "ovsimple", + edm::TypeWithDict(typeid(edm::OwnVector))); simpleDerivedVecBranch_ = std::make_shared(edm::InEvent, - "labelovsimplederived", - "PROD", - "edm::OwnVector", - "edmtestSimpleDerivedsOwned", - "ovsimplederived", - edm::TypeWithDict(typeid(edm::OwnVector))); + "labelovsimplederived", + "PROD", + "edm::OwnVector", + "edmtestSimpleDerivedsOwned", + "ovsimplederived", + edm::TypeWithDict(typeid(edm::OwnVector))); } namespace { diff --git a/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc b/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc index 479ea53350d85..15ce47ca99913 100644 --- a/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc +++ b/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc @@ -68,80 +68,80 @@ TEST_CASE("test MergeableRunProductMetadata", "[MergeableRunProductMetadata]") { // not mergeable edm::ProductDescription prod1(edm::InRun, - "label", - "PROD", - "edmtest::Thing", - "edmtestThing", - "instance", - edm::TypeWithDict::byName("edmtest::Thing"), - false); + "label", + "PROD", + "edmtest::Thing", + "edmtestThing", + "instance", + edm::TypeWithDict::byName("edmtest::Thing"), + false); productRegistry.copyProduct(prod1); // This one should be used edm::ProductDescription prod2(edm::InRun, - "aLabel", - "APROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - false); + "aLabel", + "APROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + false); productRegistry.copyProduct(prod2); //not in a Run edm::ProductDescription prod3(edm::InLumi, - "bLabel", - "BPROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - false); + "bLabel", + "BPROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + false); productRegistry.copyProduct(prod3); // produced edm::ProductDescription prod4(edm::InRun, - "cLabel", - "CPROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - true); + "cLabel", + "CPROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + true); productRegistry.addProduct(prod4); // dropped edm::ProductDescription prod5(edm::InRun, - "dLabel", - "DPROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - false); + "dLabel", + "DPROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + false); prod5.setDropped(true); productRegistry.copyProduct(prod5); // Should be used but the same process name edm::ProductDescription prod6(edm::InRun, - "eLabel", - "APROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - false); + "eLabel", + "APROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + false); productRegistry.copyProduct(prod6); // Should be used edm::ProductDescription prod7(edm::InRun, - "fLabel", - "AAPROD", - "edmtest::ThingWithMerge", - "edmtestThingWithMerge", - "instance", - edm::TypeWithDict::byName("edmtest::ThingWithMerge"), - false); + "fLabel", + "AAPROD", + "edmtest::ThingWithMerge", + "edmtestThingWithMerge", + "instance", + edm::TypeWithDict::byName("edmtest::ThingWithMerge"), + false); productRegistry.copyProduct(prod7); edm::MergeableRunProductProcesses mergeableRunProductProcesses; diff --git a/FWCore/Integration/plugins/DelayedReaderThrowingSource.cc b/FWCore/Integration/plugins/DelayedReaderThrowingSource.cc index d22cabf913d0f..348babbbc58e4 100644 --- a/FWCore/Integration/plugins/DelayedReaderThrowingSource.cc +++ b/FWCore/Integration/plugins/DelayedReaderThrowingSource.cc @@ -92,14 +92,14 @@ namespace edm { std::vector branches; for (auto const& label : pset.getUntrackedParameter>("labels")) { branches.push_back(ProductDescription(InEvent, - label, //module label - "INPUTTEST", //can't be the present process name - twd.userClassName(), - twd.friendlyClassName(), - "", //product instance name - twd, - false //not produced - )); + label, //module label + "INPUTTEST", //can't be the present process name + twd.userClassName(), + twd.friendlyClassName(), + "", //product instance name + twd, + false //not produced + )); branches.back().setOnDemand(true); //says we use delayed reader } productRegistryUpdate().updateFromInput(branches); diff --git a/FWCore/Integration/plugins/TestGetterOfProducts.cc b/FWCore/Integration/plugins/TestGetterOfProducts.cc index 877f698f9e0db..fa60985c43360 100644 --- a/FWCore/Integration/plugins/TestGetterOfProducts.cc +++ b/FWCore/Integration/plugins/TestGetterOfProducts.cc @@ -3,6 +3,7 @@ #include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "DataFormats/TestObjects/interface/Thing.h" #include "DataFormats/TestObjects/interface/ToyProducts.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Framework/interface/GetterOfProducts.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/ModuleLabelMatch.h" @@ -16,7 +17,6 @@ #include namespace edm { - class ProductDescription; class Event; class EventSetup; } // namespace edm diff --git a/FWCore/Modules/src/GetProductCheckerOutputModule.cc b/FWCore/Modules/src/GetProductCheckerOutputModule.cc index 9524d80cd3c1f..a1540a98ae3f2 100644 --- a/FWCore/Modules/src/GetProductCheckerOutputModule.cc +++ b/FWCore/Modules/src/GetProductCheckerOutputModule.cc @@ -96,8 +96,8 @@ namespace edm { << productDescription->processName(); } else { edm::LogInfo("DidNotFindProduct") - << "did not find " << productDescription->moduleLabel() << " '" << productDescription->productInstanceName() - << "' " << productDescription->processName(); + << "did not find " << productDescription->moduleLabel() << " '" + << productDescription->productInstanceName() << "' " << productDescription->processName(); } } if (nullptr != bh.provenance() && diff --git a/FWCore/Sources/src/DaqProvenanceHelper.cc b/FWCore/Sources/src/DaqProvenanceHelper.cc index 6ab80b6c96076..628c521c1a3ed 100644 --- a/FWCore/Sources/src/DaqProvenanceHelper.cc +++ b/FWCore/Sources/src/DaqProvenanceHelper.cc @@ -17,19 +17,19 @@ namespace { edm::ProductDescription makeDescriptionForDaqProvHelper(edm::TypeID const& rawDataType, - std::string const& collectionName, - std::string const& friendlyName, - std::string const& sourceLabel) { + std::string const& collectionName, + std::string const& friendlyName, + std::string const& sourceLabel) { edm::ProductDescription desc(edm::InEvent, - "rawDataCollector", - // "source", - "LHC", - // "HLT", - collectionName, - friendlyName, - "", - edm::TypeWithDict(rawDataType.typeInfo()), - false); + "rawDataCollector", + // "source", + "LHC", + // "HLT", + collectionName, + friendlyName, + "", + edm::TypeWithDict(rawDataType.typeInfo()), + false); desc.setIsProvenanceSetOnRead(); return desc; } @@ -97,7 +97,8 @@ namespace edm { // Insert an entry for this process in the process history registry ProcessHistory ph; - ph.emplace_back(constProductDescription_.processName(), processParameterSet_.id(), getReleaseVersion(), getPassID()); + ph.emplace_back( + constProductDescription_.processName(), processParameterSet_.id(), getReleaseVersion(), getPassID()); processHistoryRegistry.registerProcessHistory(ph); // Save the process history ID for use every event. diff --git a/FWCore/TestProcessor/src/TestProcessor.cc b/FWCore/TestProcessor/src/TestProcessor.cc index 6b47ea1777ab1..0114d09af4a0c 100644 --- a/FWCore/TestProcessor/src/TestProcessor.cc +++ b/FWCore/TestProcessor/src/TestProcessor.cc @@ -132,13 +132,13 @@ namespace edm { } edm::TypeWithDict twd(produce.type_.typeInfo()); edm::ProductDescription product(edm::InEvent, - produce.moduleLabel_, - processName, - twd.userClassName(), - twd.friendlyClassName(), - produce.instanceLabel_, - twd, - true //force this to come from 'source' + produce.moduleLabel_, + processName, + twd.userClassName(), + twd.friendlyClassName(), + produce.instanceLabel_, + twd, + true //force this to come from 'source' ); product.init(); dataProducts_.emplace_back(product, std::unique_ptr()); diff --git a/GeneratorInterface/LHEInterface/plugins/LHEProvenanceHelper.cc b/GeneratorInterface/LHEInterface/plugins/LHEProvenanceHelper.cc index 6371438c3d99c..187085398d736 100644 --- a/GeneratorInterface/LHEInterface/plugins/LHEProvenanceHelper.cc +++ b/GeneratorInterface/LHEInterface/plugins/LHEProvenanceHelper.cc @@ -22,25 +22,25 @@ namespace edm { ProductRegistry& productRegistry, BranchIDListHelper& branchIDListHelper) : eventProductProductDescription_(ProductDescription(InEvent, + "source", + "LHEFile" + // , "LHE" + , + "LHEEventProduct", + "LHEEventProduct", + "", + TypeWithDict(eventProductType.typeInfo()), + false)), + runProductProductDescription_(ProductDescription(InRun, "source", "LHEFile" // , "LHE" , - "LHEEventProduct", - "LHEEventProduct", + "LHERunInfoProduct", + "LHERunInfoProduct", "", - TypeWithDict(eventProductType.typeInfo()), + TypeWithDict(runProductType.typeInfo()), false)), - runProductProductDescription_(ProductDescription(InRun, - "source", - "LHEFile" - // , "LHE" - , - "LHERunInfoProduct", - "LHERunInfoProduct", - "", - TypeWithDict(runProductType.typeInfo()), - false)), eventProductProvenance_(eventProductProductDescription_.branchID()), commonProcessParameterSet_(fillCommonProcessParameterSet()), processParameterSet_(), diff --git a/IOPool/Input/test/testNoParentDictionary.sh b/IOPool/Input/test/testNoParentDictionary.sh index 70afd3c52eb5b..054f8ca2f1b39 100755 --- a/IOPool/Input/test/testNoParentDictionary.sh +++ b/IOPool/Input/test/testNoParentDictionary.sh @@ -17,6 +17,9 @@ mkdir DataFormats if [ -d ${CMSSW_BASE}/src/DataFormats/Common ]; then cp -Lr ${CMSSW_BASE}/src/DataFormats/Common DataFormats/ fi +if [ -d ${CMSSW_BASE}/src/DataFormats/Provenance ]; then + cp -Lr ${CMSSW_BASE}/src/DataFormats/Provenance DataFormats/ +fi # Copy DataFormats/TestObjects code to be able to edit it to make ROOT header parsing to fail for DIR in ${CMSSW_BASE} ${CMSSW_RELEASE_BASE} ${CMSSW_FULL_RELEASE_BASE} ; do diff --git a/IOPool/Streamer/src/ClassFiller.cc b/IOPool/Streamer/src/ClassFiller.cc index d780fc697e73d..3313878ca1a06 100644 --- a/IOPool/Streamer/src/ClassFiller.cc +++ b/IOPool/Streamer/src/ClassFiller.cc @@ -37,7 +37,7 @@ namespace edm::streamer { loadCap(std::string("edm::StreamedProduct"), missingDictionaries); loadCap(std::string("std::vector"), missingDictionaries); loadCap(std::string("edm::SendEvent"), missingDictionaries); - loadCap(std::string("std::vector"), missingDictionaries); + loadCap(std::string("std::vector"), missingDictionaries); loadCap(std::string("edm::SendJobHeader"), missingDictionaries); if (!missingDictionaries.empty()) { std::string context("Calling loadExtraClasses, checking dictionaries"); diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtilsHelper.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtilsHelper.h index b61c2a77cb3d3..bc41962ea851e 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtilsHelper.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtilsHelper.h @@ -20,6 +20,7 @@ #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerRecord.h" #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" #include "DataFormats/L1GlobalTrigger/interface/L1GtTriggerMenuLite.h" +#include "DataFormats/Provenance/interface/ProductDescriptionFwd.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -30,7 +31,6 @@ #include namespace edm { - class ProductDescription; class ParameterSetDescription; } // namespace edm diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtilsHelper.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtilsHelper.cc index 5ef7e87eff6c8..7feca5e0fe97d 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtilsHelper.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtilsHelper.cc @@ -137,7 +137,8 @@ void L1GtUtilsHelper::checkToUpdateTags(edm::ProductDescription const& productDe // L1GlobalTriggerReadoutRecord - if (findReadoutRecord && (productDescription.unwrappedTypeID() == edm::TypeID(typeid(L1GlobalTriggerReadoutRecord))) && + if (findReadoutRecord && + (productDescription.unwrappedTypeID() == edm::TypeID(typeid(L1GlobalTriggerReadoutRecord))) && (productDescription.branchType() == edm::InEvent)) { setConsumesAndCheckAmbiguities(productDescription, preferredL1GtReadoutRecordInputTag, diff --git a/L1Trigger/L1TGlobal/interface/L1TGlobalUtilHelper.h b/L1Trigger/L1TGlobal/interface/L1TGlobalUtilHelper.h index a5a339004cc1d..8ae46f474a2db 100644 --- a/L1Trigger/L1TGlobal/interface/L1TGlobalUtilHelper.h +++ b/L1Trigger/L1TGlobal/interface/L1TGlobalUtilHelper.h @@ -19,6 +19,7 @@ #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h" #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h" +#include "DataFormats/Provenance/interface/ProductDescription.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -29,7 +30,6 @@ #include namespace edm { - class ProductDescription; class ParameterSetDescription; } // namespace edm