CMS 3D CMS Logo

ESParentContext.cc
Go to the documentation of this file.
4 
6 
7 #include <ostream>
8 
9 namespace edm {
10 
11  ESParentContext::ESParentContext() : type_(Type::kInvalid) { parent_.esmodule = nullptr; }
12 
13  ESParentContext::ESParentContext(ModuleCallingContext const* module) noexcept : type_(Type::kModule) {
14  parent_.module = module;
15  }
16 
17  ESParentContext::ESParentContext(ESModuleCallingContext const* module) noexcept : type_(Type::kESModule) {
18  parent_.esmodule = module;
19  }
20 
22  if (type_ != Type::kModule) {
24  << "ESParentContext::moduleCallingContext called for incorrect type of context";
25  }
26  return parent_.module;
27  }
28 
30  if (type_ != Type::kESModule) {
32  << "ESParentContext::esmoduleCallingContext called for incorrect type of context";
33  }
34  return parent_.esmodule;
35  }
36 } // namespace edm
ModuleCallingContext.h
edm::ESModuleCallingContext
Definition: ESModuleCallingContext.h:27
edm::errors::LogicError
Definition: EDMException.h:37
edm::ESParentContext::type_
Type type_
Definition: ESParentContext.h:35
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ESParentContext::Type::kModule
EDMException.h
edm::ESParentContext::Parent::esmodule
ESModuleCallingContext const * esmodule
Definition: ESParentContext.h:39
edm::ESParentContext::Type::kESModule
edm::ESParentContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: ESParentContext.cc:21
ESParentContext.h
edm::ESParentContext::parent_
union edm::ESParentContext::Parent parent_
edm::ESParentContext::ESParentContext
ESParentContext()
Definition: ESParentContext.cc:11
callgraph.module
module
Definition: callgraph.py:61
edm::ESParentContext::Parent::module
ModuleCallingContext const * module
Definition: ESParentContext.h:38
Exception
Definition: hltDiff.cc:245
edm::ESParentContext::Type
Type
Definition: ESParentContext.h:23
ESModuleCallingContext.h
edm::ESParentContext::esmoduleCallingContext
ESModuleCallingContext const * esmoduleCallingContext() const
Definition: ESParentContext.cc:29
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29