Changeset 211 for drsdaq/HVFeedback.cc


Ignore:
Timestamp:
05/21/10 13:31:27 (14 years ago)
Author:
ogrimm
Message:
Fix for exit signalling from DimCommand thread
File:
1 edited

Legend:

Unmodified
Added
Removed
  • drsdaq/HVFeedback.cc

    r196 r211  
    5757
    5858  char *Token = strtok(m->GetConfig("DefaultResponse"), " \t");
    59   for (int i=0; i<m->NumBoards*fNumberOfChips*fNumberOfChannels; i++) {
    60         if (Token == NULL) break;
    61     *(&Response[0][0][0]+i) = (float) atof(Token);
    62         Token = strtok(NULL, " \t");
    63   }
     59  for (int i=0; i<m->NumBoards; i++) {
     60        for (int j=0; j<fNumberOfChips; j++) {
     61          for (int k=0; k<fNumberOfChannels; k++) {
     62                if (Token == NULL) break;
     63        Response[i][j][k] = (float) atof(Token);
     64                Token = strtok(NULL, " \t");
     65          }
     66        }
     67  }
     68
    6469  Token = strtok(m->GetConfig("DefaultTarget"), " \t");
    65   for (int i=0; i<m->NumBoards*fNumberOfChips*fNumberOfChannels; i++) {
    66         if (Token == NULL) break;
    67     *(&Target[0][0][0]+i) = (float) atof(Token);
    68         Token = strtok(NULL, " \t");
    69   }
    70 
     70  for (int i=0; i<m->NumBoards; i++) {
     71        for (int j=0; j<fNumberOfChips; j++) {
     72          for (int k=0; k<fNumberOfChannels; k++) {
     73                if (Token == NULL) break;
     74        Target[i][j][k] = (float) atof(Token);
     75                Token = strtok(NULL, " \t");
     76          }
     77        }
     78  }
     79 
    7180  PrintConfig(MsgToLog);
    7281
     
    7988
    8089  // Initial state
    81   Gain = atof(m->GetConfig("DefaultGain"));printf("Gain %d\n", Gain);
     90  Gain = atof(m->GetConfig("DefaultGain"));
    8291  SetFBMode(FB_Off);
    8392  SetNumAverages(fDefaultNumAverage);
Note: See TracChangeset for help on using the changeset viewer.