CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 const * getTopModuleCallingContext() const
ModuleCallingContext const * moduleCallingContext() const
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription)
ESModuleCallingContext const * esmoduleCallingContext() const
ESParentContext const & parent() const
ModuleCallingContext const * getTopModuleCallingContext() const
void setContext(State state, ESParentContext const &parent)