Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:02

0001 #ifndef FWCore_Framework_CurrentModuleOnThread_h
0002 #define FWCore_Framework_CurrentModuleOnThread_h
0003 
0004 /** \class edm::CurrentModuleOnThread
0005 
0006 \author W. David Dagenhart, created 30 August, 2013
0007 
0008 */
0009 
0010 namespace edm {
0011 
0012   class ModuleCallingContext;
0013   class ModuleContextSentry;
0014 
0015   class CurrentModuleOnThread {
0016   public:
0017     static ModuleCallingContext const* getCurrentModuleOnThread() { return currentModuleOnThread_; }
0018 
0019   private:
0020     friend class ModuleContextSentry;
0021     static void setCurrentModuleOnThread(ModuleCallingContext const* v) { currentModuleOnThread_ = v; }
0022 
0023     static thread_local ModuleCallingContext const* currentModuleOnThread_;
0024   };
0025 }  // namespace edm
0026 #endif