00001 #ifndef FWCore_Framework_CurrentProcessingContext 00002 #define FWCore_Framework_CurrentProcessingContext 00003 00016 00017 #include <cstddef> // for size_t 00018 #include <string> 00019 00020 #include "FWCore/Framework/interface/Frameworkfwd.h" 00021 00022 namespace edm { 00023 class CurrentProcessingContext { 00024 public: 00025 00027 CurrentProcessingContext(); 00028 00031 CurrentProcessingContext(std::string const* name, 00032 int bitpos, bool isEndPth); 00033 00037 00040 std::string const* moduleLabel() const; 00041 00042 00045 std::string const* pathName() const; 00046 00049 ModuleDescription const* moduleDescription() const; 00050 00054 int pathInSchedule() const; 00055 00058 int slotInPath() const; 00059 00061 bool isEndPath() const; 00062 00064 unsigned int unscheduledDepth() const; 00065 00067 bool isUnscheduled() const; 00068 00070 void setUnscheduledDepth(unsigned int); 00071 00073 void activate(std::size_t theSlotInPath, 00074 ModuleDescription const* mod); 00075 00077 void deactivate(); 00078 00079 private: 00080 00081 // N.B.: We own none of the pointed-to resources! 00082 int pathInSchedule_; 00083 std::size_t slotInPath_; 00084 ModuleDescription const* moduleDescription_; 00085 std::string const* pathName_; 00086 bool isEndPath_; 00087 unsigned int unscheduledDepth_; 00088 00089 bool is_active() const { return moduleDescription_ != 0; } 00090 }; 00091 } 00092 00093 00094 #endif