CMS 3D CMS Logo

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

#include <ESModuleCallingContext.h>

Public Types

enum  State { State::kPrefetching, State::kRunning, State::kInvalid }
 
using Type = ESParentContext::Type
 

Public Member Functions

edm::eventsetup::ComponentDescription const * componentDescription () const
 
unsigned depth () const
 
ESModuleCallingContext const * esmoduleCallingContext () const
 
 ESModuleCallingContext (edm::eventsetup::ComponentDescription const *moduleDescription)
 
 ESModuleCallingContext (edm::eventsetup::ComponentDescription const *moduleDescription, State state, ESParentContext const &parent)
 
ModuleCallingContext const * getTopModuleCallingContext () const
 
ModuleCallingContext const * moduleCallingContext () const
 
ESParentContext const & parent () const
 
void setContext (State state, ESParentContext const &parent)
 
void setState (State state)
 
State state () const
 
Type type () const
 

Private Attributes

edm::eventsetup::ComponentDescription const * componentDescription_
 
ESParentContext parent_
 
State state_
 

Detailed Description

Description: This is intended primarily to be passed to Services as an argument to their callback functions.

Usage:

Definition at line 27 of file ESModuleCallingContext.h.

Member Typedef Documentation

◆ Type

Definition at line 29 of file ESModuleCallingContext.h.

Member Enumeration Documentation

◆ State

Enumerator
kPrefetching 
kRunning 
kInvalid 

Definition at line 31 of file ESModuleCallingContext.h.

31  {
32  kPrefetching, // prefetching products before starting to run
33  kRunning, // module actually running
34  kInvalid
35  };

Constructor & Destructor Documentation

◆ ESModuleCallingContext() [1/2]

edm::ESModuleCallingContext::ESModuleCallingContext ( edm::eventsetup::ComponentDescription const *  moduleDescription)

◆ ESModuleCallingContext() [2/2]

edm::ESModuleCallingContext::ESModuleCallingContext ( edm::eventsetup::ComponentDescription const *  moduleDescription,
State  state,
ESParentContext const &  parent 
)

Member Function Documentation

◆ componentDescription()

edm::eventsetup::ComponentDescription const* edm::ESModuleCallingContext::componentDescription ( ) const
inline

◆ depth()

unsigned edm::ESModuleCallingContext::depth ( void  ) const

Definition at line 31 of file ESModuleCallingContext.cc.

31  {
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  }

References edm::ModuleCallingContext::depth(), esmoduleCallingContext(), edm::ESParentContext::kESModule, moduleCallingContext(), and type().

Referenced by edm::service::Tracer::postESModule(), edm::service::Tracer::postESModulePrefetching(), edm::service::Tracer::preESModule(), and edm::service::Tracer::preESModulePrefetching().

◆ esmoduleCallingContext()

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

◆ getTopModuleCallingContext()

ModuleCallingContext const * edm::ESModuleCallingContext::getTopModuleCallingContext ( ) const

Definition at line 23 of file ESModuleCallingContext.cc.

23  {
24  ESModuleCallingContext const* mcc = this;
25  while (mcc->type() == ESParentContext::Type::kESModule) {
26  mcc = mcc->esmoduleCallingContext();
27  }
28  return mcc->moduleCallingContext()->getTopModuleCallingContext();
29  }

References esmoduleCallingContext(), edm::ModuleCallingContext::getTopModuleCallingContext(), edm::ESParentContext::kESModule, moduleCallingContext(), and type().

◆ moduleCallingContext()

ModuleCallingContext const* edm::ESModuleCallingContext::moduleCallingContext ( ) const
inline

◆ parent()

ESParentContext const& edm::ESModuleCallingContext::parent ( void  ) const
inline

Definition at line 50 of file ESModuleCallingContext.h.

50 { return parent_; }

References parent_.

Referenced by setContext().

◆ setContext()

void edm::ESModuleCallingContext::setContext ( State  state,
ESParentContext const &  parent 
)

Definition at line 18 of file ESModuleCallingContext.cc.

18  {
19  state_ = state;
20  parent_ = parent;
21  }

References parent(), parent_, state(), and state_.

Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::prefetchAsync().

◆ setState()

void edm::ESModuleCallingContext::setState ( State  state)
inline

◆ state()

State edm::ESModuleCallingContext::state ( ) const
inline

Definition at line 48 of file ESModuleCallingContext.h.

48 { return state_; }

References state_.

Referenced by setContext(), and setState().

◆ type()

Type edm::ESModuleCallingContext::type ( ) const
inline

Definition at line 49 of file ESModuleCallingContext.h.

49 { return parent_.type(); }

References parent_, and edm::ESParentContext::type().

Referenced by depth(), and getTopModuleCallingContext().

Member Data Documentation

◆ componentDescription_

edm::eventsetup::ComponentDescription const* edm::ESModuleCallingContext::componentDescription_
private

Definition at line 63 of file ESModuleCallingContext.h.

Referenced by componentDescription().

◆ parent_

ESParentContext edm::ESModuleCallingContext::parent_
private

◆ state_

State edm::ESModuleCallingContext::state_
private

Definition at line 65 of file ESModuleCallingContext.h.

Referenced by setContext(), setState(), and state().

edm::ESParentContext::type
Type type() const noexcept
Definition: ESParentContext.h:29
edm::ESModuleCallingContext::ESModuleCallingContext
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription)
Definition: ESModuleCallingContext.cc:10
edm::ESParentContext::Type::kESModule
edm::ESModuleCallingContext::parent
ESParentContext const & parent() const
Definition: ESModuleCallingContext.h:50
edm::ESModuleCallingContext::state
State state() const
Definition: ESModuleCallingContext.h:48
edm::ESParentContext::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: ESParentContext.cc:21
edm::ESModuleCallingContext::state_
State state_
Definition: ESModuleCallingContext.h:65
edm::ESModuleCallingContext::componentDescription_
edm::eventsetup::ComponentDescription const * componentDescription_
Definition: ESModuleCallingContext.h:63
edm::ESModuleCallingContext::State::kInvalid
edm::ESModuleCallingContext::depth
unsigned depth() const
Definition: ESModuleCallingContext.cc:31
edm::ESModuleCallingContext::componentDescription
edm::eventsetup::ComponentDescription const * componentDescription() const
Definition: ESModuleCallingContext.h:47
edm::ESModuleCallingContext::parent_
ESParentContext parent_
Definition: ESModuleCallingContext.h:64
edm::ESParentContext::esmoduleCallingContext
ESModuleCallingContext const * esmoduleCallingContext() const
Definition: ESParentContext.cc:29