#include <FWCore/Framework/interface/Actions.h>
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_ |
Definition at line 23 of file Actions.h.
typedef std::map<std::string, actions::ActionCodes> edm::ActionTable::ActionMap |
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.
00072 : map_() 00073 { 00074 addDefaults(); 00075 00076 install(actions::SkipEvent, map_, pset); 00077 install(actions::Rethrow, map_, pset); 00078 install(actions::IgnoreCompletely, map_, pset); 00079 install(actions::FailModule, map_, pset); 00080 install(actions::FailPath, map_, pset); 00081 }
edm::ActionTable::~ActionTable | ( | ) |
void edm::ActionTable::add | ( | const std::string & | category, | |
actions::ActionCodes | code | |||
) |
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 }
ActionMap edm::ActionTable::map_ [private] |
Definition at line 36 of file Actions.h.
Referenced by ActionTable(), add(), addDefaults(), and find().