File indexing completed on 2024-04-06 12:13:02
0001 #ifndef FWCore_ServiceRegistry_ProcessContext_h
0002 #define FWCore_ServiceRegistry_ProcessContext_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "DataFormats/Provenance/interface/ParameterSetID.h"
0020 #include "DataFormats/Provenance/interface/ProcessConfiguration.h"
0021
0022 #include <iosfwd>
0023 #include <string>
0024
0025 namespace edm {
0026
0027 class ProcessContext {
0028 public:
0029 ProcessContext();
0030
0031 std::string const& processName() const { return processConfiguration_->processName(); }
0032 ParameterSetID const& parameterSetID() const { return processConfiguration_->parameterSetID(); }
0033 ProcessConfiguration const* processConfiguration() const { return processConfiguration_; }
0034 bool isSubProcess() const { return parentProcessContext_ != nullptr; }
0035 ProcessContext const& parentProcessContext() const;
0036
0037 void setProcessConfiguration(ProcessConfiguration const* processConfiguration);
0038 void setParentProcessContext(ProcessContext const* parentProcessContext);
0039
0040 private:
0041 ProcessConfiguration const* processConfiguration_;
0042
0043
0044
0045 ProcessContext const* parentProcessContext_;
0046 };
0047
0048 std::ostream& operator<<(std::ostream&, ProcessContext const&);
0049 }
0050 #endif