Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access RunIndex from RunForOutput #34565

Merged
merged 2 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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