From eab1683ac5720a463442a2607cb77a1089cda941 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 20 Jul 2021 09:53:10 -0500 Subject: [PATCH 1/2] Access RunIndex from RunForOutput This is needed to allow use of run caches in OutputModules --- FWCore/Framework/interface/RunForOutput.h | 5 +++++ FWCore/Framework/src/RunForOutput.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/FWCore/Framework/interface/RunForOutput.h b/FWCore/Framework/interface/RunForOutput.h index 665cab330bb9f..5f3dfa5fbe296 100644 --- a/FWCore/Framework/interface/RunForOutput.h +++ b/FWCore/Framework/interface/RunForOutput.h @@ -22,6 +22,7 @@ For its usage, see "FWCore/Framework/interface/PrincipalGetAdapter.h" #include "FWCore/Framework/interface/OccurrenceForOutput.h" #include "FWCore/Framework/interface/PrincipalGetAdapter.h" #include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Utilities/interface/RunIndex.h" #include #include @@ -57,6 +58,10 @@ namespace edm { Timestamp const& endTime() const { return aux_.endTime(); } MergeableRunProductMetadata const* mergeableRunProductMetadata() const { return mergeableRunProductMetadata_; } + /**\return Reusable index which can be used to separate data for different simultaneous LuminosityBlocks. + */ + RunIndex index() const; + private: friend class edmtest::TestOutputModule; // For testing diff --git a/FWCore/Framework/src/RunForOutput.cc b/FWCore/Framework/src/RunForOutput.cc index f657ede319010..2ce03fadfd73f 100644 --- a/FWCore/Framework/src/RunForOutput.cc +++ b/FWCore/Framework/src/RunForOutput.cc @@ -26,4 +26,9 @@ namespace edm { RunForOutput::~RunForOutput() {} RunPrincipal const& RunForOutput::runPrincipal() const { return dynamic_cast(principal()); } + + /**\return Reusable index which can be used to separate data for different simultaneous LuminosityBlocks. + */ + RunIndex RunForOutput::index() const { return runPrincipal().index(); } + } // namespace edm From 05cf29fb92e8d7c5a70afd15d6cb02e64553c9a1 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 20 Jul 2021 10:21:45 -0500 Subject: [PATCH 2/2] Fix comment on index() --- FWCore/Framework/interface/RunForOutput.h | 2 +- FWCore/Framework/src/RunForOutput.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FWCore/Framework/interface/RunForOutput.h b/FWCore/Framework/interface/RunForOutput.h index 5f3dfa5fbe296..94c9ba020fd54 100644 --- a/FWCore/Framework/interface/RunForOutput.h +++ b/FWCore/Framework/interface/RunForOutput.h @@ -58,7 +58,7 @@ namespace edm { Timestamp const& endTime() const { return aux_.endTime(); } MergeableRunProductMetadata const* mergeableRunProductMetadata() const { return mergeableRunProductMetadata_; } - /**\return Reusable index which can be used to separate data for different simultaneous LuminosityBlocks. + /**\return Reusable index which can be used to separate data for different simultaneous Runs. */ RunIndex index() const; diff --git a/FWCore/Framework/src/RunForOutput.cc b/FWCore/Framework/src/RunForOutput.cc index 2ce03fadfd73f..b07c210b24943 100644 --- a/FWCore/Framework/src/RunForOutput.cc +++ b/FWCore/Framework/src/RunForOutput.cc @@ -27,7 +27,7 @@ namespace edm { RunPrincipal const& RunForOutput::runPrincipal() const { return dynamic_cast(principal()); } - /**\return Reusable index which can be used to separate data for different simultaneous LuminosityBlocks. + /**\return Reusable index which can be used to separate data for different simultaneous Runs. */ RunIndex RunForOutput::index() const { return runPrincipal().index(); }