CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Definition at line 29 of file ESModuleCallingContext.h.

Member Enumeration Documentation

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

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

Definition at line 10 of file ESModuleCallingContext.cc.

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

Member Function Documentation

edm::eventsetup::ComponentDescription const* edm::ESModuleCallingContext::componentDescription ( ) const
inline
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 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
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().

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 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
ESParentContext const& edm::ESModuleCallingContext::parent ( void  ) const
inline

Definition at line 50 of file ESModuleCallingContext.h.

References parent_.

Referenced by BeautifulSoup.PageElement::_invert(), and setContext().

50 { return parent_; }
void edm::ESModuleCallingContext::setContext ( State  state,
ESParentContext const &  parent 
)
void edm::ESModuleCallingContext::setState ( State  state)
inline
State edm::ESModuleCallingContext::state ( ) const
inline

Definition at line 48 of file ESModuleCallingContext.h.

References state_.

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

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

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

Definition at line 63 of file ESModuleCallingContext.h.

Referenced by componentDescription().

ESParentContext edm::ESModuleCallingContext::parent_
private
State edm::ESModuleCallingContext::state_
private

Definition at line 65 of file ESModuleCallingContext.h.

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