- Timestamp:
- 07/30/10 12:35:09 (14 years ago)
- Location:
- drsdaq
- Files:
-
- 3 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 } -
drsdaq/DAQReadout.h
r269 r274 33 33 pid_t MainThread; 34 34 DimService *EventService; 35 DimService *RunNumService; 35 36 int MinDelay; 36 37 unsigned int CmdNumber; … … 64 65 runtype_enum daq_runtype; 65 66 bool Stop; // Set to true to stop run 66 unsignedint NumEvents; // Number of event taken67 unsignedint NumEventsRequested; // Number of events requested67 int NumEvents; // Number of event taken 68 int NumEventsRequested; // Number of events requested 68 69 int RunNumber; 69 70 unsigned int FileNumber; -
drsdaq/History.txt
r269 r274 73 73 invoked through a DIM command. Last revision with feedback integrated into 74 74 drsdaq is 264. 75 30/7/2010 Published some run-related information as DIM service. 75 76
Note:
See TracChangeset
for help on using the changeset viewer.