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, DEBUG_SCAN_STEP_MODE, DEBUG_SCAN_PAUSE_PULSE, 
00022                      DEBUG_SCAN_ROD_MODE_BITS,
00023                      DEBUG_TIM_SCAN_STATUS,
00024                      // Marker
00025                      DEBUG_END_OPTIONS};
00026 
00028   class Debug {
00030     std::list<std::string> debugList;
00031 
00033     std::vector<std::string> debugOptionList;
00034 
00035     void setupDebugOptions();
00036 
00037     Debug();
00038 
00039     static Debug *instance;
00040   public:
00044     bool checkDebugOption(std::string opt);
00048     bool checkDebugOption(DebugOptions opt);
00052     void setDebugOption(std::string opt);
00056     void unsetDebugOption(std::string opt);
00060     std::list<std::string> listEnabledDebugOptions();
00064     std::vector<std::string> listDebugOptions();
00065 
00069     static Debug *getInstance();
00070   };
00071 }
00072 
00073 #endif

Generated on Fri Jan 14 12:47:07 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5