CMS 3D CMS Logo

ProcessContext.cc
Go to the documentation of this file.
3 
4 #include <ostream>
5 
6 namespace edm {
7 
8  ProcessContext::ProcessContext() : processConfiguration_(nullptr), parentProcessContext_(nullptr) {}
9 
11  if (!isSubProcess()) {
13  << "ProcessContext::parentProcessContext This function should only be called for SubProcesses.\n"
14  << "If necessary, you can check this by calling isSubProcess first.\n";
15  }
16  return *parentProcessContext_;
17  }
18 
21  }
22 
23  void ProcessContext::setParentProcessContext(ProcessContext const* parentProcessContext) {
25  }
26 
27  std::ostream& operator<<(std::ostream& os, ProcessContext const& pc) {
28  os << "ProcessContext: ";
29  if (pc.processConfiguration()) {
30  os << pc.processConfiguration()->processName() << " " << pc.processConfiguration()->parameterSetID() << "\n";
31  } else {
32  os << "invalid\n";
33  return os;
34  }
35  if (pc.isSubProcess()) {
36  os << " parent " << pc.parentProcessContext();
37  }
38  return os;
39  }
40 } // namespace edm
edm::ProcessContext::parentProcessContext
ProcessContext const & parentProcessContext() const
Definition: ProcessContext.cc:10
edm::ProcessContext::isSubProcess
bool isSubProcess() const
Definition: ProcessContext.h:34
edm::ProcessContext::processConfiguration_
ProcessConfiguration const * processConfiguration_
Definition: ProcessContext.h:41
edm::errors::LogicError
Definition: EDMException.h:37
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessContext
Definition: ProcessContext.h:27
edm::ProcessContext::parentProcessContext_
ProcessContext const * parentProcessContext_
Definition: ProcessContext.h:45
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
EDMException.h
edm::ProcessContext::setProcessConfiguration
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
Definition: ProcessContext.cc:19
edm::ProcessConfiguration::processName
std::string const & processName() const
Definition: ProcessConfiguration.h:24
edm::ProcessConfiguration::parameterSetID
ParameterSetID const & parameterSetID() const
Definition: ProcessConfiguration.cc:31
edm::ProcessContext::setParentProcessContext
void setParentProcessContext(ProcessContext const *parentProcessContext)
Definition: ProcessContext.cc:23
edm::ProcessContext::ProcessContext
ProcessContext()
Definition: ProcessContext.cc:8
Exception
Definition: hltDiff.cc:246
edm::ProcessContext::processConfiguration
ProcessConfiguration const * processConfiguration() const
Definition: ProcessContext.h:33
ProcessContext.h
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14