CMS 3D CMS Logo

ESModuleCallingContext.cc
Go to the documentation of this file.
5 
6 #include <ostream>
7 
8 namespace edm {
9 
11  std::uintptr_t id)
12  : componentDescription_(componentDescription), parent_(), id_(id), state_(State::kInvalid) {}
13 
15  std::uintptr_t id,
16  State state,
17  ESParentContext const& parent)
18  : componentDescription_(componentDescription), parent_(parent), id_(id), state_(state) {}
19 
21  state_ = state;
22  parent_ = parent;
23  }
24 
26  ESModuleCallingContext const* mcc = this;
27  while (mcc->type() == ESParentContext::Type::kESModule) {
28  mcc = mcc->esmoduleCallingContext();
29  }
31  }
32 
33  unsigned ESModuleCallingContext::depth() const {
34  unsigned depth = 0;
35  ESModuleCallingContext const* mcc = this;
36  while (mcc->type() == ESParentContext::Type::kESModule) {
37  ++depth;
38  mcc = mcc->esmoduleCallingContext();
39  }
40  return depth + mcc->moduleCallingContext()->depth();
41  }
42 
43 } // namespace edm
ModuleCallingContext const * moduleCallingContext() const
ModuleCallingContext const * getTopModuleCallingContext() const
ESModuleCallingContext const * esmoduleCallingContext() const
ESParentContext const & parent() const
ModuleCallingContext const * getTopModuleCallingContext() const noexcept
unsigned depth() const noexcept
void setContext(State state, ESParentContext const &parent)
HLT enums.
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription, std::uintptr_t id)