Changeset 274
- Timestamp:
- 07/30/10 12:35:09 (14 years ago)
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Evidence/Edd/Edd.cc
r232 r274 1302 1302 TP_DAQ::TP_DAQ() { 1303 1303 1304 EddLineDisplay *Line; 1305 1304 1306 setAttribute(Qt::WA_DeleteOnClose); 1305 1307 QGridLayout *Layout = new QGridLayout(this); 1308 1309 // Run-related information 1310 Line = new EddLineDisplay("drsdaq/RunNumber"); 1311 Line->setMaximumWidth(100); 1312 Layout->addWidget(Line, 0, 1, 1, 1); 1313 Line = new EddLineDisplay("drsdaq/EventNumber"); 1314 Line->setMaximumWidth(100); 1315 Layout->addWidget(Line, 0, 2, 1, 1); 1316 Line = new EddLineDisplay("drsdaq/RunSizeMB"); 1317 Line->setMaximumWidth(100); 1318 Layout->addWidget(Line, 0, 3, 1, 1); 1319 Line = new EddLineDisplay("drsdaq/FileSizeMB"); 1320 Line->setMaximumWidth(100); 1321 Layout->addWidget(Line, 0, 4, 1, 1); 1322 Line = new EddLineDisplay("drsdaq/FileName"); 1323 Line->setMaximumWidth(200); 1324 Layout->addWidget(Line, 0, 5, 1, 1); 1306 1325 1307 1326 // Event scope … … 1320 1339 TabWidget->addTab(RunHeaderDisplay, "&Run Header"); 1321 1340 TabWidget->addTab(EventHeaderDisplay, "&Event Header"); 1322 Layout->addWidget(TabWidget, 0, 1, 5, 3);1341 Layout->addWidget(TabWidget, 1, 1, 5, 5); 1323 1342 1324 1343 connect(Scope, SIGNAL(RunHeaderChanged(QString)), RunHeaderDisplay, SLOT(setPlainText(QString))); … … 1366 1385 PixDisplay->setFont(QFont("Times", 10, QFont::Bold)); 1367 1386 PixDisplay->setToolTip("Show event display window"); 1387 PixDisplay->setMaximumWidth(80); 1368 1388 Layout->addWidget(PixDisplay, 4, 0); 1369 1389 connect(PixDisplay, SIGNAL(clicked()), SLOT(ShowPixelDisplay())); … … 1386 1406 Pixel[Count] = new QPushButton(Display); 1387 1407 Pixel[Count]->setAutoFillBackground(true); 1388 Pixel[Count]->setGeometry( x*12.5 + 250, y*12.5 + 250, 10, 10);1408 Pixel[Count]->setGeometry((int) (x*12.5 + 250), (int) (y*12.5 + 250), 10, 10); 1389 1409 Pixel[Count]->show(); 1390 1410 Count++; … … 1491 1511 1492 1512 QPushButton *Button = new QPushButton(); 1513 Button->setText("eLogBook"); 1514 connect(Button, SIGNAL(released()), SLOT(StartELog())); 1515 Layout->addWidget(Button, 6, 1, 1, 1); 1516 1517 Button = new QPushButton(); 1493 1518 Button->setText("Start DIM browser"); 1494 1519 connect(Button, SIGNAL(released()), SLOT(StartDIMBrowser())); … … 1503 1528 1504 1529 QProcess::startDetached("did", QStringList(), QString(getenv("DIMDIR"))+"/linux/"); 1530 } 1531 1532 // Start eLogBook 1533 void TP_Evidence::StartELog() { 1534 1535 QProcess::startDetached("firefox http://fact.ethz.ch/FACTelog/index.jsp"); 1505 1536 } 1506 1537 -
Evidence/Edd/Edd.h
r232 r274 352 352 private slots: 353 353 void StartDIMBrowser(); 354 void StartELog(); 354 355 355 356 public: -
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 -
tools/Scripts/Logon
r229 r274 8 8 if [ -z "$DIMDIR" ]; then export DIMDIR=/usr/local/dim/; fi 9 9 if [ -z "$QWTDIR" ]; then export QWTDIR=/usr/local/qwt/; fi 10 if [ -z "$QTDIR" ]; then export QTDIR=/usr/local/Trolltech/Qt-4.6.2; fi 10 11 11 12 export LD_LIBRARY_PATH=$QWTDIR/lib:$DIMDIR/linux:$LD_LIBRARY_PATH 12 export PATH=$DIMDIR/linux:$REPOS_DIR/tools/Scripts: /usr/local/Trolltech/Qt-4.4.3/bin:.:$PATH13 export PATH=$DIMDIR/linux:$REPOS_DIR/tools/Scripts:$QTDIR/bin:.:$PATH 13 14 14 15 echo
Note:
See TracChangeset
for help on using the changeset viewer.