CMS 3D CMS Logo

ParentContext.h
Go to the documentation of this file.
1 #ifndef FWCore_ServiceRegistry_ParentContext_h
2 #define FWCore_ServiceRegistry_ParentContext_h
3 
13 //
14 // Original Author: W. David Dagenhart
15 // Created: 7/11/2013
16 
17 #include <iosfwd>
18 
19 namespace edm {
20 
21  class GlobalContext;
22  class InternalContext;
23  class ModuleCallingContext;
24  class PlaceInPathContext;
25  class StreamContext;
26 
27  class ParentContext {
28  public:
29 
30  enum class Type {
31  kGlobal,
32  kInternal,
33  kModule,
35  kStream,
36  kInvalid
37  };
38 
39  ParentContext();
45 
46  Type type() const { return type_; }
47 
48  bool isAtEndTransition() const;
49 
50  GlobalContext const* globalContext() const;
51  InternalContext const* internalContext() const;
54  StreamContext const* streamContext() const;
55 
56  private:
58 
59  union Parent {
61  InternalContext const* internal;
65  } parent_;
66  };
67 
68  std::ostream& operator<<(std::ostream&, ParentContext const&);
69 }
70 #endif
Type type() const
Definition: ParentContext.h:46
bool isAtEndTransition() const
ModuleCallingContext const * module
Definition: ParentContext.h:62
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:64
ModuleCallingContext const * moduleCallingContext() const
PlaceInPathContext const * placeInPathContext() const
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:63
InternalContext const * internalContext() const
StreamContext const * streamContext() const
HLT enums.
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
GlobalContext const * globalContext() const
GlobalContext const * global
Definition: ParentContext.h:60