CMS 3D CMS Logo

edm::CurrentProcessingContext Class Reference

#include <FWCore/Framework/interface/CurrentProcessingContext.h>

List of all members.

Public Member Functions

void activate (std::size_t theSlotInPath, ModuleDescription const *mod)
 Set the context to reflect the active state.
 CurrentProcessingContext (std::string const *name, int bitpos, bool isEndPth)
 Create a CurrentProcessingContext ready to handle the Path with given name and bit position (slot in Schedule).
 CurrentProcessingContext ()
 Default-constructed objects reflect the inactive state.
void deactivate ()
 Set all data to reflect inactive state.
bool isEndPath () const
 Return true if the path is an end path, and false otherwise.
ModuleDescription const * moduleDescription () const
 Return the address of the ModuleDescription describing this module if active, and null otherwise.
std::string const * moduleLabel () const
 The compiler-generated copy c'tor and d'tor are correct, because all our resources are contained by value.
int pathInSchedule () const
 Return the slot number of this path in the schedule (this is the bit position of the path) if the path is active, and -1 otherwise.
std::string const * pathName () const
 Return the name of the current path if the module is active, and null otherwise.
int slotInPath () const
 Return the slot number of this module in the path if the path is active, and -1 otherwise.

Private Member Functions

bool is_active () const

Private Attributes

bool isEndPath_
ModuleDescription const * moduleDescription_
int pathInSchedule_
std::string const * pathName_
std::size_t slotInPath_


Detailed Description

Definition at line 24 of file CurrentProcessingContext.h.


Constructor & Destructor Documentation

edm::CurrentProcessingContext::CurrentProcessingContext (  ) 

Default-constructed objects reflect the inactive state.

Definition at line 7 of file CurrentProcessingContext.cc.

00007                                                      :
00008     pathInSchedule_(0),
00009     slotInPath_(0),
00010     moduleDescription_(0),
00011     pathName_(0),
00012     isEndPath_(false)
00013   { }

edm::CurrentProcessingContext::CurrentProcessingContext ( std::string const *  name,
int  bitpos,
bool  isEndPth 
)

Create a CurrentProcessingContext ready to handle the Path with given name and bit position (slot in Schedule).

Definition at line 15 of file CurrentProcessingContext.cc.

00017                                                                     :
00018     pathInSchedule_(bitpos),
00019     slotInPath_(0),
00020     moduleDescription_(0),
00021     pathName_(name),
00022     isEndPath_(isEndPth)
00023   { }


Member Function Documentation

void edm::CurrentProcessingContext::activate ( std::size_t  theSlotInPath,
ModuleDescription const *  mod 
)

Set the context to reflect the active state.

Referenced by edm::Path::processOneOccurrence().

void edm::CurrentProcessingContext::deactivate (  ) 

Set all data to reflect inactive state.

Definition at line 78 of file CurrentProcessingContext.cc.

References moduleDescription_, pathInSchedule_, pathName_, and slotInPath_.

00079   {
00080     pathInSchedule_    = 0;
00081     slotInPath_        = 0;
00082     moduleDescription_ = 0;
00083     pathName_          = 0;
00084   }

bool edm::CurrentProcessingContext::is_active (  )  const [inline, private]

Definition at line 81 of file CurrentProcessingContext.h.

References moduleDescription_.

Referenced by moduleLabel(), pathInSchedule(), and slotInPath().

00081 { return moduleDescription_ != 0; }

bool edm::CurrentProcessingContext::isEndPath (  )  const

Return true if the path is an end path, and false otherwise.

Definition at line 63 of file CurrentProcessingContext.cc.

References isEndPath_.

Referenced by edm::Worker::doWork().

00064   {
00065     return isEndPath_;
00066   }

ModuleDescription const * edm::CurrentProcessingContext::moduleDescription (  )  const

Return the address of the ModuleDescription describing this module if active, and null otherwise.

Definition at line 40 of file CurrentProcessingContext.cc.

References moduleDescription_.

Referenced by edm::OutputModule::getTriggerResults().

00041   {
00042     return moduleDescription_;
00043   }

std::string const * edm::CurrentProcessingContext::moduleLabel (  )  const

The compiler-generated copy c'tor and d'tor are correct, because all our resources are contained by value.

We do not own the resources to which we point; we own only the pointers. Return the address of the moduleLabel if the module is active, and null otherwise.

Definition at line 26 of file CurrentProcessingContext.cc.

References is_active(), moduleDescription_, and edm::ModuleDescription::moduleLabel_.

Referenced by moduleLabel().

00027   {
00028     return is_active()
00029       ? &(moduleDescription_->moduleLabel_)
00030       : 0;
00031   }

int edm::CurrentProcessingContext::pathInSchedule (  )  const

Return the slot number of this path in the schedule (this is the bit position of the path) if the path is active, and -1 otherwise.

Definition at line 46 of file CurrentProcessingContext.cc.

References is_active(), and pathInSchedule_.

Referenced by path(), and pmid().

00047   {
00048     return is_active()
00049       ? pathInSchedule_
00050       : -1;
00051   }

std::string const * edm::CurrentProcessingContext::pathName (  )  const

Return the name of the current path if the module is active, and null otherwise.

Definition at line 34 of file CurrentProcessingContext.cc.

References pathName_.

Referenced by pathName().

00035   {
00036     return pathName_;
00037   }

int edm::CurrentProcessingContext::slotInPath (  )  const

Return the slot number of this module in the path if the path is active, and -1 otherwise.

Definition at line 55 of file CurrentProcessingContext.cc.

References is_active(), and slotInPath_.

Referenced by module(), and pmid().

00056   {
00057     return is_active()
00058       ? static_cast<int>(slotInPath_)
00059       : -1;
00060   }


Member Data Documentation

bool edm::CurrentProcessingContext::isEndPath_ [private]

Definition at line 79 of file CurrentProcessingContext.h.

Referenced by isEndPath().

ModuleDescription const* edm::CurrentProcessingContext::moduleDescription_ [private]

Definition at line 77 of file CurrentProcessingContext.h.

Referenced by deactivate(), is_active(), moduleDescription(), and moduleLabel().

int edm::CurrentProcessingContext::pathInSchedule_ [private]

Definition at line 75 of file CurrentProcessingContext.h.

Referenced by deactivate(), and pathInSchedule().

std::string const* edm::CurrentProcessingContext::pathName_ [private]

Definition at line 78 of file CurrentProcessingContext.h.

Referenced by deactivate(), and pathName().

std::size_t edm::CurrentProcessingContext::slotInPath_ [private]

Definition at line 76 of file CurrentProcessingContext.h.

Referenced by deactivate(), and slotInPath().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:39:56 2009 for CMSSW by  doxygen 1.5.4