Changeset 274


Ignore:
Timestamp:
07/30/10 12:35:09 (14 years ago)
Author:
ogrimm
Message:
drsdaq publishes some more run-related services
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Evidence/Edd/Edd.cc

    r232 r274  
    13021302TP_DAQ::TP_DAQ() {
    13031303
     1304  EddLineDisplay *Line;
     1305
    13041306  setAttribute(Qt::WA_DeleteOnClose);
    13051307  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);     
    13061325
    13071326  // Event scope
     
    13201339  TabWidget->addTab(RunHeaderDisplay, "&Run Header");
    13211340  TabWidget->addTab(EventHeaderDisplay, "&Event Header");
    1322   Layout->addWidget(TabWidget, 0, 1, 5, 3);
     1341  Layout->addWidget(TabWidget, 1, 1, 5, 5);
    13231342
    13241343  connect(Scope, SIGNAL(RunHeaderChanged(QString)), RunHeaderDisplay, SLOT(setPlainText(QString)));
     
    13661385  PixDisplay->setFont(QFont("Times", 10, QFont::Bold));
    13671386  PixDisplay->setToolTip("Show event display window");
     1387  PixDisplay->setMaximumWidth(80);
    13681388  Layout->addWidget(PixDisplay, 4, 0);
    13691389  connect(PixDisplay, SIGNAL(clicked()), SLOT(ShowPixelDisplay()));
     
    13861406    Pixel[Count] = new QPushButton(Display);
    13871407        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);
    13891409        Pixel[Count]->show();
    13901410        Count++;
     
    14911511
    14921512  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();
    14931518  Button->setText("Start DIM browser");
    14941519  connect(Button, SIGNAL(released()), SLOT(StartDIMBrowser()));
     
    15031528
    15041529  QProcess::startDetached("did", QStringList(), QString(getenv("DIMDIR"))+"/linux/");
     1530}
     1531
     1532// Start eLogBook
     1533void TP_Evidence::StartELog() {
     1534
     1535  QProcess::startDetached("firefox http://fact.ethz.ch/FACTelog/index.jsp");
    15051536}
    15061537
  • Evidence/Edd/Edd.h

    r232 r274  
    352352  private slots:
    353353        void StartDIMBrowser();
     354        void StartELog();
    354355
    355356  public:
  • drsdaq/DAQReadout.cc

    r269 r274  
    7878  LastBoard                     = -1;
    7979  MinDelay                      = 1;
     80  RunNumber                     = -1;
    8081
    8182  // Get configuration data (static needed for c_str() pointers to remain valid after constructor finished)
     
    142143  // Create DIM event data service
    143144  EventService = new DimService (SERVER_NAME"/EventData", (char *) "C", DIMEventData, 0);
     145  RunNumService = new DimService (SERVER_NAME"/RunNumber", RunNumber);
    144146                                                   
    145147  // Install DIM command (after all initialized)
     
    155157  delete Command;
    156158
     159  delete RunNumService;
    157160  delete EventService;  delete[] DIMEventData;
    158161  delete RHeader;               delete EHeader;
     
    299302  }
    300303  else RunNumber = -1;
     304  RunNumService->updateService();
    301305
    302306  // Create DAQ thread
     
    11971201  off_t FileSize;
    11981202  int DIMSize;
     1203  float RunSizeMB=0, FileSizeMB=0;
    11991204
    12001205  // Initialize run
     
    12021207  FileNumber = 0;
    12031208  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);
    12041214   
    12051215  gettimeofday(&StartTime, NULL);
     
    12181228    EventsInFile = 0;
    12191229    FileSize = 0;
     1230        FilenameService.updateService();
    12201231
    12211232    WriteError |= !WriteRunHeader();
     
    12771288          }
    12781289
    1279       // Call routine to update DIM service (update rate is limited)
     1290      // Update DIM services (update rate is limited)
    12801291          if (time(NULL) - LastDIMUpdate < MinDelay) continue;
    12811292          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();
    12821299         
    12831300          // Copy new event header
     
    13381355  }
    13391356 
     1357  RunNumber = -1;
     1358  RunNumService->updateService();
     1359
    13401360  daq_state = stopped;
    13411361}
  • drsdaq/DAQReadout.h

    r269 r274  
    3333        pid_t MainThread;
    3434        DimService *EventService;
     35        DimService *RunNumService;
    3536        int MinDelay;
    3637    unsigned int CmdNumber;
     
    6465    runtype_enum daq_runtype;
    6566    bool Stop;                  // Set to true to stop run
    66     unsigned int NumEvents;             // Number of event taken           
    67     unsigned int NumEventsRequested;    // Number of events requested
     67    int NumEvents;              // Number of event taken           
     68    int NumEventsRequested;     // Number of events requested
    6869    int RunNumber;
    6970    unsigned int FileNumber;
  • drsdaq/History.txt

    r269 r274  
    7373                        invoked through a DIM command. Last revision with feedback integrated into
    7474                        drsdaq is 264.
     7530/7/2010       Published some run-related information as DIM service.
    7576                       
  • tools/Scripts/Logon

    r229 r274  
    88if [ -z "$DIMDIR" ]; then export DIMDIR=/usr/local/dim/; fi
    99if [ -z "$QWTDIR" ]; then export QWTDIR=/usr/local/qwt/; fi
     10if [ -z "$QTDIR" ]; then export QTDIR=/usr/local/Trolltech/Qt-4.6.2; fi
    1011
    1112export 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:.:$PATH
     13export PATH=$DIMDIR/linux:$REPOS_DIR/tools/Scripts:$QTDIR/bin:.:$PATH
    1314
    1415echo
Note: See TracChangeset for help on using the changeset viewer.