Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

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, 
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_ASSEMBLER,
00024                      DEBUG_TIM_SCAN_STATUS, DEBUG_API_CONFIG_CACHE_CHECK, 
00025              DEBUG_API_CONFIG_CACHE_SEND,
00026                      // Marker
00027                      DEBUG_END_OPTIONS};
00028 
00030   class Debug {
00032     std::list<std::string> debugList;
00033 
00035     std::vector<std::string> debugOptionList;
00036 
00037     void setupDebugOptions();
00038 
00039     Debug();
00040 
00041     static Debug *instance;
00042   public:
00046     bool checkDebugOption(std::string opt);
00050     bool checkDebugOption(DebugOptions opt);
00054     void setDebugOption(std::string opt);
00058     void unsetDebugOption(std::string opt);
00062     std::list<std::string> listEnabledDebugOptions();
00066     std::vector<std::string> listDebugOptions();
00067 
00071     static Debug *getInstance();
00072   };
00073 }
00074 
00075 #endif

Generated on Fri Sep 16 18:01:57 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5