Changeset 274 for drsdaq/DAQReadout.cc
- Timestamp:
- 07/30/10 12:35:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drsdaq/DAQReadout.cc
r269 r274 78 78 LastBoard = -1; 79 79 MinDelay = 1; 80 RunNumber = -1; 80 81 81 82 // Get configuration data (static needed for c_str() pointers to remain valid after constructor finished) … … 142 143 // Create DIM event data service 143 144 EventService = new DimService (SERVER_NAME"/EventData", (char *) "C", DIMEventData, 0); 145 RunNumService = new DimService (SERVER_NAME"/RunNumber", RunNumber); 144 146 145 147 // Install DIM command (after all initialized) … … 155 157 delete Command; 156 158 159 delete RunNumService; 157 160 delete EventService; delete[] DIMEventData; 158 161 delete RHeader; delete EHeader; … … 299 302 } 300 303 else RunNumber = -1; 304 RunNumService->updateService(); 301 305 302 306 // Create DAQ thread … … 1197 1201 off_t FileSize; 1198 1202 int DIMSize; 1203 float RunSizeMB=0, FileSizeMB=0; 1199 1204 1200 1205 // Initialize run … … 1202 1207 FileNumber = 0; 1203 1208 DimClient::sendCommandNB("Feedback/Command", "clear"); 1209 1210 DimService RunSizeService(SERVER_NAME"/RunSizeMB", RunSizeMB); 1211 DimService FileSizeService(SERVER_NAME"/FileSizeMB", FileSizeMB); 1212 DimService EventNumService(SERVER_NAME"/EventNumber", NumEvents); 1213 DimService FilenameService(SERVER_NAME"/FileName", FileName); 1204 1214 1205 1215 gettimeofday(&StartTime, NULL); … … 1218 1228 EventsInFile = 0; 1219 1229 FileSize = 0; 1230 FilenameService.updateService(); 1220 1231 1221 1232 WriteError |= !WriteRunHeader(); … … 1277 1288 } 1278 1289 1279 // Call routine to update DIM service(update rate is limited)1290 // Update DIM services (update rate is limited) 1280 1291 if (time(NULL) - LastDIMUpdate < MinDelay) continue; 1281 1292 LastDIMUpdate = time(NULL); 1293 1294 RunSizeMB = (RunSize+FileSize)/1024.0/1024.0; 1295 RunSizeService.updateService(); 1296 FileSizeMB = FileSize/1024.0/1024.0; 1297 FileSizeService.updateService(); 1298 EventNumService.updateService(); 1282 1299 1283 1300 // Copy new event header … … 1338 1355 } 1339 1356 1357 RunNumber = -1; 1358 RunNumService->updateService(); 1359 1340 1360 daq_state = stopped; 1341 1361 }
Note:
See TracChangeset
for help on using the changeset viewer.