CMS 3D CMS Logo

ESModuleCallingContext.cc
Go to the documentation of this file.
5 
6 #include <ostream>
7 
8 namespace edm {
9 
11  : componentDescription_(componentDescription), parent_(), state_(State::kInvalid) {}
12 
14  State state,
15  ESParentContext const& parent)
16  : componentDescription_(componentDescription), parent_(parent), state_(state) {}
17 
19  state_ = state;
20  parent_ = parent;
21  }
22 
24  ESModuleCallingContext const* mcc = this;
25  while (mcc->type() == ESParentContext::Type::kESModule) {
26  mcc = mcc->esmoduleCallingContext();
27  }
29  }
30 
31  unsigned ESModuleCallingContext::depth() const {
32  unsigned depth = 0;
33  ESModuleCallingContext const* mcc = this;
34  while (mcc->type() == ESParentContext::Type::kESModule) {
35  ++depth;
36  mcc = mcc->esmoduleCallingContext();
37  }
38  return depth + mcc->moduleCallingContext()->depth();
39  }
40 
41 } // namespace edm
ModuleCallingContext.h
edm::ESModuleCallingContext
Definition: ESModuleCallingContext.h:27
edm::ESModuleCallingContext::esmoduleCallingContext
ESModuleCallingContext const * esmoduleCallingContext() const
Definition: ESModuleCallingContext.h:52
edm::ESModuleCallingContext::type
Type type() const
Definition: ESModuleCallingContext.h:49
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ESModuleCallingContext::ESModuleCallingContext
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription)
Definition: ESModuleCallingContext.cc:10
edm::ESModuleCallingContext::getTopModuleCallingContext
ModuleCallingContext const * getTopModuleCallingContext() const
Definition: ESModuleCallingContext.cc:23
EDMException.h
edm::ESParentContext::Type::kESModule
edm::ESModuleCallingContext::parent
ESParentContext const & parent() const
Definition: ESModuleCallingContext.h:50
edm::ModuleCallingContext::depth
unsigned depth() const
Definition: ModuleCallingContext.cc:66
edm::ESModuleCallingContext::state
State state() const
Definition: ESModuleCallingContext.h:48
edm::eventsetup::ComponentDescription
Definition: ComponentDescription.h:30
edm::ESModuleCallingContext::state_
State state_
Definition: ESModuleCallingContext.h:65
edm::ESModuleCallingContext::State
State
Definition: ESModuleCallingContext.h:31
edm::ESParentContext
Definition: ESParentContext.h:21
edm::ModuleCallingContext::getTopModuleCallingContext
ModuleCallingContext const * getTopModuleCallingContext() const
Definition: ModuleCallingContext.cc:52
edm::ESModuleCallingContext::setContext
void setContext(State state, ESParentContext const &parent)
Definition: ESModuleCallingContext.cc:18
ParentContext.h
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
edm::ESModuleCallingContext::depth
unsigned depth() const
Definition: ESModuleCallingContext.cc:31
edm::ESModuleCallingContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: ESModuleCallingContext.h:51
edm::ESModuleCallingContext::parent_
ESParentContext parent_
Definition: ESModuleCallingContext.h:64
class-composition.parent
parent
Definition: class-composition.py:88
ESModuleCallingContext.h
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29