CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::CurrentProcessingContext Class Reference

#include <CurrentProcessingContext.h>

Public Member Functions

void activate (std::size_t theSlotInPath, ModuleDescription const *mod)
 Set the context to reflect the active state. More...
 
 CurrentProcessingContext ()
 Default-constructed objects reflect the inactive state. More...
 
 CurrentProcessingContext (std::string const *name, int bitpos, bool isEndPth)
 
void deactivate ()
 Set all data to reflect inactive state. More...
 
bool isEndPath () const
 Return true if the path is an end path, and false otherwise. More...
 
bool isUnscheduled () const
 Returns true if the module is being called via unscheduled execution. More...
 
ModuleDescription const * moduleDescription () const
 
std::string const * moduleLabel () const
 
int pathInSchedule () const
 
std::string const * pathName () const
 
void setUnscheduledDepth (unsigned int)
 Set the depth in a series of unscheduled callbacks. More...
 
int slotInPath () const
 
unsigned int unscheduledDepth () const
 Returns 0 if module is on the path and >0 when the module executing is unscheduled. More...
 

Private Member Functions

bool is_active () const
 

Private Attributes

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

Detailed Description

Definition at line 23 of file CurrentProcessingContext.h.

Constructor & Destructor Documentation

edm::CurrentProcessingContext::CurrentProcessingContext ( )

Default-constructed objects reflect the inactive state.

Definition at line 6 of file CurrentProcessingContext.cc.

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.

Member Function Documentation

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

Set the context to reflect the active state.

Definition at line 79 of file CurrentProcessingContext.cc.

References mod(), moduleDescription_, and slotInPath_.

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

80  {
81  assert( mod );
82  slotInPath_ = theSlotInPath;
84  }
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
ModuleDescription const * moduleDescription_
void edm::CurrentProcessingContext::deactivate ( )

Set all data to reflect inactive state.

Definition at line 87 of file CurrentProcessingContext.cc.

References moduleDescription_, pathInSchedule_, pathName_, and slotInPath_.

bool edm::CurrentProcessingContext::is_active ( ) const
inlineprivate

Definition at line 89 of file CurrentProcessingContext.h.

References moduleDescription_.

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

89 { return moduleDescription_ != 0; }
ModuleDescription const * moduleDescription_
bool edm::CurrentProcessingContext::isEndPath ( ) const

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

Definition at line 59 of file CurrentProcessingContext.cc.

References isEndPath_.

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

59  {
60  return isEndPath_;
61  }
bool edm::CurrentProcessingContext::isUnscheduled ( ) const

Returns true if the module is being called via unscheduled execution.

Definition at line 69 of file CurrentProcessingContext.cc.

References unscheduledDepth().

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

69  {
70  return 0 != unscheduledDepth();
71  }
unsigned int unscheduledDepth() const
Returns 0 if module is on the path and &gt;0 when the module executing is unscheduled.
ModuleDescription const * edm::CurrentProcessingContext::moduleDescription ( ) const

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

Definition at line 39 of file CurrentProcessingContext.cc.

References moduleDescription_.

Referenced by edm::Path::exceptionContext(), and edm::OutputModule::getTriggerResults().

39  {
40  return moduleDescription_;
41  }
ModuleDescription const * moduleDescription_
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 27 of file CurrentProcessingContext.cc.

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

Referenced by HLTFilter::moduleLabel(), and HLTHighLevel::moduleLabel().

27  {
28  return is_active()
30  : 0;
31  }
std::string const & moduleLabel() const
ModuleDescription const * moduleDescription_
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 44 of file CurrentProcessingContext.cc.

References is_active(), and pathInSchedule_.

Referenced by HLTFilter::path(), and HLTFilter::pmid().

44  {
45  return is_active()
47  : -1;
48  }
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 edm::Path::exceptionContext(), HLTPrescaler::filter(), HLTFilter::pathName(), and HLTHighLevel::pathName().

34  {
35  return pathName_;
36  }
void edm::CurrentProcessingContext::setUnscheduledDepth ( unsigned int  iDepth)

Set the depth in a series of unscheduled callbacks.

Definition at line 74 of file CurrentProcessingContext.cc.

References unscheduledDepth_.

Referenced by edm::UnscheduledHandler::tryToFill().

74  {
75  unscheduledDepth_ = iDepth;
76  }
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 52 of file CurrentProcessingContext.cc.

References is_active(), and slotInPath_.

Referenced by HLTFilter::module(), and HLTFilter::pmid().

52  {
53  return is_active()
54  ? static_cast<int>(slotInPath_)
55  : -1;
56  }
unsigned int edm::CurrentProcessingContext::unscheduledDepth ( ) const

Returns 0 if module is on the path and >0 when the module executing is unscheduled.

Definition at line 64 of file CurrentProcessingContext.cc.

References unscheduledDepth_.

Referenced by isUnscheduled(), and edm::UnscheduledHandler::tryToFill().

64  {
65  return unscheduledDepth_;
66  }

Member Data Documentation

bool edm::CurrentProcessingContext::isEndPath_
private

Definition at line 86 of file CurrentProcessingContext.h.

Referenced by isEndPath().

ModuleDescription const* edm::CurrentProcessingContext::moduleDescription_
private
int edm::CurrentProcessingContext::pathInSchedule_
private

Definition at line 82 of file CurrentProcessingContext.h.

Referenced by deactivate(), and pathInSchedule().

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

Definition at line 85 of file CurrentProcessingContext.h.

Referenced by deactivate(), and pathName().

std::size_t edm::CurrentProcessingContext::slotInPath_
private

Definition at line 83 of file CurrentProcessingContext.h.

Referenced by activate(), deactivate(), and slotInPath().

unsigned int edm::CurrentProcessingContext::unscheduledDepth_
private

Definition at line 87 of file CurrentProcessingContext.h.

Referenced by setUnscheduledDepth(), and unscheduledDepth().