- Timestamp:
- 04/01/09 14:39:16 (16 years ago)
- Location:
- drsdaq
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
drsdaq/DAQReadout.cc
r22 r27 11 11 #include "DAQReadout.h" 12 12 13 static c har* daq_state_str[] = {"active", "stopped"};14 static c har* daq_runtype_str[] = {"data", "pedestal", "test"};15 16 static struct CL_Struct {char *Name;13 static const char* daq_state_str[] = {"active", "stopped"}; 14 static const char* daq_runtype_str[] = {"data", "pedestal", "test"}; 15 16 static const struct CL_Struct { const char *Name; 17 17 void (DAQReadout::*CommandPointer)(); 18 18 bool NeedNotBusy; 19 c har *Parameters;20 c har *Help;19 const char *Parameters; 20 const char *Help; 21 21 } CommandList[] = 22 22 {{"board", &DAQReadout::cmd_board, true, "<i> [j] | <all>" ,"Address board i, boards i-j, all boards"}, … … 379 379 void DAQReadout::cmd_calib() { 380 380 if (NParam==4 && atof(Param[1]) && atof(Param[2])) 381 CalibrateDRS( Param[3],atof(Param[1]),atof(Param[2]));381 CalibrateDRS((char *) Param[3],atof(Param[1]),atof(Param[2])); 382 382 else if (NParam==3 && atof(Param[1]) && atof(Param[2])) 383 383 CalibrateDRS(NULL,atof(Param[1]),atof(Param[2])); … … 1059 1059 1060 1060 // Print message to selected target 1061 void DAQReadout::PrintMessage(int Target, c har *Format, ...) {1061 void DAQReadout::PrintMessage(int Target, const char *Format, ...) { 1062 1062 va_list ArgumentPointer; 1063 1063 va_start(ArgumentPointer, Format); … … 1067 1067 1068 1068 // Print message to screen, log file and socket 1069 void DAQReadout::PrintMessage(c har *Format, ...) {1069 void DAQReadout::PrintMessage(const char *Format, ...) { 1070 1070 va_list ArgumentPointer; 1071 1071 va_start(ArgumentPointer, Format); … … 1075 1075 1076 1076 // Function doing the actual printing work 1077 void DAQReadout::PrintMessage(int Target, c har *Format, va_list ArgumentPointer) {1077 void DAQReadout::PrintMessage(int Target, const char *Format, va_list ArgumentPointer) { 1078 1078 1079 1079 char Textbuffer[MAX_COM_SIZE]; … … 1112 1112 1113 1113 // Check if two strings match (min 1 character must match) 1114 int Match(char *str,char *cmd) {1115 return strncasecmp(str,cmd,strlen(str)==0 ? 1:strlen(str)) ? 0:1;1114 bool Match(const char *str, const char *cmd) { 1115 return strncasecmp(str,cmd,strlen(str)==0 ? 1:strlen(str)) ? false:true; 1116 1116 } 1117 1117 … … 1125 1125 1126 1126 // Parse command line for white space and double-quote separated tokens 1127 int ParseInput(char* Command, c har *Param[]) {1127 int ParseInput(char* Command, const char *Param[]) { 1128 1128 int Count=0; 1129 1129 … … 1146 1146 1147 1147 // ReadCard function by F. Goebel 1148 int ReadCard(c har *card_flag, void *store, char type, FILE *fptr) {1148 int ReadCard(const char *card_flag, void *store, char type, FILE *fptr) { 1149 1149 1150 1150 char *card_name, *card_val, line[160]; -
drsdaq/DAQReadout.h
r22 r27 4 4 #include <stdlib.h> 5 5 #include <stdarg.h> 6 #include <ctype.h> 6 7 #include <time.h> 7 8 #include <errno.h> … … 60 61 // Status variables 61 62 int NParam; // Number of parameters 62 c har *Param[MAX_NUM_TOKEN]; // Pointers to parameters63 const char *Param[MAX_NUM_TOKEN]; // Pointers to parameters 63 64 bool CmdFromSocket; // Current command issued via socket 64 65 int NumCMCBoards; … … 121 122 void ReadCalibratedDRSData(); 122 123 void ReadandPrintDRSData(int, int, int); 123 void PrintMessage(int, c har*, ...);124 void PrintMessage(c har*, ...);125 void PrintMessage(int, c har*, va_list);124 void PrintMessage(int, const char*, ...); 125 void PrintMessage(const char*, ...); 126 void PrintMessage(int, const char*, va_list); 126 127 bool OpenRawFile(int); 127 128 void WriteRunHeader(); … … 131 132 132 133 void DAQ(DAQReadout *); 133 int Match(char*,char*);134 int ParseInput(char*, c har *Param[]);134 bool Match(const char*, const char*); 135 int ParseInput(char*, const char *Param[]); 135 136 int CheckDisk(char*); 136 int ReadCard(c har *, void *, char, FILE *);137 int ReadCard(const char *, void *, char, FILE *); 137 138 138 139 #endif -
drsdaq/HVFeedback.cc
r22 r27 256 256 257 257 // Write commmand to socket 258 bool HVFeedback::WriteHVCommand(c har *Format, ...) {258 bool HVFeedback::WriteHVCommand(const char *Format, ...) { 259 259 char Textbuffer[MAX_COM_SIZE]; 260 260 fd_set SelectDescriptor; -
drsdaq/HVFeedback.h
r22 r27 59 59 void GetResponse(); 60 60 void ClearAverages(); 61 bool WriteHVCommand(c har *, ...);61 bool WriteHVCommand(const char *, ...); 62 62 void PrintConfig(); 63 63 }; -
drsdaq/History.txt
r22 r27 9 9 26/3/2009 Added PixelMap translation to communication with HV control. 10 10 30/3/2009 Added feedback gain. Checked into repository. 11 1/4/2009 Changes many 'char *' to 'const char *' to honour compiler warning 12 on ihp-pc26 (newer version of g++ than on eth-vme02)
Note:
See TracChangeset
for help on using the changeset viewer.