Changeset 14174 for fact/FADctrl/FAD.cc


Ignore:
Timestamp:
06/13/12 15:44:01 (12 years ago)
Author:
ogrimm
Message:
Fixed hanging signal handler in Evidence before abort() was called. Added command to determine dynamic range to FADctrl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FAD.cc

    r12891 r14174  
    617617void FAD::cmd_dynrange() {
    618618
    619   // Set number of events required for measurement
    620   if (Parameter.size()==1 || !ConvertToInt(Parameter[1], &NumEventsRequested) || NumEventsRequested<=0) {
    621         NumEventsRequested = DEFAULT_NUM_CALIB_EVENTS;
    622   }
    623 
    624   // Start calibration by setting mode
    625619  Mode = dynrange;
    626   Message(INFO, "Starting determination of dynamic range with %d events", NumEventsRequested);
     620  Message(INFO, "Starting determination of dynamic range");
    627621}
    628622
     
    667661        else if (Mode == acalib) PrintMessage("Current mode is ACALIB (3x%d events, slowest board %d has %d events)\n", NumEventsRequested, SlowestBoard, MinCount);
    668662        else if (Mode == datarun) PrintMessage("Current mode is DATARUN (%d events requested, %d events taken)\n", NumEventsRequested, NumEvents);
    669         else if (Mode == dynrange) PrintMessage("Current mode is DYNRANGE (%d events requested)\n", NumEventsRequested);
     663        else if (Mode == dynrange) PrintMessage("Current mode is DYNRANGE\n");
    670664        return;
    671665  }   
     
    957951
    958952        // If amplitude calibration mode, check if all boards finished procedure
    959         if (Mode == acalib) {
     953        if (Mode == acalib || Mode == dynrange) {
    960954          bool Done = true;
    961955          for (unsigned int i=0; i<Boards.size(); i++) {
     
    965959          // Amplitude calibration finished?
    966960          if (Done) {
    967             SaveAmplitudeCalibration();
     961            if (Mode == acalib) {
     962                  SaveAmplitudeCalibration();
     963                  Message(INFO, "Amplitude calibration done, mode set to IDLE");
     964                }
     965            if (Mode == dynrange) {
     966                  Message(INFO, "Dynamic range measurement done, mode set to IDLE");
     967                }               
    968968                Mode = idle;
    969                 Message(INFO, "Amplitude calibration done, mode set to IDLE");
    970969          }
    971970        }
Note: See TracChangeset for help on using the changeset viewer.