CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::ParentContext Class Reference

#include <ParentContext.h>

Classes

union  Parent
 

Public Types

enum  Type {
  Type::kGlobal, Type::kInternal, Type::kModule, Type::kPlaceInPath,
  Type::kStream, Type::kInvalid
}
 

Public Member Functions

GlobalContext const * globalContext () const
 
InternalContext const * internalContext () const
 
bool isAtEndTransition () const
 
ModuleCallingContext const * moduleCallingContext () const
 
 ParentContext ()
 
 ParentContext (GlobalContext const *)
 
 ParentContext (InternalContext const *)
 
 ParentContext (ModuleCallingContext const *)
 
 ParentContext (PlaceInPathContext const *)
 
 ParentContext (StreamContext const *)
 
PlaceInPathContext const * placeInPathContext () const
 
StreamContext const * streamContext () const
 
Type type () const
 

Private Attributes

union edm::ParentContext::Parent parent_
 
Type type_
 

Detailed Description

Description: This is intended to be used as a member of ModuleCallingContext.

Usage:

Definition at line 27 of file ParentContext.h.

Member Enumeration Documentation

Enumerator
kGlobal 
kInternal 
kModule 
kPlaceInPath 
kStream 
kInvalid 

Definition at line 29 of file ParentContext.h.

29 { kGlobal, kInternal, kModule, kPlaceInPath, kStream, kInvalid };

Constructor & Destructor Documentation

edm::ParentContext::ParentContext ( )

Definition at line 15 of file ParentContext.cc.

References edm::ParentContext::Parent::global, and parent_.

15 : type_(Type::kInvalid) { parent_.global = nullptr; }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:52
edm::ParentContext::ParentContext ( GlobalContext const *  global)

Definition at line 17 of file ParentContext.cc.

References edm::ParentContext::Parent::global, and parent_.

17 : type_(Type::kGlobal) { parent_.global = global; }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:52
edm::ParentContext::ParentContext ( InternalContext const *  internal)

Definition at line 19 of file ParentContext.cc.

References edm::ParentContext::Parent::internal, and parent_.

20  parent_.internal = internal;
21  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:53
edm::ParentContext::ParentContext ( ModuleCallingContext const *  module)

Definition at line 23 of file ParentContext.cc.

References edm::ParentContext::Parent::module, callgraph::module, and parent_.

ModuleCallingContext const * module
Definition: ParentContext.h:54
union edm::ParentContext::Parent parent_
tuple module
Definition: callgraph.py:69
edm::ParentContext::ParentContext ( PlaceInPathContext const *  placeInPath)

Definition at line 25 of file ParentContext.cc.

References parent_, and edm::ParentContext::Parent::placeInPath.

26  parent_.placeInPath = placeInPath;
27  }
union edm::ParentContext::Parent parent_
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:55
edm::ParentContext::ParentContext ( StreamContext const *  stream)

Definition at line 29 of file ParentContext.cc.

References parent_, cms::cuda::stream, and edm::ParentContext::Parent::stream.

union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:56
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream

Member Function Documentation

GlobalContext const * edm::ParentContext::globalContext ( ) const
InternalContext const * edm::ParentContext::internalContext ( ) const

Definition at line 59 of file ParentContext.cc.

References Exception, edm::ParentContext::Parent::internal, kInternal, edm::errors::LogicError, parent_, and type_.

Referenced by edm::ModuleCallingContext::internalContext(), and edm::operator<<().

59  {
60  if (type_ != Type::kInternal) {
61  throw Exception(errors::LogicError) << "ParentContext::internalContext called for incorrect type of context";
62  }
63  return parent_.internal;
64  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:53
bool edm::ParentContext::isAtEndTransition ( ) const

Definition at line 66 of file ParentContext.cc.

References edm::ParentContext::Parent::global, isAtEndTransition(), edm::GlobalContext::isAtEndTransition(), edm::StreamContext::isAtEndTransition(), kGlobal, kModule, kPlaceInPath, kStream, edm::ParentContext::Parent::module, edm::ModuleCallingContext::parent(), parent_, edm::PlaceInPathContext::pathContext(), edm::ParentContext::Parent::placeInPath, edm::ParentContext::Parent::stream, edm::PathContext::streamContext(), and type_.

Referenced by isAtEndTransition(), edm::PuttableProductResolver::prefetchAsync_(), and edm::SwitchProducerProductResolver::prefetchAsync_().

66  {
67  switch (type_) {
68  case Type::kGlobal: {
70  }
71  case Type::kModule: {
73  }
74  case Type::kStream: {
76  }
77  case Type::kPlaceInPath: {
79  }
80  default:
81  break;
82  }
83  return false;
84  }
bool isAtEndTransition() const
Definition: GlobalContext.h:54
bool isAtEndTransition() const
ModuleCallingContext const * module
Definition: ParentContext.h:54
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:56
ParentContext const & parent() const
PathContext const * pathContext() const
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:55
bool isAtEndTransition() const
Definition: StreamContext.h:56
StreamContext const * streamContext() const
Definition: PathContext.h:31
GlobalContext const * global
Definition: ParentContext.h:52
ModuleCallingContext const * edm::ParentContext::moduleCallingContext ( ) const

Definition at line 31 of file ParentContext.cc.

References Exception, kModule, edm::errors::LogicError, edm::ParentContext::Parent::module, parent_, and type_.

Referenced by edm::ModuleCallingContext::moduleCallingContext(), and edm::operator<<().

31  {
32  if (type_ != Type::kModule) {
33  throw Exception(errors::LogicError) << "ParentContext::moduleCallingContext called for incorrect type of context";
34  }
35  return parent_.module;
36  }
ModuleCallingContext const * module
Definition: ParentContext.h:54
union edm::ParentContext::Parent parent_
PlaceInPathContext const * edm::ParentContext::placeInPathContext ( ) const

Definition at line 38 of file ParentContext.cc.

References Exception, kPlaceInPath, edm::errors::LogicError, parent_, edm::ParentContext::Parent::placeInPath, and type_.

Referenced by edm::operator<<(), and edm::ModuleCallingContext::placeInPathContext().

38  {
39  if (type_ != Type::kPlaceInPath) {
40  throw Exception(errors::LogicError) << "ParentContext::placeInPathContext called for incorrect type of context";
41  }
42  return parent_.placeInPath;
43  }
union edm::ParentContext::Parent parent_
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:55
StreamContext const * edm::ParentContext::streamContext ( ) const

Definition at line 45 of file ParentContext.cc.

References Exception, kStream, edm::errors::LogicError, parent_, edm::ParentContext::Parent::stream, and type_.

Referenced by edm::operator<<(), and edm::ModuleCallingContext::streamContext().

45  {
46  if (type_ != Type::kStream) {
47  throw Exception(errors::LogicError) << "ParentContext::streamContext called for incorrect type of context";
48  }
49  return parent_.stream;
50  }
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:56
Type edm::ParentContext::type ( ) const
inline

Definition at line 38 of file ParentContext.h.

References type_.

Referenced by edm::operator<<(), and edm::ModuleCallingContext::type().

38 { return type_; }

Member Data Documentation

union edm::ParentContext::Parent edm::ParentContext::parent_
private
Type edm::ParentContext::type_
private