Changeset 89
- Timestamp:
- 07/13/09 14:47:30 (15 years ago)
- Location:
- drsdaq
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
drsdaq/DAQReadout.cc
r86 r89 961 961 } 962 962 963 if(write(Rawfile, BStruct, sizeof(BoardStructure)*(LastBoard-FirstBoard+1+(NumBoards==0))) != (ssize_t) sizeof(BoardStructure)*(LastBoard-FirstBoard+1+(NumBoards==0))) {963 if(write(Rawfile, &BStruct[FirstBoard], sizeof(BoardStructure)*(LastBoard-FirstBoard+1+(NumBoards==0))) != (ssize_t) sizeof(BoardStructure)*(LastBoard-FirstBoard+1+(NumBoards==0))) { 964 964 PrintMessage("Error: Could not write (all) board structures, terminating run (%s)\n", strerror(errno)); 965 965 return false; … … 1280 1280 m->SlowDataClass->AddToEntry("%d %s %s %d %d", m->RunNumber, daq_runtype_str[m->daq_runtype], m->RHeader->Description, m->NumEvents, m->FileNumber); 1281 1281 if(m->SlowDataClass->ErrorCode != 0) { 1282 m->PrintMessage(" SlowData: Error, could not write data to file (%s); closing file\n", strerror(m->SlowDataClass->ErrorCode));1282 m->PrintMessage("Error, could not write DAQ data to file (%s), file closed\n", strerror(m->SlowDataClass->ErrorCode)); 1283 1283 } 1284 1284 -
drsdaq/HVFeedback.cc
r86 r89 29 29 PixMap = new PixelMap(PIXMAP_LOCATION, false); 30 30 31 // Create instance of slow data class for feedback 31 32 snprintf(Filename,sizeof(Filename),"%s/SlowData/", m->fRawDataPath); 32 33 SlowDataClass = new SlowData("HVFB", Filename); 34 if (SlowDataClass->ErrorCode != 0) { 35 m->PrintMessage("Warning: Could not open feedback slowdata file (%s)\n", strerror(SlowDataClass->ErrorCode)); 36 } 33 37 34 38 // Initialise with zero content … … 128 132 // Acquired number of event requires action 129 133 switch (FBMode) { 130 case FB_Active: SlowDataClass->NewEntry("Average"); break; 131 case FB_Targets: SlowDataClass->NewEntry("Target"); break; 132 case FB_ResponseSecond: SlowDataClass->NewEntry("Response"); SlowDataClass->AddToEntry("%.3f ",DiffVoltage); break; 134 case FB_Active: SlowDataClass->NewEntry("Average"); 135 break; 136 case FB_Targets: SlowDataClass->NewEntry("Target"); 137 break; 138 case FB_ResponseSecond: SlowDataClass->NewEntry("Response"); 139 SlowDataClass->AddToEntry("%.3f ",DiffVoltage); 140 break; 133 141 default: break; // to suppress warning abount not handled enumeration value 134 142 } 135 143 136 for (i=m->FirstBoard; i<=m->LastBoard; i++) 137 for (j=0; j<kNumberOfChips; j++) 144 for (i=m->FirstBoard; i<=m->LastBoard; i++) { 145 for (j=0; j<kNumberOfChips; j++) { 138 146 for (k=0; k<kNumberOfChannels; k++) { 139 147 Average[i][j][k] /= Count; … … 171 179 } 172 180 } 173 181 } 182 } 183 174 184 switch (FBMode) { 175 185 case FB_Targets: … … 187 197 default: break; // to suppress warning abount not handled enumeration value 188 198 } 199 200 if(m->SlowDataClass->ErrorCode != 0) { 201 m->PrintMessage("Error, could not write feedback slow data to file (%s), file closed.\n", strerror(m->SlowDataClass->ErrorCode)); 202 } 189 203 ClearAverages(); 204 190 205 return true; 191 206 }
Note:
See TracChangeset
for help on using the changeset viewer.