CMS 3D CMS Logo

ESModuleCallingContext.h
Go to the documentation of this file.
1 #ifndef FWCore_ServiceRegistry_ESModuleCallingContext_h
2 #define FWCore_ServiceRegistry_ESModuleCallingContext_h
3 
13 //
14 // Original Author: W. David Dagenhart
15 // Created: 7/11/2013
16 
18 
19 #include <iosfwd>
20 #include <cstdint>
21 
22 namespace edm {
23 
24  namespace eventsetup {
25  struct ComponentDescription;
26  }
27  class ModuleCallingContext;
29  public:
31 
32  enum class State {
33  kPrefetching, // prefetching products before starting to run
34  kRunning, // module actually running
35  kInvalid
36  };
37 
38  ESModuleCallingContext(edm::eventsetup::ComponentDescription const* moduleDescription, std::uintptr_t id);
39 
41  std::uintptr_t id,
42  State state,
43  ESParentContext const& parent);
44 
46 
48 
50  State state() const { return state_; }
51  Type type() const { return parent_.type(); }
55  std::uintptr_t callID() const { return id_; }
56  ESParentContext const& parent() const { return parent_; }
59 
60  // This function will iterate up a series of linked context objects to
61  // find the highest level ModuleCallingContext.
63 
64  // Returns the number of ESModuleCallingContexts above this ESModuleCallingContext
65  // in the series of linked context objects.
66  unsigned depth() const;
67 
68  private:
71  std::uintptr_t id_;
73  };
74 } // namespace edm
75 #endif
ModuleCallingContext const * moduleCallingContext() const
ModuleCallingContext const * moduleCallingContext() const
ModuleCallingContext const * getTopModuleCallingContext() const
ESModuleCallingContext const * esmoduleCallingContext() const
ESParentContext const & parent() const
ESModuleCallingContext const * esmoduleCallingContext() const
edm::eventsetup::ComponentDescription const * componentDescription_
Type type() const noexcept
void setContext(State state, ESParentContext const &parent)
HLT enums.
edm::eventsetup::ComponentDescription const * componentDescription() const
ESModuleCallingContext(edm::eventsetup::ComponentDescription const *moduleDescription, std::uintptr_t id)