Changeset 11455 for fact/tools


Ignore:
Timestamp:
07/18/11 17:49:24 (13 years ago)
Author:
ogrimm
Message:
Crash when reducing number of boards in FADctrl fixed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/Edd/Edd.cc

    r11413 r11455  
    149149  LastPath = QFileInfo(Filename).absolutePath();
    150150 
    151   // Prepare temporary file for run header 
    152   ftruncate(fileno(Tmpfile), 0);
     151  // Prepare temporary file for run header
     152  if (ftruncate(fileno(Tmpfile), 0) == -1) printf("Error with ftruncate() in EventScope::OpenRawFile() (%s)\n", strerror(errno)); 
    153153  rewind(Tmpfile);
    154154
     
    174174    }
    175175  }
    176  
     176
    177177  // Print run header to display
    178178  rewind(Tmpfile);
     
    181181  DAQPage->RunHeaderDisplay->setPlainText(text);
    182182
     183  // Read and display first event (must be before setting spin boxes)
     184  NewEventNum(DAQPage->Event->value());
     185
    183186  // Update spin box ranges on DAQ page 
    184187  DAQPage->Event->setRange(0, R->Events-1);
    185188  DAQPage->Event->setEnabled(true);
    186 
    187189  DAQPage->Channel->setRange(0, R->NChannels-1);
    188190  DAQPage->Chip->setRange(0, R->NChips-1);
    189   DAQPage->Board->setRange(0, R->NBoards-1);
    190  
    191   // Display first event
    192   NewEventNum(DAQPage->Event->value());
     191  DAQPage->Board->setRange(0, R->NBoards-1);
    193192}
    194193
     
    197196
    198197  // Prepare temporary file for event header 
    199   ftruncate(fileno(Tmpfile), 0);
     198  if (ftruncate(fileno(Tmpfile), 0) == -1) printf("Error with ftruncate() in EventScope::NewEventNum() (%s)\n", strerror(errno));
    200199  rewind(Tmpfile);
    201200
     
    206205    return;
    207206  }
    208  
     207
    209208  // Plot traces for event
    210209  PlotTraces();
     
    279278    Last = time(NULL);
    280279  }
    281 
    282280
    283281  // Loop through event data for pixel display
Note: See TracChangeset for help on using the changeset viewer.