Skip to content

Commit

Permalink
Merge pull request #34565 from Dr15Jones/indexRunForOutput
Browse files Browse the repository at this point in the history
Access RunIndex from RunForOutput
  • Loading branch information
cmsbuild authored Jul 21, 2021
2 parents a44a6cf + 05cf29f commit 65bf94b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FWCore/Framework/interface/RunForOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <string>
Expand Down Expand Up @@ -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 Runs.
*/
RunIndex index() const;

private:
friend class edmtest::TestOutputModule; // For testing

Expand Down
5 changes: 5 additions & 0 deletions FWCore/Framework/src/RunForOutput.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ namespace edm {
RunForOutput::~RunForOutput() {}

RunPrincipal const& RunForOutput::runPrincipal() const { return dynamic_cast<RunPrincipal const&>(principal()); }

/**\return Reusable index which can be used to separate data for different simultaneous Runs.
*/
RunIndex RunForOutput::index() const { return runPrincipal().index(); }

} // namespace edm

0 comments on commit 65bf94b

Please sign in to comment.