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
union edm::ESParentContext::Parent parent_
ESModuleCallingContext const * esmodule
ModuleCallingContext const * moduleCallingContext() const
ESModuleCallingContext const * esmoduleCallingContext() const
HLT enums.
ModuleCallingContext const * module