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 (edm::eventsetup::ComponentDescription const *moduleDescription)
 
 ESModuleCallingContext (edm::eventsetup::ComponentDescription const *moduleDescription, State state, ESParentContext const &parent)
 
ESModuleCallingContext const * esmoduleCallingContext () const
 
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)

Definition at line 10 of file ESModuleCallingContext.cc.

◆ ESModuleCallingContext() [2/2]

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

Definition at line 13 of file ESModuleCallingContext.cc.

ESParentContext const & parent() const
edm::eventsetup::ComponentDescription const * componentDescription_
edm::eventsetup::ComponentDescription const * componentDescription() const

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.

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().

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  }
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription)

◆ esmoduleCallingContext()

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

Definition at line 52 of file ESModuleCallingContext.h.

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

Referenced by depth(), edm::exceptionContext(), and getTopModuleCallingContext().

52 { return parent_.esmoduleCallingContext(); }
ESModuleCallingContext const * esmoduleCallingContext() const

◆ getTopModuleCallingContext()

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

Definition at line 23 of file ESModuleCallingContext.cc.

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

Referenced by FastTimerService::postESModule(), and FastTimerService::preESModule().

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

◆ moduleCallingContext()

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

Definition at line 51 of file ESModuleCallingContext.h.

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

Referenced by depth(), edm::exceptionContext(), and getTopModuleCallingContext().

51 { return parent_.moduleCallingContext(); }
ModuleCallingContext const * moduleCallingContext() const

◆ parent()

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

Definition at line 50 of file ESModuleCallingContext.h.

References parent_.

Referenced by setContext().

50 { return parent_; }

◆ setContext()

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

◆ setState()

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

◆ state()

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

Definition at line 48 of file ESModuleCallingContext.h.

References state_.

Referenced by edm::exceptionContext(), setContext(), and setState().

◆ type()

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

Definition at line 49 of file ESModuleCallingContext.h.

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

Referenced by depth(), edm::exceptionContext(), and getTopModuleCallingContext().

49 { return parent_.type(); }
Type type() const noexcept

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().