CMS 3D CMS Logo

edm::ActionTable Class Reference

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

List of all members.

Public Types

typedef std::map< std::string,
actions::ActionCodes
ActionMap

Public Member Functions

 ActionTable (const ParameterSet &)
 ActionTable ()
void add (const std::string &category, actions::ActionCodes code)
actions::ActionCodes find (const std::string &category) const
 ~ActionTable ()

Private Member Functions

void addDefaults ()

Private Attributes

ActionMap map_


Detailed Description

Definition at line 23 of file Actions.h.


Member Typedef Documentation

typedef std::map<std::string, actions::ActionCodes> edm::ActionTable::ActionMap

Definition at line 25 of file Actions.h.


Constructor & Destructor Documentation

edm::ActionTable::ActionTable (  ) 

Definition at line 38 of file Actions.cc.

References addDefaults().

00038                            : map_()
00039   {
00040     addDefaults();
00041   }

edm::ActionTable::ActionTable ( const ParameterSet pset  )  [explicit]

Definition at line 72 of file Actions.cc.

References addDefaults(), edm::actions::FailModule, edm::actions::FailPath, edm::actions::IgnoreCompletely, edm::install(), map_, edm::actions::Rethrow, and edm::actions::SkipEvent.

edm::ActionTable::~ActionTable (  ) 

Definition at line 111 of file Actions.cc.

00112   {
00113   }


Member Function Documentation

void edm::ActionTable::add ( const std::string &  category,
actions::ActionCodes  code 
)

Definition at line 115 of file Actions.cc.

References map_.

00117   {
00118     map_[category] = code;
00119   }

void edm::ActionTable::addDefaults (  )  [private]

Definition at line 83 of file Actions.cc.

References TestMuL1L2Filter_cff::cerr, edm::CodedException< Code >::codeToString(), edm::debugit, lat::endl(), edm::errors::EventCorruption, edm::errors::EventTimeout, edm::errors::InvalidReference, map_, edm::errors::NotFound, edm::errors::NullPointerError, edm::errors::ProductNotFound, and edm::actions::SkipEvent.

Referenced by ActionTable().

00084   {
00085     using namespace boost::lambda;
00086     // populate defaults that are not 'Rethrow'
00087     // 'Rethrow' is the default default.
00088     map_[edm::Exception::codeToString(errors::ProductNotFound)]=
00089       actions::SkipEvent;
00090     map_[edm::Exception::codeToString(errors::InvalidReference)]=
00091       actions::SkipEvent;
00092     map_[edm::Exception::codeToString(errors::NullPointerError)]=
00093       actions::SkipEvent;
00094     map_[edm::Exception::codeToString(errors::EventTimeout)]=
00095       actions::SkipEvent;
00096     map_[edm::Exception::codeToString(errors::EventCorruption)]=
00097       actions::SkipEvent;
00098     map_[edm::Exception::codeToString(errors::NotFound)]=
00099       actions::SkipEvent;
00100 
00101     if(2 <= debugit())
00102       {
00103         ActionMap::const_iterator ib(map_.begin()),ie(map_.end());
00104         for(;ib!=ie;++ib)
00105           std::cerr << ib->first << ',' << ib->second << '\n';
00106         std::cerr << std::endl;
00107       }
00108 
00109   }

actions::ActionCodes edm::ActionTable::find ( const std::string &  category  )  const

Definition at line 121 of file Actions.cc.

References i, map_, and edm::actions::Rethrow.

Referenced by edm::Worker::doWork(), edm::Path::handleWorkerFailure(), and edm::Schedule::processOneOccurrence().

00122   {
00123     ActionMap::const_iterator i(map_.find(category));
00124     return i!=map_.end() ? i->second : actions::Rethrow;
00125   }


Member Data Documentation

ActionMap edm::ActionTable::map_ [private]

Definition at line 36 of file Actions.h.

Referenced by ActionTable(), add(), addDefaults(), and find().


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