CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CurrentProcessingContext.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_CurrentProcessingContext
2 #define FWCore_Framework_CurrentProcessingContext
3 
16 
17 #include <cstddef> // for size_t
18 #include <string>
19 
21 
22 namespace edm {
24  public:
25 
28 
31  CurrentProcessingContext(std::string const* name,
32  int bitpos, bool isEndPth);
33 
37 
40  std::string const* moduleLabel() const;
41 
42 
45  std::string const* pathName() const;
46 
49  ModuleDescription const* moduleDescription() const;
50 
54  int pathInSchedule() const;
55 
58  int slotInPath() const;
59 
61  bool isEndPath() const;
62 
64  unsigned int unscheduledDepth() const;
65 
67  bool isUnscheduled() const;
68 
70  void setUnscheduledDepth(unsigned int);
71 
73  void activate(std::size_t theSlotInPath,
74  ModuleDescription const* mod);
75 
77  void deactivate();
78 
79  private:
80 
81  // N.B.: We own none of the pointed-to resources!
83  std::size_t slotInPath_;
85  std::string const* pathName_;
86  bool isEndPath_;
87  unsigned int unscheduledDepth_;
88 
89  bool is_active() const { return moduleDescription_ != 0; }
90  };
91 }
92 
93 
94 #endif
bool isEndPath() const
Return true if the path is an end path, and false otherwise.
ModuleDescription const * moduleDescription() const
std::string const * moduleLabel() const
void deactivate()
Set all data to reflect inactive state.
bool isUnscheduled() const
Returns true if the module is being called via unscheduled execution.
void activate(std::size_t theSlotInPath, ModuleDescription const *mod)
Set the context to reflect the active state.
void setUnscheduledDepth(unsigned int)
Set the depth in a series of unscheduled callbacks.
CurrentProcessingContext()
Default-constructed objects reflect the inactive state.
unsigned int unscheduledDepth() const
Returns 0 if module is on the path and &gt;0 when the module executing is unscheduled.
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
ModuleDescription const * moduleDescription_
std::string const * pathName() const