CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

edm::ActionTable Class Reference

#include <Actions.h>

List of all members.

Public Types

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

Public Member Functions

 ActionTable ()
 ActionTable (const ParameterSet &)
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 22 of file Actions.h.


Member Typedef Documentation

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

Definition at line 24 of file Actions.h.


Constructor & Destructor Documentation

edm::ActionTable::ActionTable ( )

Definition at line 32 of file Actions.cc.

References addDefaults().

                           : map_() {
    addDefaults();
  }
edm::ActionTable::ActionTable ( const ParameterSet pset) [explicit]
edm::ActionTable::~ActionTable ( )

Definition at line 86 of file Actions.cc.

                            {
  }

Member Function Documentation

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

Definition at line 89 of file Actions.cc.

References python::rootplot::argparse::category, and map_.

                                                                          {
    map_[category] = code;
  }
void edm::ActionTable::addDefaults ( ) [private]

Definition at line 72 of file Actions.cc.

References benchmark_cfg::cerr, edm::debugit, and map_.

Referenced by ActionTable().

                                {
    using namespace boost::lambda;
    // populate defaults that are not 'Rethrow'
    // (There are none as of CMSSW_3_4_X.)
    // 'Rethrow' is the default default.
    if(2 <= debugit()) {
        ActionMap::const_iterator ib(map_.begin()),ie(map_.end());
        for(;ib != ie; ++ib) {
          std::cerr << ib->first << ',' << ib->second << '\n';
        }
        std::cerr << std::endl;
    }
  }
actions::ActionCodes edm::ActionTable::find ( const std::string &  category) const

Definition at line 93 of file Actions.cc.

References i, map_, and reco_skim_cfg_mod::Rethrow.

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

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

Member Data Documentation

Definition at line 35 of file Actions.h.

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