CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/FWCore/Framework/interface/Actions.h

Go to the documentation of this file.
00001 #ifndef Framework_Actions_h
00002 #define Framework_Actions_h
00003 
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 
00006 #include <string>
00007 #include <map>
00008 
00009 namespace edm {
00010   namespace actions {
00011     enum ActionCodes {
00012         IgnoreCompletely=0,
00013         Rethrow,
00014         SkipEvent,
00015         FailModule,
00016         FailPath,
00017         LastCode
00018     };
00019 
00020     const char* actionName(ActionCodes code);
00021   }
00022 
00023   class ActionTable {
00024   public:
00025     typedef std::map<std::string, actions::ActionCodes> ActionMap;
00026 
00027     ActionTable();
00028     explicit ActionTable(const ParameterSet&);
00029     ~ActionTable();
00030 
00031     void add(const std::string& category, actions::ActionCodes code);
00032     actions::ActionCodes find(const std::string& category) const;
00033 
00034   private:
00035     void addDefaults();
00036     ActionMap map_;
00037   };
00038 }
00039 #endif