Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
FWCore
ServiceRegistry
src
ESParentContext.cc
Go to the documentation of this file.
1
#include "
FWCore/ServiceRegistry/interface/ESParentContext.h
"
2
#include "
FWCore/ServiceRegistry/interface/ModuleCallingContext.h
"
3
#include "
FWCore/ServiceRegistry/interface/ESModuleCallingContext.h
"
4
5
#include "
FWCore/Utilities/interface/EDMException.h
"
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
21
ModuleCallingContext
const
*
ESParentContext::moduleCallingContext
()
const
{
22
if
(
type_
!=
Type::kModule
) {
23
throw
Exception
(
errors::LogicError
)
24
<<
"ESParentContext::moduleCallingContext called for incorrect type of context"
;
25
}
26
return
parent_
.
module
;
27
}
28
29
ESModuleCallingContext
const
*
ESParentContext::esmoduleCallingContext
()
const
{
30
if
(
type_
!=
Type::kESModule
) {
31
throw
Exception
(
errors::LogicError
)
32
<<
"ESParentContext::esmoduleCallingContext called for incorrect type of context"
;
33
}
34
return
parent_
.
esmodule
;
35
}
36
}
// namespace edm
edm::ESParentContext::parent_
union edm::ESParentContext::Parent parent_
edm::ESParentContext::Parent::esmodule
ESModuleCallingContext const * esmodule
Definition:
ESParentContext.h:39
edm::ESParentContext::ESParentContext
ESParentContext()
Definition:
ESParentContext.cc:11
Exception
Definition:
hltDiff.cc:245
ESParentContext.h
edm::ModuleCallingContext
Definition:
ModuleCallingContext.h:32
edm::ESParentContext::Type
Type
Definition:
ESParentContext.h:23
edm::ESModuleCallingContext
Definition:
ESModuleCallingContext.h:27
EDMException.h
edm::ESParentContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition:
ESParentContext.cc:21
edm::ESParentContext::type_
Type type_
Definition:
ESParentContext.h:35
edm::ESParentContext::Type::kESModule
edm::ESParentContext::Type::kModule
ESModuleCallingContext.h
edm::ESParentContext::esmoduleCallingContext
ESModuleCallingContext const * esmoduleCallingContext() const
Definition:
ESParentContext.cc:29
edm::ESParentContext::Parent::module
ModuleCallingContext const * module
Definition:
ESParentContext.h:38
ModuleCallingContext.h
callgraph.module
tuple module
Definition:
callgraph.py:69
edm::errors::LogicError
Definition:
EDMException.h:37
Generated for CMSSW Reference Manual by
1.8.5