CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::ESParentContext Class Reference

#include <ESParentContext.h>

Classes

union  Parent
 

Public Types

enum  Type { Type::kModule, Type::kESModule, Type::kInvalid }
 

Public Member Functions

ESModuleCallingContext const * esmoduleCallingContext () const
 
 ESParentContext ()
 
 ESParentContext (ESModuleCallingContext const *) noexcept
 
 ESParentContext (ModuleCallingContext const *) noexcept
 
ModuleCallingContext const * moduleCallingContext () const
 
Type type () const noexcept
 

Private Attributes

union edm::ESParentContext::Parent parent_
 
Type type_
 

Detailed Description

Description: This is intended to be used as a member of ESModuleCallingContext.

Usage:

Definition at line 21 of file ESParentContext.h.

Member Enumeration Documentation

◆ Type

Enumerator
kModule 
kESModule 
kInvalid 

Definition at line 23 of file ESParentContext.h.

23 { kModule, kESModule, kInvalid };

Constructor & Destructor Documentation

◆ ESParentContext() [1/3]

edm::ESParentContext::ESParentContext ( )

Definition at line 11 of file ESParentContext.cc.

11 : type_(Type::kInvalid) { parent_.esmodule = nullptr; }

References edm::ESParentContext::Parent::esmodule, and parent_.

◆ ESParentContext() [2/3]

edm::ESParentContext::ESParentContext ( ModuleCallingContext const *  module)
explicitnoexcept

Definition at line 13 of file ESParentContext.cc.

13  : type_(Type::kModule) {
14  parent_.module = module;
15  }

◆ ESParentContext() [3/3]

edm::ESParentContext::ESParentContext ( ESModuleCallingContext const *  module)
explicitnoexcept

Definition at line 17 of file ESParentContext.cc.

18  parent_.esmodule = module;
19  }

Member Function Documentation

◆ esmoduleCallingContext()

ESModuleCallingContext const * edm::ESParentContext::esmoduleCallingContext ( ) const

Definition at line 29 of file ESParentContext.cc.

29  {
30  if (type_ != Type::kESModule) {
32  << "ESParentContext::esmoduleCallingContext called for incorrect type of context";
33  }
34  return parent_.esmodule;
35  }

References edm::ESParentContext::Parent::esmodule, Exception, kESModule, edm::errors::LogicError, parent_, and type_.

Referenced by edm::ESModuleCallingContext::esmoduleCallingContext().

◆ moduleCallingContext()

ModuleCallingContext const * edm::ESParentContext::moduleCallingContext ( ) const

Definition at line 21 of file ESParentContext.cc.

21  {
22  if (type_ != Type::kModule) {
24  << "ESParentContext::moduleCallingContext called for incorrect type of context";
25  }
26  return parent_.module;
27  }

References Exception, kModule, edm::errors::LogicError, edm::ESParentContext::Parent::module, parent_, and type_.

Referenced by edm::ESModuleCallingContext::moduleCallingContext().

◆ type()

Type edm::ESParentContext::type ( ) const
inlinenoexcept

Definition at line 29 of file ESParentContext.h.

29 { return type_; }

References type_.

Referenced by edm::ESModuleCallingContext::type().

Member Data Documentation

◆ parent_

union edm::ESParentContext::Parent edm::ESParentContext::parent_
private

◆ type_

Type edm::ESParentContext::type_
private
edm::ESParentContext::Type::kInvalid
edm::errors::LogicError
Definition: EDMException.h:37
edm::ESParentContext::type_
Type type_
Definition: ESParentContext.h:35
edm::ESParentContext::Type::kModule
edm::ESParentContext::Parent::esmodule
ESModuleCallingContext const * esmodule
Definition: ESParentContext.h:39
edm::ESParentContext::Type::kESModule
edm::ESParentContext::parent_
union edm::ESParentContext::Parent parent_
edm::ESParentContext::Parent::module
ModuleCallingContext const * module
Definition: ESParentContext.h:38
Exception
Definition: hltDiff.cc:245