CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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         FailPath,
00016         LastCode
00017     };
00018 
00019     const char* actionName(ActionCodes code);
00020   }
00021 
00022   class ActionTable {
00023   public:
00024     typedef std::map<std::string, actions::ActionCodes> ActionMap;
00025 
00026     ActionTable();
00027     explicit ActionTable(const ParameterSet&);
00028     ~ActionTable();
00029 
00030     void add(const std::string& category, actions::ActionCodes code);
00031     actions::ActionCodes find(const std::string& category) const;
00032 
00033   private:
00034     void addDefaults();
00035     ActionMap map_;
00036   };
00037 }
00038 #endif