Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:53

0001 #ifndef ATOOLS_Org_Return_Value_H
0002 #define ATOOLS_Org_Return_Value_H
0003 
0004 #include <string>
0005 #include <map>
0006 
0007 namespace ATOOLS {  
0008 
0009   typedef std::map<std::string,unsigned long int> Counter_Map;
0010 
0011   class Return_Value {
0012   private:
0013     static Counter_Map s_warning_counter;
0014     static Counter_Map s_error_counter;
0015     static Counter_Map s_retry_method_counter;
0016     static Counter_Map s_retry_phase_counter;
0017     static Counter_Map s_retry_event_counter;
0018     static Counter_Map s_new_event_counter;
0019     static Counter_Map s_call_counter;
0020     static void PrintSingleStatistics
0021     (std::ostream &str,const std::string &type,
0022      const Counter_Map &map);
0023   public:
0024     static void PrintStatistics(std::ostream &str);
0025     static void IncWarning(const std::string &);
0026     static void IncError(const std::string &);
0027     static void IncRetryMethod(const std::string &);
0028     static void IncRetryPhase(const std::string &);
0029     static void IncRetryEvent(const std::string &);
0030     static void IncNewEvent(const std::string &);
0031     static void IncCall(const std::string &);
0032     enum code {
0033       Error        = -10,
0034       Failure      = -1,
0035       Undefined    = 0,
0036       Success      = 1,
0037       Nothing      = 2,
0038       Warning      = 10,
0039       Retry_Method = 20,
0040       Retry_Phase  = 21,
0041       Retry_Event  = 22,
0042       New_Event    = 100
0043     };
0044   };
0045 
0046   std::ostream &operator<<(std::ostream &str,const Return_Value::code &rvc);
0047 
0048 }
0049 #endif