CMS 3D CMS Logo

CurrentProcessingContext.cc

Go to the documentation of this file.
00001 #include "FWCore/Framework/interface/CurrentProcessingContext.h"
00002 
00003 #include "DataFormats/Provenance/interface/ModuleDescription.h"
00004 
00005 namespace edm
00006 {
00007   CurrentProcessingContext::CurrentProcessingContext() :
00008     pathInSchedule_(0),
00009     slotInPath_(0),
00010     moduleDescription_(0),
00011     pathName_(0),
00012     isEndPath_(false)
00013   { }
00014 
00015   CurrentProcessingContext::CurrentProcessingContext(std::string const* name,
00016                                                      int bitpos,
00017                                                      bool isEndPth) :
00018     pathInSchedule_(bitpos),
00019     slotInPath_(0),
00020     moduleDescription_(0),
00021     pathName_(name),
00022     isEndPath_(isEndPth)
00023   { }
00024 
00025   std::string const*
00026   CurrentProcessingContext::moduleLabel() const
00027   {
00028     return is_active()
00029       ? &(moduleDescription_->moduleLabel_)
00030       : 0;
00031   }
00032 
00033   std::string const*
00034   CurrentProcessingContext::pathName() const
00035   {
00036     return pathName_;
00037   }
00038 
00039   ModuleDescription const*
00040   CurrentProcessingContext::moduleDescription() const
00041   {
00042     return moduleDescription_;
00043   }
00044 
00045   int
00046   CurrentProcessingContext::pathInSchedule() const
00047   {
00048     return is_active()
00049       ? pathInSchedule_
00050       : -1;
00051   }
00052 
00053 
00054   int
00055   CurrentProcessingContext::slotInPath() const
00056   {
00057     return is_active()
00058       ? static_cast<int>(slotInPath_)
00059       : -1;
00060   }
00061 
00062   bool
00063   CurrentProcessingContext::isEndPath() const
00064   {
00065     return isEndPath_;
00066   }
00067 
00068   void
00069   CurrentProcessingContext::activate(size_t theSlotInPath, 
00070                                      ModuleDescription const* mod)
00071   {
00072     assert( mod );
00073     slotInPath_     = theSlotInPath;
00074     moduleDescription_ = mod;
00075   }
00076 
00077   void
00078   CurrentProcessingContext::deactivate()
00079   {
00080     pathInSchedule_    = 0;
00081     slotInPath_        = 0;
00082     moduleDescription_ = 0;
00083     pathName_          = 0;
00084   }
00085 }

Generated on Tue Jun 9 17:35:53 2009 for CMSSW by  doxygen 1.5.4