Changeset 11414 for fact


Ignore:
Timestamp:
07/15/11 12:12:01 (13 years ago)
Author:
ogrimm
Message:
Added debugging for 'double signal' effect on FAD
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FADBoard.cc

    r11385 r11414  
    5858  DIM_Frequency = new DimService((ID.str()+"Frequency").c_str(), Status.Frequency);
    5959  DIM_BoardTime = new DimService((ID.str()+"BoardTime").c_str(), (char *) "I", &Status.BoardTime, sizeof(Status.BoardTime));
    60   DIM_Lock = new DimService((ID.str()+"Lock").c_str(), (char *) "S", &Status.Lock, sizeof(Status.Lock));
     60  DIM_Lock = new DimService((ID.str()+"Lock").c_str(), (char *) "S", NULL, 0);
    6161  DIM_TriggerNum = new DimService((ID.str()+"TriggerNum").c_str(), (char *) "I", &Status.TriggerNum, sizeof(Status.TriggerNum));
    6262  DIM_Temp = new DimService((ID.str()+"Temperature").c_str(), (char *) "F", NULL, 0);
     
    106106  delete DIM_TriggerNum;        delete DIM_Temp;
    107107  delete DIM_DAC;                       delete DIM_ROI;
    108   delete DIM_ACalData; 
     108  delete DIM_ACalData;          delete DIM_BoardTime;
    109109  delete[] Name;
    110110}
     
    536536          Unlock();
    537537         
     538          // Check if trigger cells resonable (to trace FAD 'double signal' bug)
     539          if (abs((min_element(Status.TriggerCell,Status.TriggerCell+4) - max_element(Status.TriggerCell,Status.TriggerCell+4) + 1024)%1024) > 20) {
     540                SetStatus("Warning: Trigger cell mismatch board %s, cells are %d %d %d %d", Name, Status.TriggerCell[0], Status.TriggerCell[1], Status.TriggerCell[2], Status.TriggerCell[3]);
     541                m->Message(m->WARN, "Trigger cell mismatch board %s, cells are %d %d %d %d", Name, Status.TriggerCell[0], Status.TriggerCell[1], Status.TriggerCell[2], Status.TriggerCell[3]);
     542          }
     543         
    538544          // Amplitude calibration (will check if Mode is acalib)
    539545          AmplitudeCalibration();
     
    553559
    554560                if (memcmp(PrevStatus.Lock, Status.Lock, sizeof(Status.Lock)) != 0) {
    555                   DIM_Lock->updateService();
     561                  DIM_Lock->updateService(Status.Lock, sizeof(Status.Lock));
    556562                }
    557563                if (memcmp(PrevStatus.Temp, Status.Temp, sizeof(Status.Temp)) != 0) {
     
    666672void FADBoard::threadHandler() {
    667673
    668   //int List[] = {5001, 5002, 5003, 5004, 5005, 5006, 5007};
    669674  int List[] = {31920, 31921, 31922, 31923, 31924, 31925, 31926};
    670675  int Socket[sizeof(List)/sizeof(int)], MaxSocketNum, Ret;
Note: See TracChangeset for help on using the changeset viewer.