SctApiDebug.h

00001 #ifndef SCTAPI_DEBUG_H
00002 #define SCTAPI_DEBUG_H
00003 
00004 #include <list>
00005 #include <string>
00006 #include <vector>
00007 
00008 // In a separate file so we don't change SctApi.h
00009 // But all the cxx files do get updated...
00010 
00011 namespace SctApi {
00015   enum DebugOptions {DEBUG_DIAG, DEBUG_DIAG2, DEBUG_DUMP_PRIM_BINARY, DEBUG_DIAG_RESPONSE, DEBUG_MODULE_CONFIG,
00016                      DEBUG_SAVE_PRIM, DEBUG_SAVE_HISTOGRAM, DEBUG_SAVE_RAW_CAPTURE, DEBUG_USE_RAW_PRIMITIVE,
00017                      DEBUG_VERBOSE_PROBE,
00018                      DEBUG_PRINT_IN_PRIM, DEBUG_PRINT_OUT_PRIM, 
00019                      DEBUG_PRINT_CALIB, DEBUG_PRINT_RAW, DEBUG_LOG_PRINT_PRIM, 
00020                      DEBUG_EXTRA_DUMPS, DEBUG_PRINT_UNKNOWN, DEBUG_BOC_SETUP, DEBUG_DUMP_RAW_EVENT, 
00021                      DEBUG_SCAN_ERROR_TRAP, DEBUG_SCAN_ERROR_TRAP_ALL, DEBUG_SCAN_AUTO_STALL, 
00022                      DEBUG_SCAN_STEP_MODE, DEBUG_SCAN_PAUSE_PULSE, 
00023                      DEBUG_SCAN_ROD_MODE_BITS, DEBUG_SCAN_USE_CCODE,
00024                      DEBUG_TIM_SCAN_STATUS, DEBUG_API_CONFIG_CACHE_CHECK, 
00025              DEBUG_API_CONFIG_CACHE_SEND, DEBUG_API_CONFIG_NO_COPY,
00026              DEBUG_CALIB_NO_SLINK, DEBUG_CALIB_RTR_STOP_OUTPUT,
00027                      // Marker
00028                      DEBUG_END_OPTIONS};
00029 
00031   class Debug {
00033     std::list<std::string> debugList;
00034 
00036     std::vector<std::string> debugOptionList;
00037 
00038     void setupDebugOptions();
00039 
00040     Debug();
00041 
00042     static Debug *instance;
00043   public:
00047     bool checkDebugOption(std::string opt) const;
00051     bool checkDebugOption(DebugOptions opt) const;
00055     void setDebugOption(std::string opt);
00059     void unsetDebugOption(std::string opt);
00063     std::list<std::string> listEnabledDebugOptions() const;
00067     std::vector<std::string> listDebugOptions() const;
00068 
00072     static Debug *getInstance();
00073   };
00074 }
00075 
00076 #endif

Generated on Mon Feb 6 14:01:28 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6